Skip to content

[good first issue-platform adapt-Cursor] Add Cursor Pro Proxy routing proposal - #1139

Open
li6667 wants to merge 2 commits into
TencentCloud:feat/server_teamfrom
li6667:feat/cursor-pro-adapter
Open

li6667 wants to merge 2 commits into
TencentCloud:feat/server_teamfrom
li6667:feat/cursor-pro-adapter

Conversation

@li6667

@li6667 li6667 commented Aug 23, 2026 •

Copy link
Copy Markdown

Description | 描述

Add a design proposal for an optional Cursor Pro TencentDB Proxy routing mode.

The proposal documents the difference between Cursor Free/Auto and Cursor Pro, the current MCP + Hooks integration boundary, and a future design that uses Cursor's OpenAI-compatible custom endpoint capability to route model traffic through TencentDB Proxy.

The proposal covers:

  • Cursor Free/Auto model and endpoint restrictions;
  • Current conversation capture and memory read/write capabilities;
  • Why MCP + Hooks cannot directly inject TencentDB memory into the model request path;
  • Cursor Pro custom endpoint routing through TencentDB Proxy;
  • Gateway authentication, identity mapping, memory injection, provider forwarding, response streaming, and conversation capture;
  • Proposed user_key, team_id, agent_id, task_id, and session_id mapping;
  • Required validation for streaming, tool calls, reasoning fields, usage fields, authentication headers, session IDs, retries, timeouts, cancellation, and multiple providers.

This is a design proposal for review and future implementation. The corresponding runtime code has not been developed. I do not have a Cursor Pro account, so I cannot complete local end-to-end testing of this logic.

The existing Hooks + MCP implementation remains the formal Cursor Free/Auto adapter. The proposed Proxy routing path is optional, and its implementation should be developed and reviewed independently.

Related Issue | 关联 Issue

Related to #1138
Refs #926

Change Type | 修改类型

  • Bug fix | Bug 修复
  • New feature | 新功能
  • Documentation update | 文档更新
  • Code optimization | 代码优化

Self-test Checklist | 自测清单

  • Documentation reviewed locally | 文档已本地检查
  • No existing features affected | 不影响现有功能

Additional Notes | 其他说明

This PR intentionally contains a design proposal only. Cursor Pro endpoint behavior and runtime compatibility require validation in the official environment.

Signed-off-by: lishun <2976909322@qq.com>
@Maxwell-Code07

Copy link
Copy Markdown
Collaborator

Thank you so much for your attention and contribution! We will arrange an internal review for this PR shortly, and all feedback will be shared right here in the discussion.

@yangjj-iso yangjj-iso left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

感谢这份结构清晰的 proposal,对 Hooks+MCP 集成边界的分析和验证清单都很有价值。但在推进前需要修改几处:

阻断性问题:

缺少中文版文档。 Issue #926 明确要求中英文两版在同一 PR 中提交(CI 强制校验),本 PR 仅有英文 PROPOSAL.md,按规则无法合并,请补充对应中文文档。

文档定位与仓库现状不符。 文中大篇幅描述的网关认证、身份映射、记忆注入、provider 转发、流式透传等能力,MemoryProxy 已实现,Claude Code / Codex / CodeBuddy 等平台均已按“base URL 指向 Proxy”的方式接入。Cursor Pro 适配真正需要交付的是:① 双语配置文档(custom endpoint 指向 Proxy);② 验证清单的实际测试结果(流式、tool calls、reasoning/usage 字段、会话 ID、重试超时等)。建议将文档重构为“基于现有 MemoryProxy 的 Cursor Pro 接入方案 + 验证计划”,而非重新设计网关。

核心前提未验证却以事实陈述。 “自定义 OpenAI 兼容端点仅 Pro 可用”是整篇文档的立论基础,但作者自述没有 Cursor Pro 账号无法验证,且历史上 Cursor 的 custom API key / OpenAI 兼容端点并非严格按套餐划分。请把这一点改为文档开头的“待验证假设”,并在真实账号验证后再确认 Free/Pro 分层结论。

对"current adapter"的引用有误导。 文中所称的现有 Hooks+MCP 适配器实为另一个未合并的 PR #1138,仓库中尚不存在。请显式引用 #1138 并说明依赖关系;同时本 PR 为纯文档、无运行时代码,请移除 Closes #926(#1138 也声明了 Closes,两者冲突),建议改为作为 #1138 的配套设计文档关联。

非阻断建议:

task_id 映射来源描述模糊且与 session_id 边界不清;#1138 已用 conversation_id + generation_id 配对,此处也应给出具体字段来源。
建议补充失败模式差异说明:Hooks 路径 fail-open(记忆故障不阻塞 Cursor),Proxy 路径天然 fail-closed(Proxy 不可用则模型请求失败),用户接入前应知晓该取舍。
建议增加隐私说明:模型全量流量经 Proxy 意味着提示词与代码均经过网关,需用户知情。
Change Type 建议只勾选 “Documentation update”。

Signed-off-by: lishun <2976909322@qq.com>
@li6667

li6667 commented Aug 24, 2026

Copy link
Copy Markdown
Author

Thanks for the detailed review. I have revised the proposal accordingly:

  • Added the corresponding Chinese document.
  • Reframed the proposal around integrating Cursor with the existing MemoryProxy rather than redesigning gateway capabilities.
  • Changed the custom-endpoint plan boundary into a hypothesis that requires real-account validation.
  • Explicitly referenced [good first issue-platform adapt-Cursor] Add Memory adapter for Cursor #1138 and documented this PR as its companion design proposal.
  • Clarified the proposed sources and boundaries of task_id, session_id, conversation_id, and generation_id.
  • Added the Hooks fail-open versus Proxy fail-closed behavior.
  • Added a privacy notice for routing prompts, code context, tool data, and responses through the Proxy.
  • Kept the complete validation matrix and made it explicit that no runtime test results are claimed yet.

I also replaced Closes #926 with Related to #1138 and Refs #926 in the PR description.

@li6667

li6667 commented Aug 30, 2026

Copy link
Copy Markdown
Author

Hi @962673247, a quick follow-up on the proxy-based Cursor adaptation requested in this thread:

The implementation has been completed and submitted in #1138. It follows the provided integration checklist and includes:

  • Cursor Proxy adapter and native AskQuestion session-init flow
  • Skill / Memory / Knowledge injection
  • mem: command interception, L0 archiving, and Skill extraction
  • DeepSeek reasoning_content replay compatibility
  • Langfuse traces tagged with agent_source:cursor
  • Sanitized protocol fixtures and real Cursor E2E recordings
  • Compatibility with the latest feat/server_team; merge conflicts have been resolved
  • Current test result: 7 test files / 23 tests passed

Implementation and evidence: #1138

When convenient, could you please review the latest revision or help route it to the appropriate maintainer? Thank you again for the detailed integration guidance.

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.

3 participants