Skip to content

fix(dashboard): /api/models must agree with /v1/models on synced coverage (#10615) - #10755

Merged
diegosouzapw merged 1 commit into
release/v3.8.50from
fix/10615-api-models-mismatch
Aug 19, 2026
Merged

diegosouzapw merged 1 commit into
release/v3.8.50from
fix/10615-api-models-mismatch

Conversation

@diegosouzapw

Copy link
Copy Markdown
Owner

Closes #10615

Root cause: /api/models (dashboard endpoint) computed available purely from the static PROVIDER_MODELS registry + active-connection check, with zero awareness of the live-synced model catalog that /v1/models actually serves. For providers on providerUsesExclusiveSyncedListing (Cursor) or whose synced catalog covers/replaces a static row, /v1/models correctly drops it while /api/models kept reporting it available: true.

Fix: reuse the same buildSyncedModelIdsByCanonicalProvider / shouldSuppressStaticModelForExclusiveListing helpers /v1/models already uses, applied per static row in handleGetModels().

Regression test: tests/unit/api-models-v1-models-mismatch-10615.test.ts (adapted from the plan-file's proven repro — reproduces RED on current tip, GREEN after the fix).

@diegosouzapw
diegosouzapw merged commit 4191e5d into release/v3.8.50 Aug 19, 2026
11 checks passed
@diegosouzapw
diegosouzapw deleted the fix/10615-api-models-mismatch branch August 19, 2026 14:54
giauphan pushed a commit to giauphan/OmniRoute that referenced this pull request Aug 20, 2026
muhamadgalihsaputra pushed a commit to niyatna/NiyatnaRoute that referenced this pull request Sep 27, 2026
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.

fix(api): /api/models returns IDs that don't match /v1/models IDs

2 participants