pi-mono/packages/coding-agent/src/cli
Aliou Diallo ec4d413fc9
fix(coding-agent): custom models for built-in providers and list-models error surfacing (#3072)
* fix(coding-agent): surface models.json load errors on stderr in --list-models

When models.json has validation errors, --list-models silently
discarded custom models and overrides without any user-visible
feedback. Now prints the error to stderr via chalk.yellow warning
before listing available models.

* fix(coding-agent): allow custom models for built-in providers in models.json

Built-in providers (openrouter, anthropic, etc.) already have api and
baseUrl on every model, and auth comes from env vars / auth storage.
Relax validation so custom models under built-in providers don't need
redundant baseUrl, apiKey, or api fields. Inherit them from the first
built-in model for that provider.

fixes #2921

---------

Co-authored-by: Mario Zechner <badlogicgames@gmail.com>
2026-04-14 20:32:18 +02:00
..
args.ts feat(coding-agent): support multiple --append-system-prompt flags (#3171) 2026-04-14 20:19:11 +02:00
config-selector.ts fix(coding-agent): apply config overrides to auto-discovery 2026-01-26 13:37:08 +01:00
file-processor.ts fix(coding-agent): enforce safe auto-resized image limits closes #2055 2026-03-22 21:48:34 +01:00
initial-message.ts fix(coding-agent): merge piped stdin into initial prompt closes #2315 2026-03-17 22:25:35 +01:00
list-models.ts fix(coding-agent): custom models for built-in providers and list-models error surfacing (#3072) 2026-04-14 20:32:18 +02:00
session-picker.ts fix(keybindings): migrate to namespaced ids closes #2391 2026-03-20 01:55:30 +01:00