MoE routing

Mixture-of-Experts routing lets Fire Mission pick the best model across your configured BYOK providers based on a single objective. It's opt-in — calls default to honoring whatever model id you sent.

How to engage MoE

Either of these triggers MoE on a request:

  • Send model firemission/auto.
  • Set the request header x-fm-route: cost | speed | quality | balanced.
curl https://firemission.us/v1/chat/completions \
  -H "Authorization: Bearer fm_live_..." \
  -H "x-fm-route: cost" \
  -H "Content-Type: application/json" \
  -d '{"model":"firemission/auto","messages":[{"role":"user","content":"Hi"}]}'

What MoE returns

Fire Mission rewrites body.model with the chosen model id, runs the full provider authorization check on the decision, and forwards. The routed (provider, model) pair is echoed back in a response header so your client can log or display which model actually answered.

HTTP/1.1 200 OK
x-fm-moe-routed: openai/gpt-4o-mini
content-type: application/json

Surface constraints

  • /v1/chat/completions — MoE may pick any model whose wire format matches OpenAI Chat (most models).
  • /v1/messages — MoE is constrained to Anthropic-shape providers (Anthropic direct, AWS Bedrock with anthropic.*) so the request body stays compatible. A non-Anthropic-shape decision returns moe_routing_unavailable.

Failure modes

  • moe_routing_failed (503) — MoE could not produce a viable decision (no eligible providers, all blocked by policy, etc.). Drop the x-fm-route header to bypass MoE.
  • moe_routing_unavailable (503) — Anthropic-shape constraint not satisfiable.

Tier availability

MoE auto-routing is available on the Pro tier and above. Free-tier requests with firemission/auto or x-fm-route fall back to the model you specified.