M3 — All providers + auth

New Issue

Goal

Round out provider support (OpenAI, Copilot) alongside Anthropic, with auth, cost tracking,
and retry/doom-loop hardening.

Scope

  • OpenAI chat + responses codecs, provider, registry wiring
  • auth.json credential storage
  • Copilot: device-flow login modal, token exchange with direct-Bearer fallback,
    /models routing across the three codecs
  • Model pricing + per-step cost accumulation
  • models.dev metadata catalog + cost display wiring in the TUI
  • Retry policy + doom-loop guard (landed in M1's engine loop, exercised fully once all
    three providers exist)

Acceptance criteria

  • The same session works on all three providers.
  • Device-flow login completes inside the TUI.
  • Costs shown.

Top risk carried into this milestone

Copilot token exchange variance — opencode ships direct-Bearer, but classic Copilot API wants
the copilot_internal/v2/token exchange. Mitigated with a dual-path token.rs; verify against
the live API early.

No due date
0% Completed

No results

Try adjusting your search filters.