Error codes

Fire Mission preserves the upstream provider's error envelope shape — OpenAI on /v1/chat/completions, /v1/embeddings, /v1/models; Anthropic on /v1/messages. Inside that envelope, error.code may be one of the Fire Mission-specific codes below.

Envelope shapes

OpenAI surface:

{ "error": { "message": "...", "type": "...", "code": "...", "param": null } }

Anthropic surface:

{ "type": "error", "error": { "type": "...", "message": "..." } }

Fire Mission codes

CodeHTTPSurfaceMeaningRemediation
monthly_cap_exceeded429bothFree-tier monthly call cap reached.Upgrade at /pricing for unlimited calls.
spend_cap_exceeded429bothPer-key daily spend cap reached.Raise the cap in the dashboard or wait for the UTC day rollover.
spend_cap_unavailable503bothSpend cap is enforced but the tally service is temporarily unavailable.Retry shortly. Fail-closed by design — no uncapped traffic.
rate_limit_exceeded429bothPer-key burst rate limit exceeded.Back off and retry with exponential jitter.
provider_blocked403bothProvider blocked by US-compliance / supply-chain policy.Configure a different BYOK provider on the supply-chain whitelist.
security_violation400bothPII, prompt-injection, or API-key-leakage detected in the request.Sanitize the input. Categorical detection codes only — no matched substrings are ever returned or logged.
model_substitution_detected502bothThe responding model id did not match the requested model.Switch to a verified provider or contact support.
model_not_found400bothNo configured BYOK provider can serve the requested model.Configure a provider that supplies the model in the dashboard.
wrong_endpoint400bothThe model is served on a different endpoint (e.g. Claude on /v1/messages).Use the SDK that matches the model family, or call the right endpoint directly.
moe_routing_failed503bothMoE routing could not produce a viable decision.Drop the `x-fm-route` header to bypass MoE, or pick a specific model.
moe_routing_unavailable503anthropicMoE produced a non-Anthropic-shape model on the /v1/messages surface.Constrain MoE to Anthropic-shape providers or use /v1/chat/completions.

Standard upstream codes

Anything not in the table above is a pass-through from the upstream provider (e.g. OpenAI's insufficient_quota, Anthropic's overloaded_error). These reach you unchanged.