fix(provider): classify HTTP 404 as model error for fallback

When a model returns 404 NOT_FOUND, treat it as FailoverModel so the
fallback chain continues to the next model instead of failing completely.

This fixes the issue where cerebras/gpt-oss-120b returning 404 was not
triggering fallback to other models.
This commit is contained in:
Vishnuvardhan Reddy 2026-02-26 18:12:43 +00:00
parent 8cbdf5d1f2
commit 5fd5eefbdb

View file

@ -175,6 +175,8 @@ func classifyByStatus(status int) FailoverReason {
return FailoverAuth
case status == 402:
return FailoverBilling
case status == 404:
return FailoverModel // Model not found
case status == 408:
return FailoverTimeout
case status == 429: