Hermes Agent Integration with 开桥
Hermes Agent supports tool calling, browser automation, code execution, and file operations. Connect it to 开桥 to access models from multiple providers through one account.
This guide covers two integration options:
| Option | Authentication | Best for |
|---|---|---|
| OAuth plugin (recommended) | Sign in and authorize in a browser, without manually creating or pasting an API Key | Hermes with the OAuth PKCE plugin API |
| API Key custom endpoint | Configure a 开桥 API Key manually | API Key users or installations that cannot upgrade Hermes yet |
Both options use the OpenAI-compatible Chat Completions protocol at https://openqiao.com/api/v1. OAuth is an authorization method, not free access; requests are billed to the account and billing option selected during authorization.
For OAuth integration with other agents and shared security guidance, see Sign in with OAuth PKCE.
Prerequisites
- A 开桥 account.
- Hermes Agent installed. See the official quickstart for installation. Windows users should use WSL2.
- The OAuth plugin requires Hermes with the declarative OAuth PKCE plugin API:
mainmust include commit3e67877e1bor later. Update older Hermes installations first; installing the plugin alone cannot add this capability. - PyPI installation requires Python 3.11 or later, in the same Python environment as Hermes.
- A browser for initial OAuth authorization. For remote installations, see Remote authorization.
Plugin Source
This guide follows the 开桥 Hermes plugin README. The plugin includes a dedicated public OAuth client and uses OAuth 2.0 Authorization Code + S256 PKCE. No client secret is required.
Option 1: OAuth Plugin (Recommended)
1. Install and Enable the Plugin
Installing from GitHub is recommended:
hermes plugins install 开桥/hermes-plugin --enable
hermes gateway restartIf no Gateway is running, simply restart Hermes after installation. If your Gateway is managed by PM2 or another process manager, restart it there instead, for example with pm2 restart hermes-gateway --update-env.
Alternative Installation and Version Pinning
For reproducible installation, get a full 40-character commit from the Releases page and replace the placeholder:
hermes plugins install 开桥/hermes-plugin --ref <40-character-commit> --enableYou can also install from PyPI. The following path assumes the default Hermes virtual environment; use your actual Python path for custom installations:
~/.hermes/hermes-agent/venv/bin/python -m pip install openqiao-hermes-plugin
hermes plugins enable openqiao
hermes gateway restartThe plugin must be installed in the same Python environment as Hermes to be discovered. See the plugin README for filesystem provider installation.
2. Sign In and Authorize
hermes auth add openqiao
hermes auth status openqiaoHermes opens the 开桥 authorization page. Select your account and billing option, approve access, then return to the terminal to check authentication status.
Hermes stores access and refresh tokens in its credential pool, not in the plugin directory. The plugin's openqiao.json contains only the public OAuth client ID. Refresh token rotation is serialized through Hermes credential locks.
Protect Your Credentials
Do not paste tokens, authorization codes, or complete authentication files into chats, tickets, or repositories. The OAuth plugin does not require copying tokens into an API Key configuration.
3. Select a Model and Verify
Open the model selector and choose the plugin's 开桥 provider and your desired model:
hermes modelAlternatively, explicitly specify the provider and full model slug to avoid reusing a previous custom endpoint configuration:
hermes --provider openqiao -m google/gemini-2.5-flash-lite
hermes --provider openqiao -m anthropic/claude-sonnet-4.5Send a short message and confirm that the model responds. To make 开桥 the default provider:
hermes config set model.provider openqiao
hermes config set model.default google/gemini-2.5-flash-lite
hermes config set model.base_url https://openqiao.com/api/v1
hermes config set model.api_mode chat_completions
hermes -z "Reply with exactly: OK" --safe-modeSuccessful login confirms authorization only; an actual model response verifies that inference works.
4. Switch Models and Understand the Catalog
In a chat or messaging bot already using 开桥, enter:
/model z-ai/glm-5.3-flashxopenqiao is the provider name, not a model slug prefix. Use the full vendor/model ID, such as z-ai/glm-5.3-flashx, not openqiao/glm-5.3-flashx.
The plugin reads the live catalog at https://openqiao.com/api/v1/models. It keeps text-output models and filters image-only and video-only generation models out of the chat selector. A small fallback list is used only when the catalog is temporarily unavailable. Example models are not guaranteed to be available to every account; account permissions and API responses determine actual availability.
Models Outside the Catalog
The live catalog supports model selection and spelling suggestions; it is not an account permission allowlist. For account-specific, staged, or special-routing slugs, Hermes must support ProviderProfile.model_listing_authoritative to allow requests for unlisted slugs. Older Hermes versions may reject them before sending a request; update Hermes and the plugin first. Invalid or unauthorized slugs are still rejected by the 开桥 API.
Remote Servers and Headless Environments
OAuth uses a temporary loopback callback such as http://127.0.0.1:54321/callback. The port is not fixed.
Start login in the remote terminal to obtain the current authorization URL and callback port:
bashhermes auth add openqiao --no-browserLeave the remote login command waiting. Open another terminal on your local machine and forward the port actually shown for this login (
54321is only an example):bashssh -N -L 54321:127.0.0.1:54321 user@remote-hostOpen the current authorization URL in your local browser, approve access, and check the result in the remote terminal.
Plugin version 0.1.1 and later waits up to 10 minutes. After a timeout, restart login and use the new URL and port; expired authorization codes cannot be reused. Do not expose the callback server to the public internet.
For hosted containers without SSH forwarding, the README describes authorizing with a temporary local HERMES_HOME and securely merging only credential_pool.openqiao. Transfer only that provider's credentials; never overwrite other remote provider credentials with an entire local auth.json. See the remote environment instructions.
Manage Authentication and Update
# Inspect credentials, refresh explicitly, or log out
hermes auth list openqiao
hermes auth refresh openqiao
hermes auth logout openqiaoUpdate using your original installation method, then restart Hermes or the Gateway:
hermes plugins install 开桥/hermes-plugin --force --enable
hermes gateway restart~/.hermes/hermes-agent/venv/bin/python -m pip install --upgrade openqiao-hermes-plugin
hermes gateway restartTo stop using the plugin, run hermes auth logout openqiao, then hermes plugins disable openqiao. See the plugin README for complete removal instructions.
Option 2: API Key Custom Endpoint
You can still connect with an API Key without installing the OAuth plugin.
Create a Subscription API Key or Pay-As-You-Go API Key. Refer to those pages for current plans, pricing, and quotas.
Run
hermes modeland select Custom endpoint (enter URL manually).Enter the following values:
Setting Value API Base URL https://openqiao.com/api/v1API Key Your 开桥 API Key Model name A full model ID, such as openai/gpt-5.4Run
hermesand send a test message to confirm that the model responds.
Keep the Two Methods Separate
API Key custom endpoints use model.provider: custom; the OAuth plugin uses provider openqiao. When migrating from the old method, select the plugin provider again or set the default provider as shown above. Neither method adds a openqiao/ prefix to model IDs.
Troubleshooting
OAuth Plugin Issues
Unknown provider 'openqiao'
First confirm that Hermes meets the version requirement, then check that the plugin is installed and enabled:
hermes plugins list
hermes plugins enable openqiao
hermes gateway restartFor PyPI installations, also check that the plugin is in the Python environment used by Hermes. Restart externally managed Gateways through their process manager.
OAuth Timeout or Authorization Failure
Run hermes auth add openqiao again and use the newly generated URL and port. Remote servers require forwarding as described in Remote authorization. Do not reuse authorization codes from expired login attempts.
If authentication fails after login, check hermes auth status openqiao and try hermes auth refresh openqiao. Sign in again if refreshing still fails.
Logged In, but Inference Reports a Missing Endpoint
Update the plugin and run hermes auth add openqiao again. The current plugin saves base_url=https://openqiao.com/api/v1 with credentials; early development versions did not save this field.
Model Rejected Because It Is Not in the Catalog
Check the full vendor/model slug first. For a valid unlisted model, update Hermes to a version supporting ProviderProfile.model_listing_authoritative, then update the plugin. Allowing an unlisted slug does not grant access; the 开桥 API response remains authoritative.
Common Issues
API Key Error or Authentication Failure
Problem: An invalid API Key or unauthorized error appears, such as 401 Unauthorized
Solution:
Check the API Key format:
- Subscription keys start with
sk-ss-v1- - Pay-As-You-Go keys start with
sk-ai-v1- - Make sure there are no extra spaces or line breaks
- Subscription keys start with
Re-run
hermes model: The easiest fix is to re-run the wizard and re-enter your API Key:bashhermes modelVerify the key is still valid:
- Subscription: Visit the Subscription page to check your status and quota
- Pay-As-You-Go: Visit the Pay-As-You-Go page to confirm your balance
Inspect the current config:
bashhermes config hermes config check
Requests Not Reaching 开桥
Problem: Requests seem to go to the default provider rather than 开桥
Solution:
Re-run
hermes model: For OAuth, select the plugin's 开桥 provider; for API Keys, select "Custom endpoint". Confirm the URL ishttps://openqiao.com/api/v1Check the current configuration:
bashhermes configIn the
modelsection, verify thatproviderisopenqiaofor the OAuth plugin orcustomfor an API Key custom endpoint. Thebase_urlshould behttps://openqiao.com/api/v1Double-check the base_url format:
- Correct:
https://openqiao.com/api/v1 - Wrong:
https://openqiao.com/v1,https://api.openqiao.com/v1
- Correct:
Connection Failure or Timeout
Problem: Hermes Agent cannot connect to 开桥
Solution:
Test network connectivity:
bashcurl https://openqiao.com/api/v1/modelsIf this returns a JSON model list, the connection is fine
Check firewalls and proxies:
- Make sure your firewall isn't blocking outbound HTTPS connections
- Configure proxies with standard
HTTP_PROXY/HTTPS_PROXYvariables - If the proxy terminates TLS, configure its CA with
SSL_CERT_FILE/REQUESTS_CA_BUNDLE; do not globally disable TLS verification
DNS troubleshooting:
bashnslookup openqiao.com
Unexpected Responses or Tool Calling Failures
Problem: The model produces unexpected output or tool calls fail
Solution:
Confirm the model supports tool calling:
- Hermes Agent relies on the model's native function calling capability
- Some smaller models may not support tool calling, causing the agent to behave unpredictably
- Recommended: GPT-5.x, Claude Sonnet/Opus, Gemini Pro, or other models with tool calling support
Switch to a tool-calling-capable model: Run
hermes model, select the 开桥 provider, and choose a model that supports tool callingVerify the model name:
- Use the raw 开桥 model ID, 例如,
openai/gpt-5.2 - Do not add a
openqiao/prefix - Confirm the ID on the 开桥 Models page
- Use the raw 开桥 model ID, 例如,
429 Rate Limit Errors
Problem: Frequent 429 Too Many Requests errors
Solution:
Check your plan quota: Subscription plans have request rate limits — consider upgrading or switching to Pay-As-You-Go
Reduce concurrency: If you're running multiple model tasks in parallel, try lowering the concurrency
Contact 开桥 support: If rate limiting persists, reach out to 开桥 technical support
Supported Models
开桥 offers a wide selection of models. Here are some popular picks for Hermes Agent:
| Model | ID | Best For |
|---|---|---|
| GPT-5.4 | openai/gpt-5.4 | High-performance general use, coding |
| Claude Opus 4.6 | anthropic/claude-opus-4.6 | Complex reasoning, coding |
| Claude Sonnet 4.6 | anthropic/claude-sonnet-4.6 | Balanced performance |
| Gemini 3 Pro | google/gemini-3.1-pro-preview | Multimodal, long context |
| DeepSeek V3.2 | deepseek/deepseek-v3.2 | Cost-effective general use |
| Grok 4.2 Fast | x-ai/grok-4.2-fast | Fast inference |
| Qwen3.6 Plus | qwen/qwen3.6-plus | General reasoning |
| GLM 5.1 | z-ai/glm-5.1 | Chinese-language general use |
| Kimi 2.5 | moonshotai/kimi-k2.5 | Long context comprehension |
For the complete list, visit the 开桥 Models page.