fix(coding-agent): resolve api keys by provider

What:
- resolve API keys using provider argument
- add regression test for model-switch key resolution
- update coding-agent changelog
- document provider lookup in SDK

Why:
- prevent model-switch 401s from provider mismatch

Tests:
- npm run check
- npm run test -w @mariozechner/pi-coding-agent -- sdk-api-key.test.ts
This commit is contained in:
Josh Palmer 2026-01-13 16:29:27 +01:00 committed by Mario Zechner
parent 1c58db5e23
commit 8936c5d136
3 changed files with 67 additions and 5 deletions

View file

@ -11,6 +11,10 @@
- Extension example: `summarize.ts` for summarizing conversations using custom UI and an external model
- Vercel AI Gateway provider support: set `AI_GATEWAY_API_KEY` and use `--provider vercel-ai-gateway` ([#689](https://github.com/badlogic/pi-mono/pull/689) by [@timolins](https://github.com/timolins))
### Fixed
- Fix API key resolution after model switches by using provider argument ([#691](https://github.com/badlogic/pi-mono/pull/691) by [@joshp123](https://github.com/joshp123))
## [0.45.3] - 2026-01-13
## [0.45.2] - 2026-01-13