Custom OpenAI-compatible providers running on localhost (e.g. a local proxy) with an explicit apiKey in models.json received 'local-no-key-needed' during compaction instead of their configured key, causing 401 errors. The localhost shortcut in AuthStorage.getApiKey() was unconditional. Normal dispatch calls getApiKeyForProvider() which skips the baseUrl check entirely, so the fallback resolver was reached and the real key was used. Compaction calls getApiKey(model) which passes baseUrl, hitting the shortcut first. Closes #4106 |
||
|---|---|---|
| .. | ||
| daemon | ||
| mcp-server | ||
| native | ||
| pi-agent-core | ||
| pi-ai | ||
| pi-coding-agent | ||
| pi-tui | ||
| rpc-client | ||