Working configs for Cursor, Claude Code, Codex CLI, Cline, Zed, Continue, OpenCode, Kilo Code and Hermes — and the undocumented traps that silently break each one.
Every one of these tools can talk to a custom API endpoint instead of the vendor's own. Almost none of them document it properly, and most have at least one quirk that makes a correct-looking config fail with no error message at all.
This repo is the notes I wish existed: one working config per tool, and the specific thing that wastes your afternoon.
| Tool | Config file | The setting that matters | The trap |
|---|---|---|---|
| Claude Code | env vars / .claude/settings.json |
ANTHROPIC_BASE_URL |
URL must not end in /v1 |
| Codex CLI | ~/.codex/config.toml |
wire_api = "responses" |
leftover OpenAI login silently wins |
| Cursor | Settings → Models | OpenAI base URL override | BYOK is blocked on the Free plan |
| Cline / Roo | extension settings | OpenAI Compatible provider | images aren't forwarded |
| Zed | settings.json |
language_models.openai_compatible |
key goes in the keychain, not the file |
| Continue | config.yaml |
provider: openai + apiBase |
there is no custom provider |
| OpenCode | opencode.json |
npm: "@ai-sdk/openai-compatible" |
provider needs an explicit npm package |
| Kilo Code | extension settings | OpenAI Compatible provider | images aren't forwarded |
| Hermes | ~/.hermes/config.yaml |
model.provider custom |
— |
Full list of traps with explanations: TROUBLESHOOTING.md
1. ANTHROPIC_BASE_URL takes no /v1.
The Anthropic SDK appends /v1/messages itself. Add /v1 and you get /v1/v1/messages → 404 "Invalid URL". Every OpenAI-compatible client wants /v1; Claude Code is the exception. This single difference accounts for more broken setups than everything else combined.
2. Codex ignores your provider if you're still signed in to OpenAI.
No error, no warning — it just keeps spending the old account's quota. You need ~/.codex/auth.json with auth_mode: "apikey". Also: wire_api = "chat" was removed in early 2026, so guides telling you to switch to it are stale, and the provider id can't be openai, ollama or lmstudio — those are reserved.
3. Cursor Free blocks custom keys entirely. Not "some models" — all of them, any prefix. It's a plan restriction introduced in 2026, not a misconfiguration. Pro works, or use Cline instead.
4. Zed doesn't read the API key from settings.json.
Keys live in the system keychain. The env var name is derived from the provider id you chose: cheapai → CHEAPAI_API_KEY. Rename the provider, and the variable name changes with it.
5. Continue has no "custom" provider.
You write provider: openai and point apiBase wherever you want. Also it moved from config.json to config.yaml — the JSON examples still all over the web no longer apply.
The configs use https://cheapai.io/v1 as a concrete, working endpoint so you can copy-paste and see it run. It's an OpenAI-compatible gateway that serves Claude, GPT, Gemini and Grok on one key — model list and prices.
Swap the base URL for any other OpenAI-compatible endpoint and everything here still applies. Nothing in these configs is specific to one provider.
Longer setup walkthroughs with screenshots live in the gateway's own docs if you'd rather follow those.
Found another trap, or a tool that belongs here? Open an issue or a PR. Especially interested in:
- tools not yet covered (Aider, Goose, Windsurf, Amp)
- version-specific breakage — "worked in 1.2, broke in 1.3"
- Windows-specific quirks (most of this was written on macOS)
MIT — see LICENSE. Copy the configs anywhere, no attribution needed.