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
| Code | HTTP | Surface | Meaning | Remediation |
|---|---|---|---|---|
monthly_cap_exceeded | 429 | both | Free-tier monthly call cap reached. | Upgrade at /pricing for unlimited calls. |
spend_cap_exceeded | 429 | both | Per-key daily spend cap reached. | Raise the cap in the dashboard or wait for the UTC day rollover. |
spend_cap_unavailable | 503 | both | Spend cap is enforced but the tally service is temporarily unavailable. | Retry shortly. Fail-closed by design — no uncapped traffic. |
rate_limit_exceeded | 429 | both | Per-key burst rate limit exceeded. | Back off and retry with exponential jitter. |
provider_blocked | 403 | both | Provider blocked by US-compliance / supply-chain policy. | Configure a different BYOK provider on the supply-chain whitelist. |
security_violation | 400 | both | PII, 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_detected | 502 | both | The responding model id did not match the requested model. | Switch to a verified provider or contact support. |
model_not_found | 400 | both | No configured BYOK provider can serve the requested model. | Configure a provider that supplies the model in the dashboard. |
wrong_endpoint | 400 | both | The 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_failed | 503 | both | MoE routing could not produce a viable decision. | Drop the `x-fm-route` header to bypass MoE, or pick a specific model. |
moe_routing_unavailable | 503 | anthropic | MoE 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.