Skip to content

Releases: XTFG/new-api

v0.10.6

25 Jan 04:10

Choose a tag to compare

合并 upstream/main 分支:结合工具名称检查与状态追踪逻辑

v10.0.0.6

19 Dec 15:22

Choose a tag to compare

修复 OpenAI 转 Claude 格式时,工具调用场景下可能出现的多个content_block_start 事件和未正确关闭 content_block 的问题。

v10.0.0.5

18 Dec 17:32
02e1ebe

Choose a tag to compare

为 Vertex 渠道添加 Claude 请求转换开关

What's Changed

  • Feature/vertex claude to gemini switch by @XTFG in #1

New Contributors

  • @XTFG made their first contribution in #1

Full Changelog: v0.9.24...v10.0.0.5

v0.10.1-beta1

18 Dec 17:03

Choose a tag to compare

v0.10.1-beta1 Pre-release
Pre-release
feat: 为 Vertex 渠道添加 Claude 请求转换开关

添加可配置开关以控制 Vertex 渠道中 Claude 模型请求的处理方式:
- 开关关闭(默认):使用原生 Anthropic 端点和格式
- 开关开启:将 Claude 请求转换为 Gemini 格式并发送到 Google 端点

后端修改:
- dto/channel_settings.go: 添加 VertexClaudeToGemini 字段
- relay/channel/vertex/adaptor.go:
  - Init 方法根据开关设置 RequestMode
  - ConvertClaudeRequest 方法在开关开启时调用 Gemini 转换

前端修改:
- EditChannelModal.jsx: 添加开关 UI 控件和相关数据处理逻辑

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

v0.9.24

22 Nov 15:47

Choose a tag to compare

● 修改说明

本次对 service/convert.go 文件进行了两处重要修改:

  1. 修复 tool_result 空内容处理

位置: service/convert.go:167-183

问题: 当工具调用返回空内容时,可能导致消息格式不正确

解决方案:

  • 在 case "tool_result": 中添加空内容检查
  • 当字符串内容为空时,自动替换为 {"stdout":""} 格式
  • 当编码后的JSON字符串为空时,也替换为 {"stdout":""} 格式

代码变更:
// 如果工具返回的内容为空,则替换为默认的stdout格式
if content == "" {
content = {"stdout":""}
}

// 如果编码后的JSON字符串为空,则替换为默认的stdout格式
if jsonStr == "" {
jsonStr = {"stdout":""}
}

  1. 修复 stopReason 空值处理

位置: service/convert.go:453-473

问题: 当 FinishReason 为空字符串时,可能导致停止原因不明确

解决方案:

  • 在 stopReasonOpenAI2Claude 函数开头添加空字符串检查
  • 当传入的 reason 为空字符串时,直接返回默认值 "end_turn"

代码变更:
// 如果传入的reason为空字符串,则返回默认值"end_turn"
if reason == "" {
return "end_turn"
}

影响范围

这些修改主要影响:

  • Claude 到 OpenAI 请求转换过程中的工具结果处理
  • OpenAI 到 Claude 响应转换过程中的停止原因处理
  • 提高了消息格式的一致性和健壮性

v0.8.9.3.3

19 Aug 13:16

Choose a tag to compare

Fix(convert): correct first content_block_delta format in StreamResponseOpenAI2Claude

  - Fix Delta.Type from "text" to "text_delta" for consistency with subsequent deltas
  - Add missing Index field to first content_block_delta response
  - Ensures proper Claude API format compliance for streaming responses

v0.8.9.3.2

19 Aug 07:28

Choose a tag to compare

fix v0 bug

v0.8.9.3.1

19 Aug 05:28

Choose a tag to compare

fix(auth): refine authorization header setting for messages endpoint …

v0.4.6.7

03 Feb 09:53
cc08571

Choose a tag to compare

v0.4.6.7 Pre-release
Pre-release

OpenAI o1和o3系列支持通过模型名称后缀设置 reasoning effort:
添加后缀 -high 设置为 high reasoning effort (例如: o3-mini-high)
添加后缀 -medium 设置为 medium reasoning effort (例如: o3-mini-medium)
添加后缀 -low 设置为 low reasoning effort (例如: o3-mini-low)