Connect an OpenAI-compat agent to the gateway
Paste Base URL + virtual key into any OpenAI-compatible BYO agent. Not for Cursor/Claude/Codex plan logins.
Prompt#
Point my OpenAI-compatible agent (OpenClaude, Command Code, Cursor BYOK, …) at Orchemax so it uses my OpenRouter / Groq API keys with rotation. (I am not on a Cursor / Claude / Codex plan for this seat.)
What the Chair does#
Nothing — this one is yours. There is no MCP tool for it: you paste env into the agent's own settings once from a human terminal.
CLI#
orch gateway # start the gateway first
orch gateway connect # or: connect openai / openclaude / …
orch gateway status
connect prints the OpenAI-compat block (aliases like openclaude do the same).
Orchemax does not write per-CLI settings files for hundreds of agents — only
connect opencode --allow-user-scope optionally writes OpenCode's JSON layout.
Paste into the agent:
- Base URL →
http://127.0.0.1:8788/v1 - Models →
GET http://127.0.0.1:8788/v1/models(pick a liveorchemax/…id) - API key → prefer not pasting into OpenClaude
settings.jsonwhen you launch withorch openclaude— Orchemax injects a sessionorch_wk_…key. A pastedorch_gk_…in settings overwrites that env and Free (concurrent=1) denies the seat's own chat as a fake "quota exhausted". For bareopenclaude(withoutorch), paste the printedorch_gk_…into the profile/provider UI instead.
Expected response#
Exports for OPENAI_BASE_URL / OPENAI_API_KEY (and comments for GUI agents).
Restart the agent (or open a new session) after pasting.
Gotchas#
- Account seats stay on plan login. Cursor subscription, Claude Code plan,
and Codex keep their vendor login — do not run
gateway connectfor those. - Two protocols only. OpenAI-compat (
connect/openai) vs Anthropic Messages (connect anthropic). Unknown agent names default to OpenAI-compat. - Keys stay in machine-home
keys.env. Only the virtualorch_gk_…is pasted into the agent. - OpenClaude: do not pin
OPENAI_MODELinsettings.env. That value Object.assign's over the UI picker (e.g. always snaps back toorchemax/pareto). Put the choice in the top-levelmodelfield only; keepOPENAI_BASE_URLinenv. See Common seat tune-ups. - OpenClaude skills live under
.openclaude/skills/, not.claude/.orch openclaudeseedsorch-chair/orch-workerthere on launch. Optional user copy:orch chair install --target openclaude --scope user --allow-user-scope.