Skip to content
Skip to article
Docs Troubleshooting & FAQ
Browse docs
On this page
View as Markdown

Troubleshooting & FAQ

Start with the HTTP status and the endpoint your client called. If the request reached a provider, open its Trace to find the first failing attempt. The same status can have different causes on the proxy and on the MCP endpoint.

Connection and authentication

401 Invalid API key

Open Connect your app → Check your URL and key and run the command in the same environment as your app. A 200 confirms that the router slug and key work together. If you get 401, set DODO_ROUTER_API_KEY to an active key for the router in the URL. Create a key under API Keys if you no longer have the secret. The key entered on Providers is for the upstream service. Provider keys and router keys.

404 at /v1/v1/messages

Set the Anthropic SDK base URL to the router root, for example https://api.dodorouter.com/r/my-agent. The SDK adds /v1/messages when you call messages.create. For a cURL request, use the complete path. SDK base URLs.

402 Payment Required

Hosted service only: the account owning this router doesn't have an active subscription. Visit Billing to subscribe. Doesn't apply to self-hosted instances unless you've configured Stripe billing yourself.

"No routing configured for router '…'"

The router has zero routing steps. Add at least one on the router's page under Routing Chain.

"Choose a key for this provider and plan"

Open the step under Routing Chain. The key picker lists credentials for that provider and plan. For a z.ai or Moonshot coding step, add a coding subscription key on Providers, or edit the step to use the standard API with a standard key. If an older step already has a mismatched key, Router setup points to the assignment that needs attention.

"Failed to store API key securely" when adding a provider key

Self-hosted only: INFISICAL_TOKEN / INFISICAL_PROJECT_ID aren't set or are invalid. See the callout in Self-hosting.

Request and provider errors

Audio requests fail during setup

For Gemini Live, set the Google Gen AI SDK base URL to the router root, use API version v1beta and supply the router key to the SDK. Check that a Google routing step has an AI Studio key with access to the configured Live model. On a raw WebSocket, send one setup message and wait for setupComplete before streaming audio. Gemini Live setup.

For gpt-realtime-2.1, use the router’s /v1/realtime WebSocket URL. HTTP 426 means the server needs a WebSocket upgrade. HTTP 400 can mean the chain lacks an eligible OpenAI Realtime step, or that the request supplied an unsupported option such as an idempotency key. If the socket opens and reports upstream_unavailable, check the provider key and the model access on each eligible step. Realtime setup.

For a WAV or MP3 sent to /v1/chat/completions, choose a Chat Completions audio model such as gpt-audio-1.5. An unsupported_chat_audio error means the routing chain has no step that can carry this request in Chat Completions format. Audio request example.

How do I find the request behind a failure on the dashboard?

In Router overview, choose the router and time window, then select Failed under Request outcomes. Open a request to see its Trace and inspect the response from each attempted provider. Choose Recovered by fallback to investigate requests that reached the client after an earlier attempt failed. Back restores the filtered list. Dashboard guide.

502 "All providers failed"

The router could not return a successful response. Open the request's Trace in Logs and read the error on each attempted step. A provider authentication error points to the key on that step. A rate limit points to that provider's quota. If streaming has already begun, the client may receive an error event inside an HTTP 200 response. API errors.

400 "Input exceeds context window of this model"

A provider reported that the request exceeded its model's context window. Open the request's Trace to see which steps ran. Shorten the input or choose a model with a larger window. To let a larger model handle an overflow automatically, add it as a fallback and turn off Skip fallback on context overflow. Routing and fallback.

400 when tagging an application user

Send a single X-Dodo-User-Id header containing a nonblank UTF-8 ID of at most 255 bytes without control characters. End-user attribution.

A routing step shows "invalid" or "out of credits" next to its assigned key

DodoRouter tracks key health from real dispatch outcomes. Fix or replace the key on the Providers page; the warning links straight there.

Internal proxy exception in a fallback step

An Internal proxy exception means DodoRouter crashed while executing that step; it is not an error response from the provider. The Trace keeps earlier attempts and their errors, then identifies the provider and model of the step that crashed. For example, an OpenAI authentication failure followed by an Anthropic conversion exception appears as two separate attempts.

If no outbound body was recorded, the log cannot establish whether that step sent a request. It does not claim the request passed through unchanged.

Older crash logs may show only one attempt labeled with the first provider, even when a later step crashed. Those records lost the earlier attempt history; the fix cannot reconstruct it. Use server logs and the request ID to recover the original sequence when available.

Do I need to send a real model name?

No — see The model field is ignored. DodoRouter always uses the model configured on the routing step it's attempting.

Agent access and OAuth

401 on /mcp, even with a valid router key

The MCP endpoint doesn't take a router API key at all — that key sends traffic, and reading traffic back is a separate grant. Connect the agent over OAuth instead: claude mcp add --transport http dodorouter {base_url}/mcp, then approve it in the browser. See Agent access.

Claude cannot register with DodoRouter's sign-in service

For a Claude custom connector, use https://api.dodorouter.com/mcp, Sign in now, and Register automatically, with no request headers.

Earlier server releases advertised the OAuth client authentication method client_secret_post but returned 400 invalid_client_metadata when Claude registered with it. They also stored issued client-secret hashes outside the field used by token authentication, so a registered confidential client could receive invalid_client during token exchange.

Update DodoRouter, then remove and re-add the connector to get a fresh client registration. Changing the sign-in timing alone does not resolve this server bug. A router's proxy API key is not an OAuth client ID or secret. See the connection settings.

Cache usage

Why did my prompt cache stop hitting?

Open the diverging request's Cache evidence or read get_log.cache_diagnosis through MCP. prefix_changed names the first changed component and one-based item index (tools, system prompt, or conversation message); breakpoint changes are reported separately. The signatures contain no prompt text or tool names and survive body truncation/removal. They identify a structural change, not a proven provider cache invalidation.

With an unchanged shared prefix, cache_expired means the gap exceeded a uniform, explicitly requested TTL (likely); parallel_race means the compared request overlapped this one (possible). provider_no_hit means zero reported cache-read tokens with no structural difference found, not a confirmed provider defect. unknown covers missing baselines, routing changes, and parameter changes whose cache effects are unknown. Missing cache usage is unreported, never an assumed zero.

The comparison sees only completed logs available when this row was written. It cannot see provider shards, exact expiry, all concurrent requests, or external traffic; it does not invent a different_shard diagnosis. Mixed or omitted TTLs do not establish an expiry. Concurrent or forked traffic sharing a session may compare unrelated turns; diagnostics use only the session ID the client already supplies. Sessionless global prefix lookup and exact token-offset localization are not included.

Codex shows zero cache reads while Dodo's logs show hits

Earlier Responses egress returned only input/output/total tokens, dropping input_tokens_details.cached_tokens. It also omitted output reasoning details. The formatter now restores both detail objects. Update DodoRouter if the final response.completed usage omits details present in the provider's usage.

Coding client and tool history errors

OpenClaw reports an incomplete or malformed tool call through Codex

Earlier DodoRouter versions could return parallel tool calls with empty arguments even when Codex supplied valid JSON. The Codex backend sometimes sends the entire argument string in response.function_call_arguments.done without any argument deltas; the old converter ignored that event.

Update DodoRouter. The Responses adapter now recovers arguments from completion events and item snapshots, sending only bytes that have not already reached the client. A request marked successful or fallback in an older log can still contain empty tool arguments: the stored response is already converted, not the provider's raw stream. Upgrading the client alone does not fix this conversion bug.

Tool continuation fails with messages[3].role is required

Earlier DodoRouter versions passed Responses function_call and function_call_output items into Chat Completions message sanitization, which erased the call arguments and result instead of translating them. A first turn could succeed while returning a tool error for repair failed immediately. Update DodoRouter: function calls, text tool results, function definitions and named tool choices are now translated per routing attempt.

An attempt reporting unsupported_responses_item contains a native item that cannot be translated for that route. Its error names the item type and field; no provider request is sent for that attempt. Configure a Responses-format provider for reasoning items, built-in tools, additional_tools or non-text tool outputs. Do not remove required history to suppress the error.

Codex resume: content[0].text received an array

Earlier Responses conversion wrapped structured assistant output blocks inside output_text.text, which must be a string. Assistant content arrays now remain arrays of blocks. This fixes a case where a single-turn smoke test passed but the next turn of the same session failed.

Codex Responses-Lite requires reasoning.context to be all_turns

Earlier Responses ingress kept only the client's reasoning effort, losing context while forwarding the Responses-Lite header. The full client reasoning object now survives conversion. Update DodoRouter if this field disappears between the incoming and outbound requests; do not strip the header or hardcode context as a workaround. Provider-default routing does not erase client settings.

Codex: input[0].content is null

Earlier DodoRouter versions treated Codex's additional_tools input item as a normal developer message, replacing its type and tools with content: null. The Responses conversion now preserves non-message typed input items. If the outbound request shows this corruption, update DodoRouter; do not work around it by deleting the client's tools or inserting empty text.

Inspect each attempt in the request's Trace: the last fallback's error can be different from the initial provider's rejection. A final developer-role error does not explain an earlier Responses invalid_type error. A fallback to a different API format may still be incompatible with native Responses items.