OpenCode & ChatGPT passthrough
Inspect OpenCode traffic while using a ChatGPT subscription through llama-dash.
Route OpenCode's OpenAI provider through llama-dash to log and inspect ChatGPT subscription requests. OpenCode keeps ownership of the subscription OAuth bearer; llama-dash preserves it while forwarding requests to the ChatGPT Codex backend.
Client config
Connect OpenCode to OpenAI with its ChatGPT subscription first. Then set the OpenAI provider base URL in ~/.config/opencode/opencode.jsonc:
{
"provider": {
"openai": {
"options": {
"baseURL": "https://<llama-dash-host>/v1"
},
}
}
}Restart OpenCode after changing its config:
opencode2 service restartDo not set an OpenAI API key for this flow. OpenCode supplies its subscription credentials, and llama-dash forwards them unchanged.
Routing rule
In Policies, add a first-match routing rule for the OpenAI Responses API:
- Match endpoint
/v1/responses. - Match the exact OpenCode model IDs you use, such as
gpt-5.6-terra,gpt-5.6-luna, andgpt-5.6-sol. - Set action to
continue. - Set auth mode to
passthroughand preserve the clientAuthorizationheader. - Set direct target to
https://chatgpt.com/backend-api/codex.
Do not leave Requested model empty. Other OpenAI-compatible clients can use /v1/responses; exact model matching limits this rule to the selected OpenCode models.
The resulting requests remain visible in Requests, including routing metadata, the redacted authorization header, and OpenCode attribution.
Last updated on