Skip to content

feat(cursor): add compat chat-completions path and finalize no-thinking output behavior#2153

Closed
yifancao9211 wants to merge 6 commits intolbjlaq:mainfrom
yifancao9211:main
Closed

feat(cursor): add compat chat-completions path and finalize no-thinking output behavior#2153
yifancao9211 wants to merge 6 commits intolbjlaq:mainfrom
yifancao9211:main

Conversation

@yifancao9211
Copy link

Cursor 客户端配置(推荐)

  1. 进入 Cursor Settings -> Models,在 OpenAI 模型区域添加并启用你的目标模型(例如 claude-opus-4-6)。
  2. Settings -> API Keys 中启用 OpenAI API Key,并填入 Antigravity 服务的 API Key。
  3. 打开 Override OpenAI Base URL,填写你的网关地址:
    http://127.0.0.1:8045/cursor
  4. 不要在 Base URL 中手动追加 /chat/completions,Cursor 会自动拼接该路径。
  5. 完成后,Cursor 实际请求路径应为:
    /cursor/chat/completions
  6. 请确保该 Base URL 对 Cursor 运行环境可访问;如果你的服务是本地地址(如 127.0.0.1)且需要跨设备/外网访问,建议先做内网穿透并使用可访问的公网地址。

思考展示模式可在页面 API 反代服务 -> 多协议支持 -> Cursor 思考展示模式 直接设置。
优先级:页面配置 > ANTI_CURSOR_REASONING_MODE 环境变量 > 默认 think_tags

caoyifan and others added 6 commits February 27, 2026 14:47
Introduce /cursor/chat/completions as a Cursor-oriented OpenAI compatibility layer with multi-dialect input normalization, response sanitization, protocol monitoring updates, and docs/UI sync.
…lish

Expose Cursor reasoning visibility as a front-end setting in the multi-protocol section, wire it to runtime hot-update config, and remove request-header override behavior for deterministic rendering.
…ation

Drop the Cursor reasoning mode config surface and enforce response-side reasoning stripping only. Improve non-stream performance by parsing JSON only when reasoning_content is detected and lower cursor response body cap to 16MB.
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.

1 participant