Skip to content

fix(providers): import intentional local-catalog-only providers instead of 502 (#5460, #5465) - #5787

Merged
diegosouzapw merged 1 commit into
release/v3.8.43from
fix/5460-5465-sync-models-local-catalog
Jul 1, 2026
Merged

diegosouzapw merged 1 commit into
release/v3.8.43from
fix/5460-5465-sync-models-local-catalog

Conversation

@diegosouzapw

Copy link
Copy Markdown
Collaborator

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:

sync-models/route.ts treated any source: "local_catalog" response as a degraded remote-fetch failure.

Fix

  • /models route now flags catalogs that are the provider's intended source (no remote discovery) with intentional: true (reka branch, qwen-oauth branch, and the generic !config embedding/rerank/web-cookie branch).
  • sync-models imports intentional local catalogs instead of 502-ing, via a new dependency-free leaf degradedLocalCatalog.ts (isDegradedLocalCatalog). A genuinely degraded remote fallback (a live fetch that failed) is still surfaced as before.
  • [FIX] t3.chat — confusing cookie instructions; 'Cookie header' unexplained + no extraction steps #5465 second bug: t3.chat's add-credential form showed a circular hint (Required cookie: convex-session-id + Cookie header. Paste the Cookie header value…). It now wires the step-by-step DevTools hint t3ChatWebCookieHint — 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 — pure isDegradedLocalCatalog decision (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 carry intentional: true; an aimlapi degraded fetch-fail fallback does NOT.
  • typecheck:core clean. Both provider-models-route (57) + the two new files (6) green.

Note: no CHANGELOG bullet — reconciled at release time from commit messages (per operator).

…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.
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@diegosouzapw
diegosouzapw merged commit ee5ee8b into release/v3.8.43 Jul 1, 2026
2 of 3 checks passed

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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.

@diegosouzapw
diegosouzapw deleted the fix/5460-5465-sync-models-local-catalog branch July 1, 2026 19:24
@diegosouzapw diegosouzapw mentioned this pull request Jul 2, 2026
tkgo11 pushed a commit to tkgo11/OmniRoute that referenced this pull request Sep 23, 2026
…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant