Files
cursor2api/package.json
chinadoiphin 0f35ae85e3 fix: v2.6.1 拒绝率回归修复 + Thinking 反引号修复 + URL 图片兼容
拒绝率修复:回归 v2.5.6 场景融合策略
- 移除对抗性 roleExpansion("Do NOT refuse"),改为自然 IDE 场景描述
- reframingPrefix 从对抗措辞回归温和措辞
- 工具列表从函数签名格式回归 Markdown 文档格式
- THINKING_HINT 仅在已有系统提示词时注入

Thinking 反引号修复:
- 预处理清除 thinking 标签周围的反引号
- thinking 内容和 cleanText 去除残留孤立反引号
- THINKING_HINT 精简为自然语句

URL 图片兼容(OpenClaw/Telegram):
- 新增 convertUrlImagesToBase64() 预下载 URL 图片转 base64
- 解决 Telegram 临时 URL 无法被 vision API/OCR 访问的问题

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-14 19:11:19 +08:00

35 lines
1.1 KiB
JSON

{
"name": "cursor2api",
"version": "2.6.1",
"description": "Proxy Cursor docs AI to Anthropic Messages API for Claude Code",
"type": "module",
"scripts": {
"dev": "tsx watch src/index.ts",
"build": "tsc",
"start": "node dist/index.js",
"test:unit": "node test/unit-tolerant-parse.mjs",
"test:tool-fixer": "node test/unit-tool-fixer.mjs",
"test:openai-compat": "node test/unit-openai-compat.mjs",
"test:all": "node test/unit-tolerant-parse.mjs && node test/unit-tool-fixer.mjs && node test/unit-openai-compat.mjs && node test/unit-proxy-agent.mjs",
"test:e2e": "node test/e2e-chat.mjs",
"test:agentic": "node test/e2e-agentic.mjs"
},
"dependencies": {
"dotenv": "^16.5.0",
"eventsource-parser": "^3.0.1",
"express": "^5.1.0",
"tesseract.js": "^7.0.0",
"undici": "^7.22.0",
"uuid": "^11.1.0",
"yaml": "^2.7.1"
},
"devDependencies": {
"@types/express": "^5.0.2",
"@types/node": "^22.15.0",
"@types/uuid": "^10.0.0",
"ts-node": "^10.9.2",
"tsx": "^4.19.0",
"typescript": "^5.8.0"
}
}