Back to Blog

The LLM API Error Reference — Exact Error Strings, Causes, and Fixes (2026)

2026-08-26·6 min read·CodeRouter Team

TL;DR — Bookmark page: real LLM API errors indexed by their exact error strings, because that is how you search when things break at 2am. Each entry: the verbatim message → what it actually means → the fix, with a deep-dive link. Maintained as new errors surface (latest additions: 2026-09 — OpenAI quota/context/model/auth, Anthropic billing/529/context, Gemini 429, local-model connection refused). If you hit an error that is not here, that is a gap we want to know about.

DeepSeek — thinking mode & reasoning_content family

The most-hit error family of 2026, caused by DeepSeek's contract that thinking traces must round-trip in tool-calling conversations.

Exact error Meaning Fix
The reasoning_content in the thinking mode must be passed back to the api (HTTP 400) Your client/proxy dropped the thinking block when replaying history with tool calls Full fix — 3 approaches
cc switch local proxy failed while handling codex endpoint /responses ... upstream_status: http 400 cc-switch's API-shape translation strips reasoning_content before forwarding to DeepSeek Proxy-layer fix
deepseek returned tool calls without replayable thinking content; continuing with degraded reasoning Defensive client stripped thinking mode after the trace went missing — silent quality loss, not a crash Restore the round-trip
LangChain agent loops → same 400 on second tool step Memory class rebuilt messages without additional_kwargs LangChain-specific fix

Background on why Chinese providers' thinking modes differ: the thinking-mode API trap guide.

OpenAI — quota & context family

Exact error Meaning Fix
You exceeded your current quota, please check your plan and billing details. (HTTP 429, insufficient_quota) Billing problem in a 429 costume — no API credit/payment on the account, not a rate limit; retrying never helps Quota vs rate limit + billing fix
This model's maximum context length is N tokens. However, your messages resulted in M tokens. (HTTP 400, context_length_exceeded) Input + max_tokens overflowed the context window — deterministic, hits agents mid-session as history grows Five fixes ranked
Rate limit reached for ... (HTTP 429, rate_limit_error) Genuine per-minute rate limit — the retryable 429, unlike insufficient_quota The distinction table
The model \X` does not exist or you do not have access to it.(HTTP 404,model_not_found`) Not usually a typo — org access, wrong project, retired snapshot name, or wrong endpoint for that model family Diagnose with /v1/models
Incorrect API key provided: sk-... (HTTP 401, invalid_api_key) Rarely a mistyped key — stale env var, trailing newline, revoked key, or another provider's key after a base-URL change Five causes + the one-line check

Claude Code & Anthropic endpoints

Exact symptom Meaning Fix
HTTP 401 immediately after setting a custom base URL Two env vars fighting: an old provider key variable wins over your new config The double-env-var 401
Your credit balance is too low to access the Anthropic API. Please go to Plans & Billing... (HTTP 400) Prepaid API credits at zero — or Claude Code silently using an API key when you meant subscription login Billing + the Claude Code key/login mixup
{"type":"overloaded_error","message":"Overloaded"} (HTTP 529) Provider-side saturation, not your account — backoff with jitter, failover if persistent 529 vs 429 vs 500 + retry strategy
prompt is too long: N tokens > M maximum (HTTP 400) Context window exceeded — counts system prompt, history, tool definitions, tool results and images, not just the visible chat What counts + five fixes

Claude Code through a proxy or non-Anthropic model

The highest-value family in this reference: cryptic, cross-tool, and absent from official docs — the error names one thing while the cause is another layer.

Exact error Meaning Fix
Unknown parameter: 'output_config' (HTTP 400) Claude Code sends Anthropic-dialect fields a proxy or non-Anthropic upstream has never seen. Breaks on client update with no change on your side Where the fix can live
multiple tool_result blocks for a single tool_use id / Invalid 'input': value did not match any expected variant Translation layer broke the tool-call pairing — regenerated ids, flattened parallel calls, or reordered blocks. Fails on the step after the tool call Find the failing turn
400 on Bedrock/Vertex/proxy that names a parameter Often the anthropic-beta header, not the body — the message misdirects you Confirm in one step

Local models (Ollama / LM Studio) in IDEs

Exact symptom Meaning Fix
connect ECONNREFUSED 127.0.0.1:11434 / Connection refused on a local endpoint Nothing listening where you pointed — server down, missing /v1 suffix, wrong port, loopback-vs-container, or a cloud-side IDE feature that can never reach localhost Five causes, checked in order

Cursor & OpenAI-compatible overrides

Exact symptom Meaning Fix
Claude models vanish after overriding OpenAI base URL Cursor disables built-in models when the OpenAI endpoint is overridden — by design Override without breaking Claude
Custom model name rejected in Cursor settings Model dropdown hardcodes known names; custom endpoints need exact configured IDs Configuration guide

Google AI Studio / Gemini endpoints

Exact symptom Meaning Fix
404 Not Found on chat completions Base URL missing the /v1beta/openai/ suffix — the compatibility path is exact Endpoint setup
404 model not found with gpt-4o etc. OpenAI model names do not exist on Gemini's endpoint — use gemini-3-flash style names Same guide
401 Unauthorized with a service-account key Endpoint takes AI Studio API keys, not Vertex service-account auth Key types explained
Resource has been exhausted (e.g. check quota). (HTTP 429, RESOURCE_EXHAUSTED) One string covering RPM/TPM/daily caps — free-tier daily quota is the one backoff can't fix Which limit you hit + fixes

Why so many of these are middleware errors

A pattern worth naming: most entries above are not model bugs — they are translation-layer failures. Proxies, history stores, and framework memory classes drop provider-specific fields (thinking traces, cache markers) that the provider contract requires back. That is also the honest pitch for running traffic through infrastructure that treats those fields as first-class: what a router API should handle for you, and which models need special handling.

Contribute an error

Hit something not listed? The bar for inclusion: the exact error string, the provider/tool combination, and a reproducible cause. This reference only stays useful if it stays real.

Try phase-aware routing on your own workload

One base URL for Claude Code, Cursor or Aider. Free trial, no credit card.

Start free trial

Get weekly AI cost optimization tips

Join developers cutting their agent bills