# AI Coding Agents & Harnesses - GateLLM

> Connect Claude Code, Codex CLI, OpenClaw, Cline, Cursor, Zed, Goose, Aider and 25+ coding agents to GateLLM — each harness's base URL, config target and gotcha in one place.

Canonical: https://www.gatellm.io/coding-agents/

## AI Coding Agents & Harnesses
Point Claude Code, Codex CLI, OpenClaw, Cline, Cursor and 25+ other coding agents at the gateway the same three steps — each with its exact config target and key names.
Every AI coding agent reads a base URL and an API key from somewhere — an env var, a config file, or a settings panel. This page lists where each harness reads them from, which protocol it speaks, and the one gotcha that actually trips people up. Full copy-paste configs live in the docs.
## What to name the gateway model
Some harnesses pin their own model ID and send it verbatim. If your gateway model has a different name, the first call 404s. Two ways to align:
Name the gateway model exactly what the harness requests — zero extra config.
Or override the harness to use your gateway name via its model env var (e.g. ANTHROPIC_MODEL).
## Point any AI coding agent at the gateway
```
# Every agent is one base_url + one access key away
export ANTHROPIC_BASE_URL="https://your-gateway.gatellm.io"   # Anthropic agents: root (no /v1)
export ANTHROPIC_API_KEY="<gateway access key>"

export OPENAI_API_BASE="https://your-gateway.gatellm.io/v1"   # OpenAI-compatible agents: /v1
export OPENAI_API_KEY="<gateway access key>"

# Codex CLI (~/.codex/config.toml) speaks the Responses protocol
# [model_providers.gatellm]
# base_url = "https://your-gateway.gatellm.io/v1"
# wire_api = "responses"
```
### `Authorization: Bearer <key>`
- SDK / framework: OpenAI · DashScope · generic
- Bearer prefix case-insensitive

### `x-api-key: <key>`
- SDK / framework: Anthropic SDK
- Authorization also accepted

### `x-goog-api-key: <key>`
- SDK / framework: Gemini SDK
- Authorization also accepted

## Harness compatibility matrix

### Terminal agents
Claude Code, Codex CLI, Gemini CLI, OpenClaw, opencode, Crush, Droid, Goose, Aider, Qwen Code, OpenHands, Kimi Code, Plandex, SWE-agent, Grok Build, Mistral Vibe, MiMo Code, ForgeCode, Codebuff
| Harness | Protocol | Support | Config target | Key names / settings | Docs |
| --- | --- | --- | --- | --- | --- |
| Claude Code | Anthropic | Native | env vars | ANTHROPIC_BASE_URL, ANTHROPIC_API_KEY, ANTHROPIC_MODEL | https://docs.gatellm.io/en/quickstart/claude-code-via-gateway |
| Codex CLI | OpenAI Responses | Native | ~/.codex/config.toml | base_url, env_key, wire_api | https://docs.gatellm.io/en/reference/clients-and-gateway-diffs |
| Gemini CLI | Gemini | Native | env vars | GOOGLE_GEMINI_BASE_URL, GEMINI_API_KEY | https://docs.gatellm.io/en/reference/clients-and-gateway-diffs |
| OpenClaw | OpenAI / Anthropic-compatible | OpenAI-compatible | openclaw.json | models.providers.<id>.baseUrl, models.providers.<id>.apiKey | https://docs.gatellm.io/en/quickstart/anthropic-interop |
| opencode | OpenAI-compatible | OpenAI-compatible | opencode.json | provider.<id>.options.baseURL | https://docs.gatellm.io/en/quickstart/openai-compatible |
| Crush | OpenAI / Anthropic-compatible | OpenAI-compatible | crush.json | providers.<id>.base_url, providers.<id>.type | https://docs.gatellm.io/en/quickstart/openai-compatible |
| Factory Droid | OpenAI / Anthropic-compatible | OpenAI-compatible | ~/.factory/settings.json | customModels[].baseUrl, customModels[].provider | https://docs.gatellm.io/en/quickstart/openai-compatible |
| Goose | OpenAI-compatible | OpenAI-compatible | env vars | OPENAI_HOST, OPENAI_BASE_PATH, OPENAI_API_KEY | https://docs.gatellm.io/en/quickstart/openai-compatible |
| Aider | OpenAI-compatible (LiteLLM) | OpenAI-compatible | env vars | OPENAI_API_BASE | https://docs.gatellm.io/en/quickstart/openai-compatible |
| Qwen Code | OpenAI-compatible | OpenAI-compatible | env vars | OPENAI_BASE_URL, OPENAI_API_KEY, OPENAI_MODEL | https://docs.gatellm.io/en/quickstart/openai-compatible |
| OpenHands | OpenAI-compatible (LiteLLM) | OpenAI-compatible | ~/.openhands/settings.json | base_url, model openai/ prefix | https://docs.gatellm.io/en/quickstart/openai-compatible |
| Kimi Code CLI | OpenAI / Anthropic | OpenAI-compatible | config.toml | providers | https://docs.gatellm.io/en/quickstart/openai-compatible |
| Plandex | OpenAI-compatible | OpenAI-compatible | custom models JSON | baseUrl | https://docs.gatellm.io/en/quickstart/openai-compatible |
| SWE-agent | OpenAI-compatible (LiteLLM) | OpenAI-compatible | env vars | OPENAI_BASE_URL | https://docs.gatellm.io/en/quickstart/openai-compatible |
| Grok Build | OpenAI-compatible | OpenAI-compatible | config.toml | custom models | https://docs.gatellm.io/en/quickstart/openai-compatible |
| Mistral Vibe | OpenAI-compatible | OpenAI-compatible | ~/.vibe/config.toml | providers | https://docs.gatellm.io/en/quickstart/openai-compatible |
| MiMo Code | OpenAI-compatible | OpenAI-compatible | /connect custom provider | base URL, API key | https://docs.gatellm.io/en/quickstart/openai-compatible |
| ForgeCode | OpenAI / Anthropic | OpenAI-compatible | setup wizard | base URL | https://docs.gatellm.io/en/quickstart/openai-compatible |
| Codebuff | OpenAI-compatible | OpenAI-compatible | settings | base URL, API key | https://docs.gatellm.io/en/quickstart/openai-compatible |

### IDEs & extensions
Cline, Roo Code, Kilo Code, Continue, Zed, Cursor, Windsurf, GitHub Copilot (BYOK)
| Harness | Protocol | Support | Config target | Key names / settings | Docs |
| --- | --- | --- | --- | --- | --- |
| Cline | OpenAI-compatible | OpenAI-compatible | Settings → OpenAI Compatible | Base URL, API Key, Model ID | https://docs.gatellm.io/en/quickstart/openai-compatible |
| Roo Code | OpenAI-compatible | OpenAI-compatible | Settings → OpenAI Compatible | Base URL, API Key, Model ID | https://docs.gatellm.io/en/quickstart/openai-compatible |
| Kilo Code | OpenAI-compatible | OpenAI-compatible | Settings → OpenAI Compatible | Base URL, API Key, Model ID | https://docs.gatellm.io/en/quickstart/openai-compatible |
| Continue | OpenAI-compatible | OpenAI-compatible | config.yaml | models[].apiBase | https://docs.gatellm.io/en/quickstart/openai-compatible |
| Zed | OpenAI-compatible | OpenAI-compatible | settings.json | language_models.openai_compatible.<id>.api_url | https://docs.gatellm.io/en/quickstart/openai-compatible |
| Cursor | OpenAI | Partial | Settings → Models → Override OpenAI Base URL | Override OpenAI Base URL | https://docs.gatellm.io/en/quickstart/openai-compatible |
| Windsurf | OpenAI-compatible | OpenAI-compatible | Settings → Models → BYOK / custom | Base URL, API Key | https://docs.gatellm.io/en/quickstart/openai-compatible |
| GitHub Copilot (BYOK) | OpenAI-compatible | OpenAI-compatible | Manage Models → OpenAI-compatible | Base URL, API Key | https://docs.gatellm.io/en/quickstart/openai-compatible |

### Managed platforms
Warp (BYOK keys only), Amazon Q Developer CLI, Devin — endpoint fixed or not overridable
| Harness | Protocol | Support | Config target | Key names / settings | Docs |
| --- | --- | --- | --- | --- | --- |
| Warp | OpenAI / Anthropic / Gemini (BYOK) | Partial | Settings → BYOK | BYOK API keys | https://docs.gatellm.io/en/reference/supported-models-and-sdks |
| Amazon Q Developer CLI | MCP | No custom endpoint | MCP server | — | https://docs.gatellm.io/en/reference/supported-models-and-sdks |
| Devin | — | No custom endpoint | — | — | https://docs.gatellm.io/en/reference/supported-models-and-sdks |

## Gotchas
### The harness pins its own model ID
Claude Code sends its configured default (e.g. claude-opus-5 or claude-sonnet-5) — not your gateway name. Either name the gateway model exactly what the harness requests, or set its model env var (e.g. ANTHROPIC_MODEL) to your gateway name. Mismatch → 404 model_not_found on the first message.

### Anthropic-protocol harnesses take the root, not /v1
The base URL for Anthropic-style clients goes to the gateway root (no /v1) — the client appends /v1/messages itself. Adding /v1 here double-stacks the path segment.

### Codex custom providers need wire_api="responses"
Codex CLI requires wire_api = "responses" for a custom [model_providers.*] block. The gateway implements /v1/responses natively — point base_url at it and set env_key to a gateway access key.

### LiteLLM-based harnesses want an openai/ model prefix
Aider, OpenHands and SWE-agent sit on LiteLLM: set OPENAI_API_BASE to the gateway and give the model an openai/ prefix (e.g. openai/gateway-model-name) so LiteLLM routes it as an OpenAI-compatible endpoint.

### Default is subscription OAuth, not your key
Codex, Gemini CLI and Qwen Code default to the vendor's OAuth / subscription login. To route through the gateway you must switch to API-key auth (set the key + base URL explicitly) — otherwise the agent bypasses the gateway entirely.

### IDEs infer tool/vision support from the model ID
Cline / Roo / Kilo and others decide tool-calling and vision capability from the model name. A custom gateway name may disable function calling — if tool calls fail, check the client's capability-detection rules or name the model to match a known family.

### Long inference adds :keep-alive and _gateway_warning
During long upstream inference the gateway emits SSE :keep-alive comment lines (harmless — skip lines starting with :), and on a mid-stream break it inserts a _gateway_warning field instead of erroring, so harnesses like Claude Code don't abort the whole conversation.

### Claude Code auto mode: decide who answers the safety verdict
In auto mode, Claude Code waits for a server-side verdict (a safeguards field in the request) before a potentially dangerous action. When the upstream is official Anthropic, the verdict is produced inside that same request and the gateway passes it through untouched. When the upstream is a third party that ignores the field, the gateway answers instead — and the shipped default (allow_all) releases every action, which is more permissive than leaving the call alone. Hand a route back to its upstream by writing "anthropic_server_safeguards": "upstream" in that upstream's extra_config; the console setting is admin-only.

## FAQ
### Can I use Claude Code through GateLLM?
Yes — set ANTHROPIC_BASE_URL to the gateway root (no /v1) and ANTHROPIC_API_KEY to a gateway access key. Name the gateway model exactly the ID Claude Code requests (e.g. claude-opus-5 or claude-sonnet-5), or align via ANTHROPIC_MODEL.
### How do I point Codex CLI at the gateway?
In ~/.codex/config.toml, add a [model_providers.<id>] block with base_url = "https://your-gateway.gatellm.io/v1", env_key pointing at your access-key env var, and wire_api = "responses" — the gateway implements /v1/responses natively.
### Which coding agents can't use a custom endpoint?
Hosted platforms like Devin and Amazon Q Developer CLI don't expose a custom base URL, so you can't route them through the gateway. Warp supports BYOK keys but fixes the endpoint to the official providers. Everything else here takes a base-URL override.
### Do IDE extensions (Cline / Roo / Kilo) work?
Yes — pick the "OpenAI Compatible" provider in settings, paste the gateway /v1 URL + access key + model name. Watch for capability detection: some infer tool-calling from the model ID.
### Why does the model name matter so much?
Harnesses send a fixed model ID — either their own default or your configured name. The gateway routes by that exact string, so a mismatch is a 404 model_not_found, not a typo you can ignore.
### What about LiteLLM-based agents (Aider / OpenHands / SWE-agent)?
They read OPENAI_API_BASE and want an openai/ prefix on the model name so LiteLLM treats the gateway as an OpenAI-compatible endpoint.

## Related
- [Home](https://www.gatellm.io/index.md)
- [Pricing](https://www.gatellm.io/pricing.md)
- [Cost Calculator](https://www.gatellm.io/calculator.md)
- [About](https://www.gatellm.io/about.md)
- [Book a Demo](https://www.gatellm.io/demo.md)
- [FAQ](https://www.gatellm.io/faq.md)
- [Compare AI Gateways](https://www.gatellm.io/compare.md)
- [Compare LiteLLM](https://www.gatellm.io/compare/litellm.md)
- [Compare OpenRouter](https://www.gatellm.io/compare/openrouter.md)
- [Compare Alibaba Cloud AI Gateway](https://www.gatellm.io/compare/alibaba-cloud.md)
- [Compare Azure API Management](https://www.gatellm.io/compare/azure-apim.md)
- [Compare Apigee](https://www.gatellm.io/compare/apigee.md)
- [Compare Cloudflare AI Gateway](https://www.gatellm.io/compare/cloudflare.md)
- [Compare Kong AI Gateway](https://www.gatellm.io/compare/kong.md)
- [Compare Portkey](https://www.gatellm.io/compare/portkey.md)
- [LiteLLM vs Kong AI Gateway](https://www.gatellm.io/compare/litellm-vs-kong.md)
- [LiteLLM vs OpenRouter](https://www.gatellm.io/compare/litellm-vs-openrouter.md)
- [LiteLLM vs Portkey](https://www.gatellm.io/compare/litellm-vs-portkey.md)
- [Use Cases](https://www.gatellm.io/use-cases.md)
- [Reduce LLM Cost](https://www.gatellm.io/use-cases/reduce-cost.md)
- [High Availability](https://www.gatellm.io/use-cases/high-availability.md)
- [Multi-Tenant Isolation](https://www.gatellm.io/use-cases/multi-tenant.md)
- [Compliance & Audit](https://www.gatellm.io/use-cases/compliance-audit.md)
- [Troubleshooting by Symptom](https://www.gatellm.io/use-cases/troubleshooting.md)
- [Mixed Multi-Vendor Model Stack](https://www.gatellm.io/use-cases/mixed-model-stack.md)
- [Self-Host AI Inside Office](https://www.gatellm.io/use-cases/self-hosted-office-ai.md)
- [Token Usage Visibility & Attribution](https://www.gatellm.io/use-cases/token-ops.md)
- [Token FinOps: AI Cost Allocation & Control](https://www.gatellm.io/use-cases/token-finops.md)
- [MCP Tool Governance](https://www.gatellm.io/use-cases/mcp-tool-governance.md)
- [Web Search for Every Model](https://www.gatellm.io/use-cases/web-search-grounding.md)
- [Multi-Key Rotation & Standby](https://www.gatellm.io/use-cases/multi-key-pooling.md)
- [Admission Control for Connected Clients](https://www.gatellm.io/use-cases/client-admission-control.md)
- [Enforce Which Model Agents Actually Run](https://www.gatellm.io/use-cases/enforce-model-policy.md)
- [No Model Choice on the Client](https://www.gatellm.io/use-cases/automatic-model-tiering.md)
- [One Protocol, Any Model](https://www.gatellm.io/use-cases/one-protocol-any-model.md)
- [Office / Microsoft 365 Add-in](https://www.gatellm.io/office-addin.md)
- [Glossary](https://www.gatellm.io/glossary.md)
- [Model Catalog](https://www.gatellm.io/models.md)
- [SDK & Framework Integrations](https://www.gatellm.io/integrations.md)
- [Security & Compliance](https://www.gatellm.io/security.md)
- [Privacy Policy](https://www.gatellm.io/privacy-policy.md)
- [Terms of Service](https://www.gatellm.io/terms.md)
- [Cookie Policy](https://www.gatellm.io/cookies.md)
- [Data Processing Agreement (DPA)](https://www.gatellm.io/dpa.md)
- [Sub-processor List](https://www.gatellm.io/subprocessors.md)
- [Security Questionnaire (CAIQ/SIG/VSA)](https://www.gatellm.io/trust.md)
- [Incident Response & Support](https://www.gatellm.io/sla.md)
- [Vulnerability Disclosure Policy](https://www.gatellm.io/vulnerability-disclosure.md)
- [Open Source License Notice](https://www.gatellm.io/open-source-licenses.md)
- [Version Support & Lifecycle (EOL)](https://www.gatellm.io/lifecycle.md)
- [Engineering Blog](https://www.gatellm.io/blog.md)
- [Your Agents Have More Permissions Than Your Employees: Governing MCP Tools at the Gateway](https://www.gatellm.io/blog/mcp-tool-governance.md)
- [The $10k Invoice Problem: Five Ways to Cut LLM Spend Without Dumbing Down Your App](https://www.gatellm.io/blog/reduce-cost.md)
- [Your Vendor's List Price Is Not Your Cost: Applying Real FinOps to Token Spend](https://www.gatellm.io/blog/token-finops.md)
- [llms.txt](https://www.gatellm.io/llms.txt)
