You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Offer a preset key only the models it serves — Check key receives the vendor's own list and throws it away, so a restricted or retired model is learned midway through an answer #295
Adding a preset provider sends one request that both proves the key and reports what it serves: listModels (discover.ts:44-65) returns the vendor's /models answer for that key. The choice step then throws that answer away — for a preset, the dialog offers (await preset.load()).getModels() (index.tsx:122-126), pi's static catalog, which the Provider contract itself calls "the complete synchronous chat catalog" and which catalog.ts:1-8 freezes at pi's package version. Vendors retire ids continuously (Groq and xAI churn fastest) and plans gate others, so a reader can tick a model their key cannot use.
It saves, it appears under Chat model as (your key), and the truth arrives at the first prompt — as a raw vendor error, since only the proxy's JSON body is translated (messages.ts:74-75). That is the exact moment the discovery step's own comment rejects (discover.ts:40-43): "a reader should learn a key is wrong while typing it, not midway through an answer." A model the key cannot use is the same class of fact, learned at the same wrong moment — with the answer in hand already.
Proposal
For a preset, intersect pi's catalog with the discovery answer the dialog already holds: offer getModels() filtered to the ids the vendor's /models listed for this key — the custom-endpoint path already trusts that answer (index.tsx:125).
Keep pi's names and image metadata for the models that remain; that is what bare vendor ids lack.
When the intersection drops models, say how many — a shorter list should read as precision, not as a bug.
If it drops everything, keep today's full catalog with a note instead of blocking the save; a vendor whose ids and pi's disagree should remain usable by hand.
Goal
After this, every model offered for a preset provider is one the vendor's own list says this key serves, so an unusable pick cannot be saved and the first answer is never where it is learned.
Anchors verified.discover.ts:39-43 carries the principle verbatim ("…not midway through an answer") and :44-65listModels does return the vendor's /models ids for the key ✓. The discard is exactly where cited — index.tsx:126-128: offer(preset ? (await preset.load()).getModels() : found.models.map(…)); presets throw away found.models while the custom branch trusts it (the trust line is :128, one past the cited range). messages.ts:74-75 ✓ only readableProxyError translates; own-key vendor bodies pass through raw. catalog.ts:1-9 delegates addresses and model lists to pi ("duplicating any of that here would leave two versions to keep in step"), which is the freeze the issue names — the static claim is sound.
Mechanism check: the proposal's premise holds — check() already holds the vendor's live answer at the moment it offers pi's catalog, so the intersection adds no request and no permission.
Sensor. lint ✓; verify ✗ at gate 1 — index.test.tsx exists but contains neither listModels nor found, so the gate fails on unfixed main. Correct not-implemented verdict.
Sharpening:found is a weak gate token — any incidental "not found" in the test would flip it. Pin the outcome instead: a test asserting a model present in pi's catalog but absent from the vendor's answer is not offered (and, per bullet 4, that an empty intersection falls back to the full catalog) — e.g. grep -n "not.*offered\|falls back" index.test.tsx, whatever the final assertion wording is.
Posted by the scheduled issue-reviewer loop, independent of the authoring session.
Second review @ d05b6b6 (no commits since the first) — evidence re-confirmed; valid, stays open.
Anchors re-verified, all exact:index.tsx:120-126 — found = await listModels(...) at :120, offer(preset ? (await preset.load()).getModels() : found.models.map(…)) at :122-126: the preset branch discards the vendor's answer while the custom branch at :125 trusts it; discover.ts:40-43 (the principle, verbatim) and :44-65 (listModels returns the vendor's ids); catalog.ts:1-8 ("duplicating any of that here would leave two versions to keep in step"); messages.ts:74-75 (readableProxyError is the only translator).
Sensor: lint ✓; verify ✗ at gate 1 — index.test.tsx exists but matches neither listModels nor found. Correct not-implemented verdict.
Sharpening (unchanged from the first review, still unaddressed):found is a weak gate token — any incidental "not found" flips it. Pin the outcome instead: a test asserting a model in pi's catalog but absent from the vendor's answer is not offered, and that an empty intersection falls back to the full catalog.
Posted by the scheduled issue-reviewer loop, independent of the authoring session.
Third review @ d05b6b6 (still no commits since the second) — evidence re-confirmed; valid, stays open.
Anchors: all exact — index.tsx:120-126 (found fetched at :120; the preset branch discards it, the custom branch trusts it at :125), discover.ts:40-43,44-65, catalog.ts:1-8, messages.ts:74-75.
Sensor: lint ✓; verify ✗ at gate 1 — index.test.tsx matches neither listModels nor found. Correct not-implemented verdict.
Sharpening (standing, unaddressed):found is a weak gate token — pin the outcome instead: a test asserting a catalog model absent from the vendor's answer is not offered, and that an empty intersection falls back to the full catalog.
Posted by the scheduled issue-reviewer loop, independent of the authoring session.
Fourth review @ d05b6b6 (still HEAD — no commits since 2026-10-28) — valid, stays open.
Anchors re-opened today, all holding:check() fetches found = await listModels(...) at index.tsx:119 and the preset branch throws it away — (await preset.load()).getModels() at :122-123 while the custom branch trusts the same answer at :124 (the Refs span 120-126 covers the discard; the fetch itself sits one line above it, sub-line drift only). discover.ts:40-43 carries the verbatim principle ("not midway through an answer") and :44-65 is the whole listModels. catalog.ts:1-8 confirms pi's catalog is static-by-delegation; the "complete synchronous chat catalog" quote is real, in pi-ai/dist/models.d.ts:106. messages.ts:74-75 verified down to proxy-error.ts — readableProxyError only unwraps the proxy's NNN: {json} pattern, so a raw vendor refusal passes through untranslated, exactly as claimed.
Sensor: lint ✓; verify ✗ at gate 1 — index.test.tsx exists and holds zero listModels/found references, so the gate fails on unfixed main and discriminates.
Sharpening: the first verification gate keys on test-file strings, which pins the test's existence, not the behavior. A tighter anchor for the outcome: a grep for an intersection in the dialog itself, e.g. the model list offered for presets being filtered (filter/includes against found.models in index.tsx), so green means the served-list filter exists where the proposal puts it.
Activity
bencode commentedon Nov 5, 2026
Posted by the scheduled issue-reviewer loop, independent of the authoring session.
First independent review @ d05b6b6 — evidence confirmed; valid, stays open.
discover.ts:39-43carries the principle verbatim ("…not midway through an answer") and:44-65listModelsdoes return the vendor's/modelsids for the key ✓. The discard is exactly where cited —index.tsx:126-128:offer(preset ? (await preset.load()).getModels() : found.models.map(…)); presets throw awayfound.modelswhile the custom branch trusts it (the trust line is:128, one past the cited range).messages.ts:74-75✓ onlyreadableProxyErrortranslates; own-key vendor bodies pass through raw.catalog.ts:1-9delegates addresses and model lists to pi ("duplicating any of that here would leave two versions to keep in step"), which is the freeze the issue names — the static claim is sound.check()already holds the vendor's live answer at the moment it offers pi's catalog, so the intersection adds no request and no permission.index.test.tsxexists but contains neitherlistModelsnorfound, so the gate fails on unfixed main. Correct not-implemented verdict.foundis a weak gate token — any incidental "not found" in the test would flip it. Pin the outcome instead: a test asserting a model present in pi's catalog but absent from the vendor's answer is not offered (and, per bullet 4, that an empty intersection falls back to the full catalog) — e.g.grep -n "not.*offered\|falls back" index.test.tsx, whatever the final assertion wording is.bencode commentedon Nov 6, 2026
Posted by the scheduled issue-reviewer loop, independent of the authoring session.
Second review @ d05b6b6 (no commits since the first) — evidence re-confirmed; valid, stays open.
index.tsx:120-126—found = await listModels(...)at:120,offer(preset ? (await preset.load()).getModels() : found.models.map(…))at:122-126: the preset branch discards the vendor's answer while the custom branch at:125trusts it;discover.ts:40-43(the principle, verbatim) and:44-65(listModelsreturns the vendor's ids);catalog.ts:1-8("duplicating any of that here would leave two versions to keep in step");messages.ts:74-75(readableProxyErroris the only translator).index.test.tsxexists but matches neitherlistModelsnorfound. Correct not-implemented verdict.foundis a weak gate token — any incidental "not found" flips it. Pin the outcome instead: a test asserting a model in pi's catalog but absent from the vendor's answer is not offered, and that an empty intersection falls back to the full catalog.bencode commentedon Nov 10, 2026
Posted by the scheduled issue-reviewer loop, independent of the authoring session.
Third review @ d05b6b6 (still no commits since the second) — evidence re-confirmed; valid, stays open.
index.tsx:120-126(foundfetched at:120; the preset branch discards it, the custom branch trusts it at:125),discover.ts:40-43,44-65,catalog.ts:1-8,messages.ts:74-75.index.test.tsxmatches neitherlistModelsnorfound. Correct not-implemented verdict.foundis a weak gate token — pin the outcome instead: a test asserting a catalog model absent from the vendor's answer is not offered, and that an empty intersection falls back to the full catalog.bencode commentedon Nov 13, 2026
Posted by the scheduled issue-reviewer loop, independent of the authoring session.
Fourth review @
d05b6b6(still HEAD — no commits since 2026-10-28) — valid, stays open.check()fetchesfound = await listModels(...)atindex.tsx:119and the preset branch throws it away —(await preset.load()).getModels()at:122-123while the custom branch trusts the same answer at:124(the Refs span120-126covers the discard; the fetch itself sits one line above it, sub-line drift only).discover.ts:40-43carries the verbatim principle ("not midway through an answer") and:44-65is the wholelistModels.catalog.ts:1-8confirms pi's catalog is static-by-delegation; the "complete synchronous chat catalog" quote is real, inpi-ai/dist/models.d.ts:106.messages.ts:74-75verified down toproxy-error.ts—readableProxyErroronly unwraps the proxy'sNNN: {json}pattern, so a raw vendor refusal passes through untranslated, exactly as claimed.index.test.tsxexists and holds zerolistModels/foundreferences, so the gate fails on unfixed main and discriminates.filter/includesagainstfound.modelsinindex.tsx), so green means the served-list filter exists where the proposal puts it.