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:
parent
8cbdf5d1f2
commit
5fd5eefbdb
1 changed files with 2 additions and 0 deletions
|
|
@ -175,6 +175,8 @@ func classifyByStatus(status int) FailoverReason {
|
||||||
return FailoverAuth
|
return FailoverAuth
|
||||||
case status == 402:
|
case status == 402:
|
||||||
return FailoverBilling
|
return FailoverBilling
|
||||||
|
case status == 404:
|
||||||
|
return FailoverModel // Model not found
|
||||||
case status == 408:
|
case status == 408:
|
||||||
return FailoverTimeout
|
return FailoverTimeout
|
||||||
case status == 429:
|
case status == 429:
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue