generated from songquanpeng/gin-template
-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Open
Sagit-chu/one-api
#109Labels
enhancementNew feature or requestNew feature or request
Description
例行检查
- 我已确认目前没有类似 issue
- 我已确认我已升级到最新版本
- 我已完整查看过项目 README,已确定现有版本无法满足需求
- 我理解并愿意跟进此 issue,协助测试和提供反馈
- 我理解并认可上述内容,并理解项目维护者精力有限,不遵循规则的 issue 可能会被无视或直接关闭
Issue: 添加 Anthropic API 协议支持 | Add Anthropic API Protocol Support
问题描述 (Problem Description)
中文
原始问题:
- Claude Code 发送 Anthropic 协议请求到 one-api 系统
- One-api 系统不支持
/anthropic路由,导致请求无法处理 - 即使请求能够到达,one-api 也无法正确转发 Anthropic 协议到 DeepSeek 的 anthropic 端点
期望结果:
- Claude Code 通过 Anthropic 协议请求 one-api
- One-api 识别 anthropic 协议请求并路由到对应渠道
- 请求直通到 DeepSeek 的 anthropic 端点:
https://api.deepseek.com/anthropic/v1/messages - 响应保持 anthropic 格式直接返回给 Claude Code
English
Current Problem:
- Claude Code sends Anthropic protocol requests to the one-api system
- One-api system does not support
/anthropicrouting, causing requests to fail - Even if requests can reach, one-api cannot correctly forward Anthropic protocol to DeepSeek's anthropic endpoint
Expected Result:
- Claude Code can request one-api using Anthropic protocol
- One-api recognizes anthropic protocol requests and routes to corresponding channels
- Requests pass through to DeepSeek's anthropic endpoint:
https://api.deepseek.com/anthropic/v1/messages - Responses maintain anthropic format and return directly to Claude Code
解决方案 (Solution)
为 one-api 添加原生 Anthropic API 支持,包括:
- 添加
/anthropic/v1/messages路由端点 - 实现 Anthropic 协议适配器
- 支持请求直通到第三方 anthropic 端点
标签: enhancement, api-support
优先级: medium
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request