Skip to main content

mhub_proxy

mhub_proxy is a local OpenAI/Anthropic-compatible proxy that lets CLI tools (for example, Opencode) send OpenAI/Anthropic-style requests to SecureGPT.

Requirements:

uv is required to install and run the proxy.

curl -LsSf https://astral.sh/uv/install.sh | sh

Or, using pip:

pip install uv

Install mhub_proxy

Install as a uv tool:

uv tool install mhub_proxy

Required environment variables

Before starting the proxy, define the variables used by mhub_proxy/config.py:

  • MHUB_API_URL : URL of the Model Hub API (Example: https://api-pp.se.axa-go.applications.services.axa-tech.intraxa/ago-m365-securegpt-hub-v1-vrs)
  • MHUB_CLIENT_ID : Client ID for the Model Hub API
  • MHUB_CLIENT_SECRET : Client Secret for the Model Hub API
  • ONEACCOUNT_LOGIN_URL : URL of the OneAccount login API (Example: https://onelogin.stg.axa.com)

Optional:

  • MHUB_PROXY_HOST (default: 127.0.0.1)
  • MHUB_PROXY_PORT (default: 8123)
  • MHUB_PROXY_LOG_LEVEL (default: info)

Run the proxy

Start the proxy with:

uvx mhub_proxy

By default, the proxy runs on http://127.0.0.1:8123.

Use with Opencode

  1. Optionally:

    • Install the bundled OpenCode configuration in your project by running:
    uvx mhub_proxy --install-config
    

IMPORTANT: Notice how for OpenAI models the API version is included in the model ID, e.g. gpt-5.1-2025-11-13@2025-01-01-preview. This is required for the proxy to correctly route requests to the Model Hub API.

  1. Start Opencode from a terminal inside your project directory.

Note: The included opencode.json points Opencode to the local proxy URL:

"baseURL": "http://127.0.0.1:8123/openai"
"baseURL": "http://127.0.0.1:8123/claude"
  1. Use the /connect command in Opencode and choose SecureGPT OpenAI or SecureGPT Anthropic as your provider. You can use any values for the API key as the proxy does not validate it.

  2. Choose a model from the Model Hub and start using Opencode as normal!

Automatic startup (Windows)

To automatically start the proxy when your PC boots up, you can create a scheduled task:

  1. Open Task Scheduler and create a new task.

ts1

  1. In the "General" tab, give the task a name (e.g., "Start mhub_proxy") and select "Run whether user is logged on or not".

ts1

  1. In the "Triggers" tab, create a new trigger that begins "At startup".

ts1

  1. In the "Actions" tab, create a new action that starts a program with the following settings:

    • Program/script: powershell.exe
    • Add arguments:
-NoProfile -ExecutionPolicy Bypass -WindowStyle Hidden -Command "Start-Process -WindowStyle Hidden -FilePath 'powershell.exe' -ArgumentList '-NoProfile -Command uvx mhub_proxy'"

ts1

  1. Save the task and run it to verify that the proxy starts correctly.

Notes

  • The proxy expects OpenAI chat-completions style traffic from your CLI tool.
  • If startup fails, first verify that all required environment variables are set.

Release files for mhub_proxy 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mhub_proxy 1.1.0
File Size Uploaded
mhub_proxy-1.1.0.tar.gz 10.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mhub_proxy 1.1.0
File Interpreter ABI Platform
mhub_proxy-1.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 23.5 kB

Release files / mhub_proxy-1.1.0.tar.gz

Download URL mhub_proxy-1.1.0.tar.gz
Size 10.1 kB
Tags Source
SHA-256 checksum
How to use checksums
5324557ef6e17ef2c856c992ee2eaa1b7de29301c0c8d386101756677d583eb7
BLAKE2b-256 checksum
How to use checksums
59e88a627d511a7054cca93d149edddfffefdbc21f3154d3d0d1fd9bcc6015d8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.2 {"installer":{"name":"uv","version":"0.12.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / mhub_proxy-1.1.0-py3-none-any.whl

Download URL mhub_proxy-1.1.0-py3-none-any.whl
Size 13.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5fea43b0926b5a468704587d2364c83895b5e58a0e98ad81417915c567920fad
BLAKE2b-256 checksum
How to use checksums
fc63124cbc67e7fa491ba516c873d6d5387ce47a04795405e49edf3eb029bcec
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.2 {"installer":{"name":"uv","version":"0.12.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

1.1.2

2 release files

1.1.1

2 release files

This release

1.1.0 This release

2 release files

1.0.8

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page