Commit graph

10 commits

Author SHA1 Message Date
David Brailovsky
ee409a85f6
feat(ai,coding-agent): list only the OpenRouter models a key may use (#10672)
On each OpenRouter refresh, combine the catalog (built-in models plus a newer pi.dev catalog) with GET /models/user for the user's key: keep only the listed chat models and take their context size, max output and prices from it. Image and classifier models are kept. The combined list is saved and replaces the OpenRouter catalog, including offline.

- ai: add personalizeOpenRouterCatalog and RefreshModelsContext.baseUrl, so the request follows a base URL configured in models.json (regional endpoints)
- ai: share OpenRouter price conversion with the generator; negative prices (router models such as openrouter/auto) become 0
- coding-agent: add withPersonalizedCatalog next to withRemoteCatalog
- docs: OpenRouter section in providers.md

fixes #10353
2026-10-12 10:17:40 +02:00
Armin Ronacher
a328aa89ad
feat(ai,coding-agent): unify image and classifier model infrastructure (#9948) 2026-09-23 17:41:19 +02:00
Petr Houška
46b53b995b
fix: retry transient management HTTP requests (#7632)
Retry idempotent coding-agent management requests for transient transport and HTTP failures while keeping one overall timeout budget across attempts.

Keep install telemetry single-shot because retrying it has no user-facing impact and could duplicate a side-effecting report.
2026-08-05 09:38:28 +02:00
Mario Zechner
fed6009cc9 fix(coding-agent): make model refresh cancellation caller-owned
Add generation-safe catalog publication, cancellable auth and storage operations, locally consistent credential mutations, and cache-first interactive model flows.
2026-08-04 00:03:52 +02:00
Armin Ronacher
b1c444d956 feat(coding-agent): revalidate remote model catalogs with ETag 2026-07-25 12:26:19 +02:00
David Brailovsky
bc3d364742 fix bundled models generation time
Fresh package installs could give bundled model catalog
files newer filesystem mtimes than the remote catalog’s Last-Modified timestamp,
causing Pi to ignore newer remote models.
Use the catalog’s recorded generation time instead of installation-dependent file metadata.
2026-07-23 13:34:51 +00:00
Armin Ronacher
54fad505b9 fix(coding-agent): prefer newer generated model catalogs 2026-07-21 11:11:08 +02:00
Armin Ronacher
97f9978fa6 feat(coding-agent): add model catalog refresh flag 2026-07-16 12:46:49 +02:00
Mario Zechner
bd9e09db44 feat(coding-agent): expose dynamic provider refresh 2026-07-15 12:56:50 +02:00
Mario Zechner
fab309e955 fix(coding-agent): refresh model catalogs in picker 2026-07-15 12:35:29 +02:00