Problem
OpenRouter sometimes returns HTTP 404 with a JSON body like:
{"error":{"message":"Healer Alpha was a stealth model revealed on March 18th as an early testing version of MiMo-V2-Omni. Find it here: https://openrouter.ai/xiaomi/mimo-v2-omni","code":404},"user_id":"user_33GTyP8uDSYYbaeBO48AGHXyuMC"}
Even though this means the requested model is unavailable, fallback selection did not treat it as model_not_found.
Repro
- Call OpenRouter with
model: "openrouter/healer-alpha".
- Receive the JSON 404 payload above.
- Observe that model fallback stays on the failing candidate instead of continuing to the fallback chain.
Expected
A JSON-wrapped 404 model error should trigger model fallback the same way a plain model not found error does.
Actual
The fallback classifier missed the error because it only recognized 404 when paired with not found text, and OpenRouter's payload uses a different message.
Evidence
- Repro via
curl -v against https://openrouter.ai/api/v1/chat/completions
- Local regression tests added for the JSON 404 payload
Problem
OpenRouter sometimes returns HTTP 404 with a JSON body like:
{"error":{"message":"Healer Alpha was a stealth model revealed on March 18th as an early testing version of MiMo-V2-Omni. Find it here: https://openrouter.ai/xiaomi/mimo-v2-omni","code":404},"user_id":"user_33GTyP8uDSYYbaeBO48AGHXyuMC"}Even though this means the requested model is unavailable, fallback selection did not treat it as
model_not_found.Repro
model: "openrouter/healer-alpha".Expected
A JSON-wrapped 404 model error should trigger model fallback the same way a plain
model not founderror does.Actual
The fallback classifier missed the error because it only recognized
404when paired withnot foundtext, and OpenRouter's payload uses a different message.Evidence
curl -vagainsthttps://openrouter.ai/api/v1/chat/completions