Deadwalk
bfadc4e2e0
fix(anthropic): improve MCP tool message handling and error resilience
...
修复Anthropic协议中MCP工具消息处理问题,增强错误恢复能力:
- 改进MessageContent的JSON解析,支持原始JSON数据保留
- 移除对空内容的过滤,避免丢失MCP工具消息
- 增加详细调试日志,便于问题排查
- 优化错误响应处理,保留响应体信息
- 修复路由转发时可能的数据丢失问题
fix(anthropic): improve MCP tool message handling and error resilience
- Enhance MessageContent JSON parsing to preserve raw JSON data
- Remove empty content filtering to prevent MCP tool message loss
- Add detailed debug logging for troubleshooting
- Optimize error response handling with response body preservation
- Fix potential data loss during routing
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-09-30 08:29:38 +08:00
Deadwalk
a587ac145a
feat(anthropic): support both string and array content formats
...
- Add MessageContent type to handle both string and array content formats
- Implement UnmarshalJSON to automatically detect content format
- Add ToContentArray() method for unified content processing
- Update Message and Response structs to use MessageContent
- Fix all content processing logic in main.go and controller
- Resolve JSON parsing errors for different content formats
支持Anthropic协议字符串和数组内容格式:
- 添加MessageContent类型处理字符串和数组两种内容格式
- 实现UnmarshalJSON自动检测内容格式
- 添加ToContentArray()方法统一内容处理
- 更新Message和Response结构体使用MessageContent
- 修复main.go和controller中的所有内容处理逻辑
- 解决不同内容格式的JSON解析错误
2025-09-29 16:52:19 +08:00
Deadwalk
008ffe4662
feat: 支持Anthropic API协议 | support Anthropic API protocol
...
- 添加Anthropic适配器实现 | Add Anthropic adaptor implementation
- 支持Anthropic消息格式转换 | Support Anthropic message format conversion
- 添加Vertex AI Claude适配器支持 | Add Vertex AI Claude adapter support
- 更新Anthropic的中继模式定义 | Update relay mode definitions for Anthropic
- 添加Anthropic控制器和路由 | Add Anthropic controller and routing
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: zgdmemail@gmail.com
2025-09-28 11:13:55 +08:00
wanthigh
c368232f50
fix: changeoptional field to pointer type ( #1907 )
...
* fix:修复在渠道配置中设置模型重定向时,temperature为0被忽略的问题
* fix: set optional fields to pointer type
---------
Co-authored-by: JustSong <songquanpeng@foxmail.com >
2024-11-09 23:31:46 +08:00
Mikey
0fc07ea558
feat: add support for Claude 3 tool use (function calling) ( #1587 )
...
* feat: add tool support for AWS & Claude
* fix: add {} for openai compatibility in streaming tool_use
2024-07-02 00:12:01 +08:00
JustSong
24ed170e7b
chore: reorganize adaptor related package
2024-04-06 01:36:48 +08:00