Connect Clients
Stravia's Connect clients page (/connect) generates configuration patches for 12 built-in client integrations, code snippets for 4 open protocols (OpenAI Chat Completions, OpenAI Responses, Anthropic Messages, and Google Gemini), and an MCP tab for the built-in /mcp endpoint.

Prerequisites
- At least one enabled route: Only enabled
inferenceandimage_generationroutes appear for client selection (web_search-only routes are excluded). - An active API key: The key must be enabled, unexpired, and authorized for at least one eligible model.
Supported clients (12 built-in)
The Clients tab lists tools in this exact order:
| Client | Protocol | Target global config file(s) | Thinking export |
|---|---|---|---|
Codex (codex-cli) | Open Responses | $CODEX_HOME/config.toml (~/.codex/config.toml) | off → none; default off → null |
ChatGPT (chatgpt) | Open Responses | $CODEX_HOME/config.toml + stravia-models.json | Same catalog serialization as Codex |
Claude Code (claude-code) | Anthropic Messages | $CLAUDE_CONFIG_DIR/settings.json (~/.claude/settings.json) | Not exported |
OpenCode (opencode) | Open Responses | ~/.config/opencode/opencode.json (XDG) | reasoning: true, variants, options.reasoningEffort |
OpenClaw (openclaw) | OpenAI Compatible | $OPENCLAW_STATE_DIR/openclaw.json | Not exported |
Hermes Agent (hermes-agent) | OpenAI Compatible | $HERMES_HOME/config.yaml + .env | Not exported |
TRAE (trae) | OpenAI Compatible | ~/.config/trae/trae_config.yaml (XDG) | Provider block only (no model list) |
WorkBuddy (workbuddy) | OpenAI Compatible | ~/.workbuddy/models.json | reasoning.supportedEfforts (non-off only) |
ZCode (zcode) | OpenAI Compatible | ~/.zcode/v2/config.json | Not exported |
DeepSeek Harness (deepseek-harness) | Open Responses (openai-responses) | $DSH_HOME/cordis.patch.yml + .credentials.yaml | reasoningEfforts (off → "none"; omitted if non-reasoning or off-only) |
Pi (pi) | Open Responses | ~/.pi/agent/models.json (PI_CODING_AGENT_DIR) | reasoning boolean only |
OMP (omp) | Open Responses | ~/.omp/agent/models.yml | thinking.mode: effort, efforts, defaultLevel |
- Stravia Desktop reads your existing global config, updates only the Stravia provider block (staging and backing up on failure), and exposes Write configuration (or Write both files for ChatGPT). It does not overwrite unrelated user settings or write project-local configs.
- Stravia Server cannot access your local filesystem; it generates portable preview snippets for you to copy manually.
Codex vs. ChatGPT (shared CODEX_HOME)
Both Codex and ChatGPT update [model_providers.stravia] inside $CODEX_HOME/config.toml with wire_api = "responses", supports_websockets = true, and—when every eligible inference/image route supports it—[model_providers.stravia.capabilities] remote_compaction = "v2".
| Mode | Catalog source | Files written | When to re-apply |
|---|---|---|---|
| Codex | Live HTTP endpoint model_catalog_url = "<host>/codex/models" | config.toml only (removes top-level model_catalog_json; preserves existing stravia-models.json) | Only when switching back from static mode or changing key/host |
| ChatGPT | Static JSON file model_catalog_json → stravia-models.json | config.toml + stravia-models.json | Whenever authorized models or capabilities change |
Neither mode overwrites your top-level model or web_search settings. If your API key is not authorized for Stravia web search and you want to disable Codex search, set web_search = "disabled" at the top level of config.toml before the first table header.
Steps
- Open Setup → Connect clients and stay on the Clients tab.
- Select your tool and API key. Stravia automatically scopes exported models to the key's allowlist (or all eligible models if the key has an empty allowlist).
- For Claude Code, map all four role slots (
ANTHROPIC_MODEL,Haiku,Sonnet,Opus) from your key's allowed models. - If your API key enables
transparent_injection_enabledwithmedia_understanding, clients that read capability flags (such as OpenCode, OMP, Pi, WorkBuddy, ZCode, Codex) also advertise image input support.
- For Claude Code, map all four role slots (
- Apply the configuration:
- On Desktop, click Write configuration (or Write both files for ChatGPT) and restart the target client.
- On Server, copy each generated snippet into the shown global config path (for ChatGPT, copy the TOML and JSON sections separately without the
#path headers).
- Use the Code or MCP tab for SDKs and MCP clients:
- Switch to Code, choose a protocol (
OpenAI Chat Completions,OpenAI Responses,Anthropic Messages, orGoogle Gemini), pick aModel ID, and copy the Python, TypeScript, or cURL snippet. - Switch to MCP to view the built-in
/mcpendpoint URL, verify whether the selected API key has MCP access enabled (with a direct Edit MCP access link when disabled), and copy ready-to-usemcpServersJSON orcURLsnippets. - Active tab selection is preserved in the URL (
?tab=codeor?tab=mcp; omitted for the defaultclitab).
- Switch to Code, choose a protocol (
# Example OpenAI Responses call (streaming SSE)
curl http://127.0.0.1:23471/v1/responses \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-stravia-demo-not-a-real-key" \
-d '{"model":"my-model","stream":true,"input":"Summarize today'\''s changes."}' Verify
Send one prompt from the connected client (or run the cURL snippet), then open Monitor → Request history and confirm a Completed interaction card appears under the selected API key and Model ID.
Troubleshooting
- Client reports model not found (
404) or empty model list: Confirm the route is enabled, itspurposeisinference(orimage_generationfor image routes), and your API key allows that model. For ChatGPT, re-exportstravia-models.jsonand restart the app. - Codex returns
403during chat: Codex requested hosted web search while Stravia web search was disabled or unauthorized for that key. Either enable web search injection on the key or setweb_search = "disabled"inconfig.toml. - Desktop write fails with parse error: Fix syntax errors in the existing target config file (
config.toml,settings.json,opencode.json, etc.)—Stravia refuses to overwrite malformed files.
Next
- API & Protocol Compatibility — inspect exact endpoint paths, WebSocket
/v1/responses, HTTP compression (gzip/br/zstd), and removed endpoints. - API Keys, Spend Limits & Access — enable MCP or transparent tool injection (
web_search,media_understanding,history_recall) per key.