Skip to content

sdk:responses ignores reasoning.effort and uses the model's default reasoning variant #28

Description

@Juddd

Summary

The local sdk:responses bridge accepts OpenAI Responses requests containing reasoning.effort, but silently drops that value before calling the Cursor SDK.

As a result, clients such as Codex can select a reasoning level through model_reasoning_effort or /model, yet Cursor still uses the model's default reasoning variant.

Reproduction

Use Codex with the local Responses proxy:

model = "gpt-5.6-sol"
model_provider = "cursor"
model_reasoning_effort = "high"

[model_providers.cursor]
name = "Cursor Composer"
base_url = "http://127.0.0.1:8791/sdk/v1"
wire_api = "responses"

Start the proxy:

CURSOR_SDK_PROXY_CWD="$PWD" npm run sdk:responses

A request captured at the proxy boundary contains:

{
  "model": "gpt-5.6-sol",
  "reasoning": {
    "effort": "high",
    "context": "all_turns"
  },
  "stream": true
}

However, the Cursor Usage Dashboard records the run as:

gpt-5.6-sol-medium

Changing the reasoning level through Codex /model produces the same result.

Root cause

In scripts/cursor-sdk-responses-proxy.mjs:

  • handleCreateResponse() reads and normalizes body.model, but does not read body.reasoning.
  • agent.send(), Agent.resume(), and Agent.create() receive only:
model: { id: model }

The Cursor SDK supports model parameters through ModelSelection.params. For gpt-5.6-sol, Cursor.models.list() currently reports:

reasoning: none, low, medium, high, xhigh, max
context:   272k, 1m
fast:      false, true
default:   context=1m, reasoning=medium, fast=false

This explains why the resolved variant is always medium when the proxy omits the parameter.

Expected behavior

When the request supplies a supported reasoning.effort, map it to the Cursor SDK model selection:

{
  id: model,
  params: [{ id: "reasoning", value: effort }]
}

The selection should be applied per request to Agent.create(), Agent.resume(), and agent.send(), so changing the level through Codex /model works without restarting the proxy.

If the model does not advertise a reasoning parameter, the proxy should omit it or return a clear validation error rather than sending an unsupported value. If reasoning.effort is absent, the current Cursor default should remain unchanged.

Environment

  • Linux
  • @cursor/sdk@1.0.13
  • Codex CLI 0.144.4
  • Local npm run sdk:responses bridge

The issue appears to be in the cross-platform Node bridge rather than Linux-specific behavior.

Related precedent

The project already maps public model variants to Cursor SDK params in sdkModelSelection():

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions