Skip to content

Feature: configurable failover reasons #605

Description

@a-bali

As per the docs, failover currently only happens in case of 5xx and 429 errors. OpenCode seems to return 400 in case of temporary upstream issues (see request & log below); would it be possible to extend failover reasons or make them configurable?

Image
{"time":"2026-07-28T06:06:38.074537266Z","level":"WARN","msg":"request failed","type":"invalid_request_error","status":400,"message":"Error from provider (Console Go): Upstream request failed","provider":"open
code_go","code":"invalid_request_error","method":"POST","path":"/v1/chat/completions","request_id":"c97141be-c4ed-4f2b-aa69-c17ffe6a62f4"}
{"time":"2026-07-28T06:06:38.075040719Z","level":"INFO","msg":"REQUEST","method":"POST","uri":"/v1/chat/completions","status":400,"latency":"553.201393ms","host":"ai","bytes_in":"1485","bytes_out":157,"
user_agent":"OpenAI/Python 2.24.0","remote_ip":"10.244.0.37","request_id":"c97141be-c4ed-4f2b-aa69-c17ffe6a62f4"}
{"time":"2026-07-28T06:06:38.669617633Z","level":"WARN","msg":"request failed","type":"invalid_request_error","status":400,"message":"Error from provider (Console Go): Upstream request failed","provider":"open
code_go","code":"invalid_request_error","method":"POST","path":"/v1/chat/completions","request_id":"eb834987-9e89-419d-bf04-da47a6d7044b"}
{"time":"2026-07-28T06:06:38.670858768Z","level":"INFO","msg":"REQUEST","method":"POST","uri":"/v1/chat/completions","status":400,"latency":"578.032008ms","host":"ai","bytes_in":"1240","bytes_out":157,"
user_agent":"OpenAI/Python 2.24.0","remote_ip":"10.244.0.37","request_id":"eb834987-9e89-419d-bf04-da47a6d7044b"}

Note that the actual model targeted by the virtual model does have failover targets set:

Image

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions