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 APIMHUB_CLIENT_SECRET: Client Secret for the Model Hub APIONEACCOUNT_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
-
Optionally:
- Install the bundled OpenCode configuration in your project by running:
uvx mhub_proxy --install-config
- Or, add an
opencode.jsonfile to the root of your project and configure it to point to the proxy URL (see the Opencode Documentation or this example).
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.
- 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"
-
Use the
/connectcommand in Opencode and chooseSecureGPT OpenAIorSecureGPT Anthropicas your provider. You can use any values for the API key as the proxy does not validate it. -
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:
- Open Task Scheduler and create a new task.
- In the "General" tab, give the task a name (e.g., "Start mhub_proxy") and select "Run whether user is logged on or not".
- In the "Triggers" tab, create a new trigger that begins "At startup".
-
In the "Actions" tab, create a new action that starts a program with the following settings:
- Program/script:
powershell.exe - Add arguments:
- Program/script:
-NoProfile -ExecutionPolicy Bypass -WindowStyle Hidden -Command "Start-Process -WindowStyle Hidden -FilePath 'powershell.exe' -ArgumentList '-NoProfile -Command uvx mhub_proxy'"
- 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.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| mhub_proxy-1.1.2.tar.gz | 10.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mhub_proxy-1.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 23.9 kB
Release files / mhub_proxy-1.1.2.tar.gz
| Download URL | mhub_proxy-1.1.2.tar.gz |
|---|---|
| Size | 10.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
970b5140857997d9a81a60d5439eb75bba360d1a39327e71421dc668d39fd0e5
|
|
BLAKE2b-256 checksum How to use checksums |
c00c3f69b58de6f197e614507b5fd47e21db8d5a117f06f3a63d1cde21537c2f
|
| 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.2-py3-none-any.whl
| Download URL | mhub_proxy-1.1.2-py3-none-any.whl |
|---|---|
| Size | 13.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3a7287ec01226f4aca1a2d7ae33e021da495aded2d666852c616f831ba461c27
|
|
BLAKE2b-256 checksum How to use checksums |
d4b7727077af2d84ce60ac12f6885f4652fbfdd082952a5200e228eeb6a7b6af
|
| 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}
|