Repository navigation
fix(providers): import intentional local-catalog-only providers instead of 502 (#5460, #5465) - #5787
Conversation
…ad of 502 (#5460, #5465) The model-sync route returned a hard 502 ('Remote model discovery failed; local catalog fallback not synced') for every provider whose local catalog is its ONLY discovery source (Reka #5460, t3.chat #5465, embedding/rerank like voyage-ai/jina-ai, Qwen-OAuth, and web-cookie providers). The /models route now flags catalogs that are the provider's intended source (no remote /models endpoint) with intentional:true; model-sync imports those instead of 502-ing, while a genuinely degraded remote fallback still surfaces. New dependency-free leaf degradedLocalCatalog.ts. Also fixes t3.chat's confusing add-credential hint: it no longer renders the circular 'Required cookie: convex-session-id + Cookie header...' copy and wires the step-by-step DevTools hint (t3ChatWebCookieHint) already translated in every locale. Regression guards: tests/unit/sync-models-degraded-local-catalog-5460-5465.test.ts, tests/unit/t3chat-web-cookie-hint-5465.test.ts, + intentional-flag assertions in tests/unit/provider-models-route.test.ts.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
There was a problem hiding this comment.
Code Review
This pull request introduces a mechanism to distinguish between intentional local-catalog-only providers (like Reka, Qwen OAuth, and embedding/rerank providers) and degraded remote-fetch fallbacks, preventing incorrect 502 errors during model synchronization. It also adds support for provider-specific credential hints (such as for t3.chat) via a new hintKey override. The review feedback suggests removing the misleading 'API unavailable' warning for providers that are intentionally local-catalog-only.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| // web-cookie providers like voyage-ai, jina-ai, t3-web) are | ||
| // intentionally local-catalog-only; model-sync imports rather than 502s. | ||
| intentional: true, | ||
| warning: "API unavailable — using local catalog", |
There was a problem hiding this comment.
For providers that are intentionally local-catalog-only (such as embedding, rerank, or web-cookie providers with no discovery configuration), returning a warning like "API unavailable — using local catalog" is misleading because there is no remote API to begin with. Consider omitting the warning property entirely when intentional is true.
…ad of 502 (cheaper-inference#5460, cheaper-inference#5465) (cheaper-inference#5787) The model-sync route returned a hard 502 ('Remote model discovery failed; local catalog fallback not synced') for every provider whose local catalog is its ONLY discovery source (Reka cheaper-inference#5460, t3.chat cheaper-inference#5465, embedding/rerank like voyage-ai/jina-ai, Qwen-OAuth, and web-cookie providers). The /models route now flags catalogs that are the provider's intended source (no remote /models endpoint) with intentional:true; model-sync imports those instead of 502-ing, while a genuinely degraded remote fallback still surfaces. New dependency-free leaf degradedLocalCatalog.ts. Also fixes t3.chat's confusing add-credential hint: it no longer renders the circular 'Required cookie: convex-session-id + Cookie header...' copy and wires the step-by-step DevTools hint (t3ChatWebCookieHint) already translated in every locale. Regression guards: tests/unit/sync-models-degraded-local-catalog-5460-5465.test.ts, tests/unit/t3chat-web-cookie-hint-5465.test.ts, + intentional-flag assertions in tests/unit/provider-models-route.test.ts.
Closes #5460, closes #5465.
Problem
The Import / Sync models button returned a hard
502 "Remote model discovery failed; local catalog fallback not synced"every single time for providers whose local catalog is their only discovery source:/modelsendpointsync-models/route.tstreated anysource: "local_catalog"response as a degraded remote-fetch failure.Fix
/modelsroute now flags catalogs that are the provider's intended source (no remote discovery) withintentional: true(reka branch, qwen-oauth branch, and the generic!configembedding/rerank/web-cookie branch).sync-modelsimportsintentionallocal catalogs instead of 502-ing, via a new dependency-free leafdegradedLocalCatalog.ts(isDegradedLocalCatalog). A genuinely degraded remote fallback (a live fetch that failed) is still surfaced as before.Required cookie: convex-session-id + Cookie header. Paste the Cookie header value…). It now wires the step-by-step DevTools hintt3ChatWebCookieHint— which already shipped translated in every locale but was orphaned/never rendered.Validation (Hard Rule #18 — TDD)
tests/unit/sync-models-degraded-local-catalog-5460-5465.test.ts— pureisDegradedLocalCatalogdecision (intentional→import, degraded→502, non-local→import).tests/unit/t3chat-web-cookie-hint-5465.test.ts— t3.chat renders the DevTools hint, not the circular generic; regression guard that hintKey-less providers keep the generic.tests/unit/provider-models-route.test.ts— new assertions: reka + voyage-ai responses carryintentional: true; an aimlapi degraded fetch-fail fallback does NOT.typecheck:coreclean. Both provider-models-route (57) + the two new files (6) green.Note: no CHANGELOG bullet — reconciled at release time from commit messages (per operator).