You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit f607233
Browse filesBrowse the repository at this point in the historyBrowse files
feat(server): advertise api_types and capabilities on the raw /v1/models list (#3230)
* feat(server): advertise api_types and capabilities on the raw /v1/models list
Cursor's local-agent runtime (the Private Inference build) enables its
reasoning-effort control only when a model row carries api_types and,
optionally, a capabilities object. Emit both on every row of the OpenAI-shape
list: api_types is constant (chat_completions, responses, anthropic_messages;
membership is load-bearing for Cursor's wire selector and guarded by a unit
test), capabilities carries context_length, supports_vision and the
reasoning_effort ladder when the catalog knows them.
Plain OpenAI clients, Grok Build and the Codex catalog branch ignore the new
keys. The combo e2e assertions that compared whole row literals now match on
the combo-relevant shape while keeping is_combo presence explicit.
* fix(server): include output_modalities so Cursor keeps enriched rows
Cursor's local-agent runtime drops any api_types row whose capabilities
lack output_modalities containing "text", which silently disabled the
effort control on every row. Emit output_modalities: ["text"] and mirror
input_modalities when the catalog knows them. Verified live in Cursor
Private Inference 3.18.25: the picker shows Low/Medium/High/Extra High for
gpt-5.6-sol and a High turn arrives as reasoning.effort=high on /v1/responses.
* fix(server): report the effective context window, not the provider cap
contextWindow is already narrowed by providerContextCaps; contextCap is the
raw operator knob and is set on every row of a capped provider even when the
cap did not bite, so preferring it over-reported models whose real window
sits below the cap. Freeze the shared api_types constant and copy it per row.
* fix(server): omit context_length when it floors to zero
positiveInt accepted 0.5 and then floored it to 0, which would emit an
invalid zero context length instead of omitting the field (CodeRabbit).
* feat(server): advertise the native long-context tier for Cursor Max Mode
Cursor's local-agent runtime shows a Context selector (default vs long
window, long marked as costing more) when a model row carries a long-context
threshold below its context_length. It reads that threshold only from
pricing.overrides[].min_prompt_tokens; a cost.long_context object fails its
row schema. For native GPT-5.6 rows advertise the family's 272k default and
922k opt-in pair through nativeOpenAiContextTier; routed rows have no
separate tier and stay unchanged.
* fix(catalog): drop the native long-context tier under any window lever below it
A per-model window override or provider window below the long window must
remove the tier the same way a provider cap does; otherwise the row keeps
advertising 922k while the effective window is smaller (CodeRabbit).
---------
Co-authored-by: jun <[email protected]>
0 commit comments