OpenCode
Configure OpenCode for your enterprise and verify the request in your console logs.
Configuration
Use your enterprise HTTPS gateway URL, an API key scoped to this tool and a model ID that supports the protocol. The address below comes from this gateway’s public configuration. Find an eligible model
- Follow the Providers guide for your version and merge a custom provider into opencode.jsonc. The example uses the current providers, package and settings fields.
- Inject TOKEN_PYXIS_API_KEY with your enterprise secret manager and list an allowed model with Chat Completions support under models.
| API protocol | Address to enter |
|---|---|
| Chat Completions | Base URLhttps://tokenpyxis.com/v1 |
{
"$schema": "https://opencode.ai/config.json",
"providers": {
"token-pyxis": {
"package": "@opencode/ai/providers/openai-compatible",
"env": ["TOKEN_PYXIS_API_KEY"],
"settings": {
"baseURL": "https://tokenpyxis.com/v1"
},
"models": {
"YOUR_CHAT_MODEL_ID": {}
}
}
}
}Verification
Restart OpenCode, select the new provider’s model with /models, and send a short message.
Check the model, timestamp and token usage in the enterprise console logs. If the tool shows a request ID, look it up directly. See reconciliation steps
Troubleshooting
If an older client does not recognize providers, follow the configuration guide for that release. End the base URL at /v1.
