Repository navigation
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2c1ccabfce
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
roboomp
left a comment
There was a problem hiding this comment.
Thanks for the detailed capture work and mitmproxy verification, @jroth1111 — the proto/schema alignment is careful and well-documented.
Ranked P3, driven by one blocking correctness gap plus scope/behavior concerns:
- Blocking: the headline routed-model extraction (
cursor.ts:4581) is a no-op in production.output.modelis initialized tomodel.id("auto"forCURSOR_AUTO_MODEL) and never reset to"default", so the guardoutput.model !== "default"always skips. The two new tests pass only because they hardcodeoutput.model = "default". As written, the gateway echoes"auto"rather than the actual routed model — the exact thing the PR claims to fix. - Default-behavior change (maintainer call): switching all three gateway encoders to
message.model || requestedModelIdalters themodelfield echoed to every provider's clients, not just Cursor. Needs sign-off or narrower scoping. - Grab-bag scope: the #9480/#9415 zero-billed empty-stop fallback (+295-line test) and the shared
handleRetryableErrorsemantics change are unrelated to Cursor and should be their own PR; thepackage.jsonreindent is stray noise. - Source-of-truth: inline hand-declared
GetDefaultModelForCli*schemas diverge from the generator; several.protoedits never reachcursor-proto.ts.
Open questions for the maintainer: is the global model-echo change intended for all providers, and is there confirmed intent to land Cursor auto-mode? Fixing the extraction guard and splitting the turn-recovery fix out would move the Cursor half toward mergeable.
2c1ccab to
d89246a
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d89246adee
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ba7692b556
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3aafe3b41a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6c90c2dce5
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f0771c8ed8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a48715a0ac
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 031eafd994
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
031eafd to
e20f7c6
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e20f7c66cf
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2f2c8fe421
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
35d5d25 to
e720cb6
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e720cb6e5e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ca20e14677
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 730670974b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 48f6c88fcb
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| // Ignore the initial start placeholder; only a later observation | ||
| // (possibly the same concrete id after routing) releases deferral. | ||
| if (options?.cursorAutoMode === true && sawModelObservation) { | ||
| cursorAutoRoutingResolved = true; | ||
| } | ||
| sawModelObservation = true; |
There was a problem hiding this comment.
Resolve auto routing only from a routing signal
When x-cursor-auto-mode: true is used with a concrete model ID, the first content event before the routing checkpoint is already the second partial.model observation, so this marks routing resolved and flushes message_start/the OpenAI envelopes with the pre-routing model; a later checkpoint routing to a different model cannot repair Anthropic's start envelope. Fresh evidence is that the current early-content regression scenario explicitly permits text_start before the checkpoint, while this code treats that ordinary repeated partial as proof that routing completed. Propagate an explicit checkpoint/routed-model signal instead of counting model observations.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 461ac52: synthetic auto wires as default; passthrough rejects toolChoice any and forced server-only tools; Cursor release notes moved under Unreleased.
|
Related
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 37bfb76cd2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| } | ||
| if (providersWithCreds.has("cursor")) { | ||
| modelById.set("cursor/auto", CURSOR_AUTO_MODEL); | ||
| if (!modelById.has("auto")) modelById.set("auto", CURSOR_AUTO_MODEL); |
There was a problem hiding this comment.
Reserve the bare auto ID for Cursor routing
When the gateway has both Cursor and OpenRouter credentials, the bundled OpenRouter auto model is indexed during the loop first, so this has("auto") guard prevents the synthetic Cursor router from claiming the bare ID. A client sending the documented {"model":"auto"} request is then silently routed to OpenRouter instead of Cursor; make the intended Cursor precedence explicit or require the provider-qualified ID.
Useful? React with 👍 / 👎.
| * exec frame). Passthrough must not advertise them — Cursor would finish the | ||
| * work server-side while an OpenAI-shaped client still receives a ToolCall to run. | ||
| */ | ||
| const CURSOR_PASSTHROUGH_SERVER_ONLY_TOOLS: ReadonlySet<string> = new Set(["connect_scm"]); |
There was a problem hiding this comment.
Exclude native todo calls from passthrough
Fresh evidence beyond the earlier connect_scm fix is that update_todos and read_todos are also explicitly handled as server-resolved, no-exec interaction calls at lines 4234-4257, but this set excludes only connect_scm. When a passthrough caller declares todo, the allowlist still enables Cursor's native todo implementation, so Cursor mutates todo state server-side and the gateway surfaces the resolved block as a tool call for the external client to execute again; exclude todo or suppress its interaction branch in passthrough mode.
Useful? React with 👍 / 👎.
| object: "chat.completion", | ||
| created: Math.floor(Date.now() / 1000), | ||
| model: requestedModelId, | ||
| model: message.model || requestedModelId, |
There was a problem hiding this comment.
Preserve requested model IDs in non-streaming responses
Fresh evidence beyond the streaming model-ID finding is that the non-streaming encoder remains unconditional here. For a request using a provider-qualified ID such as cursor/gpt-5, the resolved AssistantMessage.model is the catalog's bare gpt-5, so the response no longer echoes the requested ID even when auto routing is disabled; the same unconditional substitution remains in the Anthropic and Responses encoders. Only report message.model for actual Cursor auto routing, otherwise retain requestedModelId.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e749b71937
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
fix(gc): address post-merge Codex findings on omp gc --compress
… add pricing Antigravity discovery serves Gemini 4 Argon as gemini-4-argon-low/-medium/-high SKUs, which showed as three models. A google-level variant family folds them into one gemini-4-argon row with low, medium, and high thinking levels, each routed to its SKU. The existing Antigravity pricing peer prices it at Google's first-party rate; the regenerated bundle carries it. Cursor's GetUsableModels carries no pricing, so Argon gets Cursor's published $2/$10, $0.10 cache-read card.
Neither discovery mapper read its gateway's pricing, so every row fell back to stencil.so or the bundle: Gemini 4 Argon showed $4/$20 on both against a live $2/$10, and many Kilo and NanoGPT rows showed $0. Kilo now maps its OpenRouter-shaped per-token pricing; NanoGPT requests its detailed roster and maps its per-million card (cache legs per thousand tokens). Names and limits keep their existing sources; legs a gateway leaves unpriced still fall back.
Google ends Argon's introductory $2/$10 ($0.10 cached) price on 2026-11-30 and bills $4/$20 ($0.20 cached) from 2026-12-01, midnight US Pacific when Cloud Billing's day starts. cost-patch now accepts the dated effective-rates cards cost-fallback already had, so a rule can move a price on a date without a catalog update. Google, Vertex, and Antigravity Argon rows take the dated card over whatever stencil.so or the bundled pricing peer reports; Cursor, which bills Other Models at the model's API price, schedules it on its own card. Cursor's rich-discovery card reader honors the same cards.
Dated cost-patch/cost-fallback cards were applied only when a row was built, so a row reused past the change (the committed Antigravity Argon bundle row, a model cache, a long session) kept billing the old price. buildModel now compiles every price period into cost.timeBased.effectiveRates, with a leading card for the pre-change price, under a schedule with no peak windows and a 1x multiplier; calculateUsageCost picks the card by request timestamp. hasRecurringTariff separates these dated-only schedules from peak/off-peak tariffs: no status-line arrow, and stats reprices a recorded $0 on them at the card for the request's date instead of freezing it. The Antigravity bundle is regenerated so its Argon row carries the schedule.
…ice in force Google's Argon rule carried only the 2026-12-01 card, so once upstream reported $4/$20 the pre-switch period derived from it vanished and a row built afterwards priced November requests at list. The rule now pins the $2/$0.10/$10 card beside it. Price displays read the row's scalar legs, which keep the card current when the row was built, so a bundle, cache or long session showed a superseded price; getEffectiveTokenCost returns the card in force and the model browser and omp models --json use it. This also corrects DeepSeek V4 Pro, listed at $1.32/$3.96 though billed at its $0.30/$1.20 card since 2026-09-14.
…dules on rebuilt rows and Cursor sibling lanes
…Argon thinking tiers and add pricing (@eggpeat)
…rom their live model lists (@eggpeat)
…pt card; Ctrl+C clears an approval draft
…proved input; queue Enter behind a landing paste
…s; a steer denies queued approvals too
Spawn acknowledgments no longer repeat the background-job contract; the Task description carries it once, and same-name extension replacements inherit it through AgentTool.delegationGuidance.
…l descriptions (@iliaal)
…rl+O to expand; drop transcript-card matching
…rows clipped to width
…ding details restarts the approval timeout
…uring tool approval, drop duplicated call details (@H4vC)
What
Contributor's own words:
Ports Cursor Auto routing, client-owned tool passthrough and Auto-only gateway model echo onto current upstream
581eaeecfb. Includes the focused wire-alignment foundation from #11324 and keeps its commits shared between the branches. Drops obsolete generated protobuf output, debug tests and historical changelog noise.Why
Locked scope remains: Cursor Auto, gated routed-model echo and tool passthrough. Empty-stop recovery/retry changes remain separate (#9487). Explicit and non-Cursor response model IDs remain stable. Streaming encoders wait for an explicit routing signal, not repeated
partial.modelobservations. Routed-model events propagate through agent, RPC and generated SDK surfaces; newer upstream occupancy and transport fixes are retained.Live testing exposed the old allowlist bug: Cursor's installed CLI validates allowed-tool filters against protobuf
ToolCallcase names, not OMP function names. Passthrough now advertises client-owned definitions—including bash/read/write—through MCP and allows onlyget_mcp_tools_tool_call,mcp_tool_call; named choices narrow those definitions, undeclared names are rejected, and no-tools uses the CLI's empty-filter representation. Native hosted tool categories remain disabled. Required/any choices remain unsupported rather than silently weakened. A named choice constrains availability; no unconditional guarantee that the model will call a tool is asserted.Discovery preserves account-authoritative models and default-model wire identity without overwriting a failed catalog. Auto pricing is variable, not free. Cursor credential cooldown uses the current credential-aware dispatch interface. The contributor sentence is motivation, not an entitlement guarantee or quota bypass.
Testing
bun run check:tspasses: lint, formatting and all package TypeScript checks. Full rootbun check/ Rust suite is not claimed.cargo check.cursor-grok-4.5-highin both the result model and upstream-model metadata. This is a server-reported label, not Opus 5.5 proof.nonce_reportand client-ownedbashprobes each returned exactly one call with nonce-matching arguments andstopReason: toolUse. No local shell command or tool was executed during these handoff probes.Follow-up verification (10 October, Melbourne)
All three branches incorporate upstream 581eaee. No review comments were posted or threads resolved; policy decisions and comment approval remain separate from code fixes.
Live first-packet regression (10 October, Melbourne)
The actual Cursor CLI and this account's live wire capture agree: TTFT fields 1-5 are doubles, and field 8 is independent of the streamed-message oneof. A packet containing both timing and text was previously rejected or reduced to timing-only, losing the reply prefix. The corrected source and regenerated codec preserve both wire orders. The regression fails with the old codec and passes with the fix.
A fresh compiled fork binary, and then the installed ompf 18.8.7, each returned the complete random UUID byte-for-byte. This is Cursor inference/output-integrity evidence, not Opus 5.5 evidence. Original failed receipts remain retained privately.
bun checkpasses