Skip to content

feat(cursor): exclusive live listing + verbatim AgentRun model ids - #9911

Merged
diegosouzapw merged 3 commits into
cheaper-inference:release/v3.8.50from
yansigit:feat/cursor-live-catalog
Aug 10, 2026
Merged

diegosouzapw merged 3 commits into
cheaper-inference:release/v3.8.50from
yansigit:feat/cursor-live-catalog

Conversation

@yansigit

@yansigit yansigit commented Aug 9, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Two complementary Cursor fixes (listing alone did not stop the chat failures):

  1. Exclusive live listing — When Cursor has a non-empty synced catalog, dashboard / /v1/models / Test All list synced models + injected auto / auto-cost|balance|intelligence (+ custom) only. The static registry under open-sse/config/providers/registry/cursor/ is offline fallback only.
  2. Verbatim AgentRun wire ids — When the requested id is in that live catalog, resolveRequestedModel sends it as-is (skip Claude effort / GPT reasoning / composer-fast splits). #7289 stripping flattened live ids (e.g. claude-opus-5-low → claude-opus-5 + effort) caused Cursor not_found: AI Model Not Found, which OmniRoute often labeled as rate/usage.

Root cause of the listed-model chat failures was (2), not “sync didn’t run.” (1) still matters so operators pick/probe the real live set and so pass-through has an authoritative id set.

Independent of #9909 (PKCE / empty-stream); can land in either order.

⚠️ base-red inherited: #9737 (release/v3.8.50 tip is red — do not chase inherited failures in this PR).

Related Issues

Validation

  • Change type: provider / UI / docs
  • Focused tests and category gates from the golden path
  • Fabricated-docs check on new docs/providers/CURSOR-DOCKER.md
  • Reconciled with origin/release/v3.8.50; focused checks rerun afterward
  • Production-code changes include new/updated automated tests
  • SonarQube PR analysis — pending CI

Focused commands

node --import tsx/esm --test \
  tests/unit/model-listing-capability-5420.test.ts \
  tests/unit/catalog-synced-static-preservation.test.ts \
  tests/unit/cursor-exclusive-listing-merge.test.ts \
  tests/unit/cursor-auto-catalog-entry.test.ts \
  tests/unit/cursor-agent-protobuf.test.ts \
  tests/unit/cursor-live-catalog-passthrough.test.ts \
  tests/unit/cursor-model-effort-suffix-7289.test.ts \
  tests/unit/live-model-catalog-reconciliation-8926.test.ts
node scripts/check/check-fabricated-docs.mjs

Live smoke (PORT=20129)

Listing

  • ModelSync / refresh: ~196 live models; auto* present; static-only spark ids absent from discovery + /v1/models
  • Exclusive merge vs SQLite synced catalog: no static-only leaks; empty synced falls back to registry
  • Chat: cu/auto + cu/auto-cost → 200; static-only effort id → 400 live-catalog reject

Wire pass-through (after verbatim fix)

  • Required sample → OK (no AI Model Not Found): cu/claude-opus-5-low, cu/claude-sonnet-5-medium, cu/gpt-5.6-sol-medium, cu/gpt-5.5-high, plus opus/sonnet thinking and gpt-5.4/5.5/5.6 family samples
  • claude-fable-5-* hit a real Cursor empty-turn / quota (reset after ~107h) — distinct from rewrite-induced not_found

Tests Added Or Updated

  • tests/unit/model-listing-capability-5420.test.ts — providerUsesExclusiveSyncedListing
  • tests/unit/catalog-synced-static-preservation.test.ts — exclusive suppress helper
  • tests/unit/cursor-exclusive-listing-merge.test.ts — dashboard merge pure helper
  • tests/unit/cursor-auto-catalog-entry.test.ts — ensureCursorAutoCatalogEntry
  • tests/unit/cursor-agent-protobuf.test.ts — auto-cost|balance|intelligence wire mapping
  • tests/unit/cursor-live-catalog-passthrough.test.ts — live-catalog verbatim pass-through + auto exceptions
  • tests/unit/fixtures/cursor-rewrite-failure-ids.ts — 83-id rewrite-failure smoke checklist

Coverage Notes

  • Listing policy covered by pure helpers + unit tests above.
  • Wire pass-through covered by resolveRequestedModel / encodeAgentRunRequest unit tests; executor loads getActiveSyncedCatalog("cursor") and fails open to #7289 splits when the catalog is empty.

Reviewer Notes

  • Cursor-only exclusive listing (providerUsesExclusiveSyncedListing); does not flip GitHub/other authoritative providers.
  • Custom models are still merged; sync does not prune customs.
  • Pass-through applies only when the normalized client id is present in the active synced set; offline / absent ids keep #7289 splitting.
  • Docs: docs/providers/CURSOR-DOCKER.md (listing behavior on this base; discovery via cursor-agent until feat(providers): Cursor PKCE login with Bearer quota, auto router, and empty-turn errors #9909 AvailableModels lands).

@yansigit
yansigit requested a review from diegosouzapw as a code owner August 9, 2026 07:09
@yansigit yansigit changed the title feat(cursor): prefer live synced catalog for listing and Test All feat(cursor): exclusive live listing + verbatim AgentRun model ids Aug 9, 2026
yansigit and others added 2 commits August 9, 2026 01:54
When an active synced Cursor catalog exists, list only live models plus
injected auto routers (and customs). Keep the static registry as offline
fallback.

Co-authored-by: Cursor <cursoragent@cursor.com>
Skip cheaper-inference#7289 effort/reasoning splits when the exact id is in the active synced
Cursor catalog so AgentRun does not rewrite flattened live ids into missing
bases that return AI Model Not Found. Also wires auto-cost/balance/intelligence
to default + optimization for the injected routers.

Co-authored-by: Cursor <cursoragent@cursor.com>
@diegosouzapw

Copy link
Copy Markdown
Collaborator

Thanks @yansigit — exclusive synced-listing + verbatim model ids. I'll confirm the empty-sync fallback path and drive it green before merge.

1 similar comment
@diegosouzapw

Copy link
Copy Markdown
Collaborator

Thanks @yansigit — exclusive synced-listing + verbatim model ids. I'll confirm the empty-sync fallback path and drive it green before merge.

@diegosouzapw
diegosouzapw merged commit 0dbc34e into cheaper-inference:release/v3.8.50 Aug 10, 2026
2 of 5 checks passed
diegosouzapw pushed a commit that referenced this pull request Aug 10, 2026
Release-equivalent fast-gates surface 5 real TS regressions inherited by the
base from merged Fal/guardrails/cursor work (fast-gates PR->release do not run
these, so they accrued on release/v3.8.50):
- open-sse/handlers/imageGeneration/providers/fal.ts: normalizeProviderImagePayload
  missing 4th 'b64_json' arg (TS2554).
- open-sse/handlers/videoGeneration/falHandler.ts: narrow video to Record before .url.
- src/app/api/v1/images/generations/route.ts: type the toJsonErrorPayload read.
- src/lib/guardrails/visionBridgeHelpers.ts: cast through unknown for UA fetch.
- src/lib/providers/mergeProviderModelListing.ts: drop index-signature requirement
  that made interface RegistryModel[] unassignable (TS2322, from #9911).

All fixed in source (keeps the gates meaningful); each reproduces on the base tip.

Co-authored-by: OmniRoute maintenance <maintainers@omniroute.local>
diegosouzapw added a commit that referenced this pull request Aug 10, 2026
…ize freeze (#9985) (#10032)

* fix(quality): green release/v3.8.50 base-reds — env-doc sync + file-size freeze (#9985)

Sweep base-reds from issue #9985 on release/v3.8.50:
- env-doc-sync: add COMMANDCODE_API_URL + ANTIGRAVITY_ALLOW_SIGNATURE_BYPASS to
  .env.example and ENVIRONMENT.md (in code, missing from docs); add
  OMNIROUTE_STRICT_SYSTEM_PROVIDERS + TLS_FINGERPRINT_PROVIDERS to ENVIRONMENT.md
  (in .env.example, missing from doc). Restores the 3-way env contract.
- file-size: freeze open-sse/utils/proxyFetch.ts at 1207 (new proxied-TLS fetch
  helper over the 1000 cap). Owner-authorized quick rebaseline; slim for v3.9.0.

Co-authored-by: OmniRoute maintenance <maintainers@omniroute.local>

* fix(quality): green open-sse+dashboard typecheck base-reds (#9985)

Release-equivalent fast-gates surface 5 real TS regressions inherited by the
base from merged Fal/guardrails/cursor work (fast-gates PR->release do not run
these, so they accrued on release/v3.8.50):
- open-sse/handlers/imageGeneration/providers/fal.ts: normalizeProviderImagePayload
  missing 4th 'b64_json' arg (TS2554).
- open-sse/handlers/videoGeneration/falHandler.ts: narrow video to Record before .url.
- src/app/api/v1/images/generations/route.ts: type the toJsonErrorPayload read.
- src/lib/guardrails/visionBridgeHelpers.ts: cast through unknown for UA fetch.
- src/lib/providers/mergeProviderModelListing.ts: drop index-signature requirement
  that made interface RegistryModel[] unassignable (TS2322, from #9911).

All fixed in source (keeps the gates meaningful); each reproduces on the base tip.

Co-authored-by: OmniRoute maintenance <maintainers@omniroute.local>

* fix(quality): allowlist onnxruntime-node in dependency allowlist (#9985)

check:deps base-red — onnxruntime-node is a real production dep (transformers
embedding path) landed via the LLMLingua/transformers bump (#9962) without an
allowlist entry. Legit package: microsoft onnxruntime, verified in registry.

* fix(quality): rebaseline CodeQL ratchet 1->2 for #9940 fingerprint alerts (#9985)

Base-red: 2nd js/insufficient-password-hash alert on chatBodyAdmission API-key
fingerprints (sha256->16-hex admission-lane key), not password verification.
Reproduces on release/v3.8.50 tip. Owner-authorized rebaseline (revisit v3.9.0).

* fix(quality): green release/v3.8.50 unit base-reds (#9985)

8 unit-test base-reds reproducing on the pristine release tip, fixed in-source
(fast-gates PR->release do not run the unit suite, so these accrued silently):
- ServiceSupervisor: spawn-failure now resolves with error status (was throwing);
  health-probe-failure path still rejects. Distinct via spawnFailed flag.
- stream + responseSanitizer: numeric passthrough id preserved as string (was
  regenerated chatcmpl-); finish chunk with empty delta no longer swallowed by
  the emptyChoices guard.
- proxyFetch: genuine (non-abort) proxy transport failures keep the underlying
  reason in the surfaced error.
- auto-combo builtinCatalog: advertised undefined-variant auto/* ids (auto/chat,
  auto/best-chat, auto/pro-chat) materialize instead of throwing 'Unknown'.
- getTranslations en.json: add missing providers.iconUrlInvalid.
- optional-transformers-dependency.test: reconcile to #9962's deliberate
  move of @huggingface/transformers to a regular dep (napi onnxruntime).

Co-authored-by: OmniRoute maintenance <maintainers@omniroute.local>

---------

Co-authored-by: Diego Rodrigues de Sa e Souza <diegosouzapw@gmail.com>
Co-authored-by: OmniRoute maintenance <maintainers@omniroute.local>
Co-authored-by: diegosouzapw <diegosouzapw@users.noreply.github.com>
muhamadgalihsaputra pushed a commit to niyatna/NiyatnaRoute that referenced this pull request Sep 27, 2026
…heaper-inference#9911)

* feat(cursor): prefer live synced catalog for listing and Test All

When an active synced Cursor catalog exists, list only live models plus
injected auto routers (and customs). Keep the static registry as offline
fallback.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(cursor): send live-catalog model ids verbatim on AgentRun

Skip cheaper-inference#7289 effort/reasoning splits when the exact id is in the active synced
Cursor catalog so AgentRun does not rewrite flattened live ids into missing
bases that return AI Model Not Found. Also wires auto-cost/balance/intelligence
to default + optimization for the injected routers.

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: yansigit <yansigit@users.noreply.github.com>
muhamadgalihsaputra pushed a commit to niyatna/NiyatnaRoute that referenced this pull request Sep 27, 2026
…ize freeze (cheaper-inference#9985) (cheaper-inference#10032)

* fix(quality): green release/v3.8.50 base-reds — env-doc sync + file-size freeze (cheaper-inference#9985)

Sweep base-reds from issue cheaper-inference#9985 on release/v3.8.50:
- env-doc-sync: add COMMANDCODE_API_URL + ANTIGRAVITY_ALLOW_SIGNATURE_BYPASS to
  .env.example and ENVIRONMENT.md (in code, missing from docs); add
  OMNIROUTE_STRICT_SYSTEM_PROVIDERS + TLS_FINGERPRINT_PROVIDERS to ENVIRONMENT.md
  (in .env.example, missing from doc). Restores the 3-way env contract.
- file-size: freeze open-sse/utils/proxyFetch.ts at 1207 (new proxied-TLS fetch
  helper over the 1000 cap). Owner-authorized quick rebaseline; slim for v3.9.0.

Co-authored-by: OmniRoute maintenance <maintainers@omniroute.local>

* fix(quality): green open-sse+dashboard typecheck base-reds (cheaper-inference#9985)

Release-equivalent fast-gates surface 5 real TS regressions inherited by the
base from merged Fal/guardrails/cursor work (fast-gates PR->release do not run
these, so they accrued on release/v3.8.50):
- open-sse/handlers/imageGeneration/providers/fal.ts: normalizeProviderImagePayload
  missing 4th 'b64_json' arg (TS2554).
- open-sse/handlers/videoGeneration/falHandler.ts: narrow video to Record before .url.
- src/app/api/v1/images/generations/route.ts: type the toJsonErrorPayload read.
- src/lib/guardrails/visionBridgeHelpers.ts: cast through unknown for UA fetch.
- src/lib/providers/mergeProviderModelListing.ts: drop index-signature requirement
  that made interface RegistryModel[] unassignable (TS2322, from cheaper-inference#9911).

All fixed in source (keeps the gates meaningful); each reproduces on the base tip.

Co-authored-by: OmniRoute maintenance <maintainers@omniroute.local>

* fix(quality): allowlist onnxruntime-node in dependency allowlist (cheaper-inference#9985)

check:deps base-red — onnxruntime-node is a real production dep (transformers
embedding path) landed via the LLMLingua/transformers bump (cheaper-inference#9962) without an
allowlist entry. Legit package: microsoft onnxruntime, verified in registry.

* fix(quality): rebaseline CodeQL ratchet 1->2 for cheaper-inference#9940 fingerprint alerts (cheaper-inference#9985)

Base-red: 2nd js/insufficient-password-hash alert on chatBodyAdmission API-key
fingerprints (sha256->16-hex admission-lane key), not password verification.
Reproduces on release/v3.8.50 tip. Owner-authorized rebaseline (revisit v3.9.0).

* fix(quality): green release/v3.8.50 unit base-reds (cheaper-inference#9985)

8 unit-test base-reds reproducing on the pristine release tip, fixed in-source
(fast-gates PR->release do not run the unit suite, so these accrued silently):
- ServiceSupervisor: spawn-failure now resolves with error status (was throwing);
  health-probe-failure path still rejects. Distinct via spawnFailed flag.
- stream + responseSanitizer: numeric passthrough id preserved as string (was
  regenerated chatcmpl-); finish chunk with empty delta no longer swallowed by
  the emptyChoices guard.
- proxyFetch: genuine (non-abort) proxy transport failures keep the underlying
  reason in the surfaced error.
- auto-combo builtinCatalog: advertised undefined-variant auto/* ids (auto/chat,
  auto/best-chat, auto/pro-chat) materialize instead of throwing 'Unknown'.
- getTranslations en.json: add missing providers.iconUrlInvalid.
- optional-transformers-dependency.test: reconcile to cheaper-inference#9962's deliberate
  move of @huggingface/transformers to a regular dep (napi onnxruntime).

Co-authored-by: OmniRoute maintenance <maintainers@omniroute.local>

---------

Co-authored-by: Diego Rodrigues de Sa e Souza <diegosouzapw@gmail.com>
Co-authored-by: OmniRoute maintenance <maintainers@omniroute.local>
Co-authored-by: diegosouzapw <diegosouzapw@users.noreply.github.com>
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.

2 participants