Skip to content

provider failover chain — reserve provider for mission resilience #209

Closed

Description

@ajianaz

Summary

Feature-research ring 2 (2026-10-06, validated: only OPENAI_* env-resolution fallback exists — no runtime provider failover). Optional TOLE_FALLBACK_BASE_URL/_KEY/_MODEL (or a chain): when the primary provider fails after the existing step-retry (PROVIDER_TIMEOUT_RETRIES=1), the next step re-routes to the reserve and the session entry records the switch.

Why

Unattended missions (0.7.0 tole mission) run 30–45 min; a provider outage mid-mission currently parks the turn resumable (good) but stalls progress until a human resumes. A reserve provider turns most outages into a non-event. Durable sessions make the switch auditable — an edge no stateless harness has.

Design sketch

  • Failover triggers: connect errors / 5xx / repeated timeouts (NOT 4xx auth/model errors — those should fail loud).
  • Switch is per-step, recorded in the JSONL entry (provider field); cancel token & budgets unchanged.
  • Out of scope: multi-provider load balancing (keep it a simple ordered chain).

Acceptance

  • Chain resolution + step-level reroute + durable provider annotation
  • Tests: primary-down → reserve completes the turn; auth errors do NOT failover
  • Docs (env table) + CHANGELOG same-PR

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions