Commit Graph

5 Commits

Author SHA1 Message Date
Mario Zechner 9993c96907 feat(coding-agent): replace model registry with model runtime
Move provider auth and OAuth flows onto pi-ai Models, compose models.json and extension overlays through ModelRuntime, and retain ModelRegistry as an extension compatibility facade.
2026-07-14 17:48:45 +02:00
Vegard Stikbakke 8133c94db9 fix(ai): honor server-provided slow_down interval in device-code polling
GitHub's device flow documents slow_down as a rate limit: a poll that
arrives inside the throttle window is answered with slow_down instead of
the token, and the response's interval field reports the new required
minimum ("adds 5 seconds to the last interval"). A client that only
tracks its own +5s increment can stay behind the server's ratcheting
requirement when its timers fire early - common with WSL/VM clock drift
(microsoft/WSL#10006) - so every subsequent poll keeps hitting the rate
limit and login appears to hang forever even after the browser reports
the device as authorized.

Adopt the server-provided interval when a slow_down poll result carries
one, falling back to the RFC 8628 section 3.5 +5s increment otherwise.
GitHub Copilot passes the interval field through.

This restores part of the #1994 mitigations that were lost in the #4788
device-code refactor.

refs #6187
2026-07-03 22:26:12 +02:00
Vegard Stikbakke e2ccdc8509 fix(ai): delay Copilot device-code token polling
closes #6187
2026-07-01 13:48:11 +02:00
Vegard Stikbakke 9d5fb70b7e feat(ai): add Codex device code login (#4911) 2026-05-28 11:09:33 +02:00
Vegard Stikbakke c554364c2a feat(ai): refactor device code login for copilot 2026-05-22 08:54:18 +02:00