fengsilin
|
f1a68027f1
|
Revert "feat(cache): OpenAI→Claude 转换自动注入 prompt caching"
This reverts commit ff14caed7c.
|
1 mês atrás |
fengsilin
|
ff14caed7c
|
feat(cache): OpenAI→Claude 转换自动注入 prompt caching
- ClaudeRequest 新增 CacheControl 字段
- RequestOpenAI2ClaudeMessage 自动注入顶层 cache_control: {"type":"ephemeral"}
- System 复合内容和普通消息 content block 的 CacheControl 透传
- ParseContent 新增 []MediaContent 类型断言,修复透传路径
- 新增 8 个单元测试覆盖自动注入、透传、序列化等场景
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
1 mês atrás |
fengsilin
|
2d1a8d2f28
|
fix: 设置 chat_id + 优化日志查询参数构建
- Claude 和 OpenAI Responses 转发中设置 RelayChatID
- 日志查询使用 URLSearchParams 替代手动字符串拼接
- 日志查询日期范围改为可选,不再强制默认今天
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
1 mês atrás |
fengsilin
|
f0f0215b20
|
fix(pricing): 修复缓存倍率写入默认值1和缓存创建token丢失
1. CopyGlobalPricing 检查 ratio 查找的 bool 返回值,未找到时写 0
而非写入 fallback 值 1,避免覆盖全局正确的 0.1
2. Claude 响应使用 GetCacheCreationTotalTokens() 替代直接读
CacheCreationInputTokens,兼容新版本子对象格式
3. 新增 GetAudioRatioV2/GetAudioCompletionRatioV2 带 bool 返回
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
2 meses atrás |
fengsilin
|
296edf0f71
|
fix: 移植上游关键 bug 修复
从 QuantumNous/new-api 上游移植以下修复:
- fix(ssrf): 加固视频代理和 MJ 图片代理的 SSRF 防护,FetchModels 提权至 RootAuth
- fix(claude): 流式断流时不再整份覆盖 usage,保留 cache 计费字段
- fix(pricing): 定价接口增加用户可用分组过滤
- fix(ratio): compact 模型优先匹配精确定价再回退通配符
- fix(ali): 接受 task polling 返回的字符串类型 usage 值
- fix(gemini): 从 URL 路径 :streamGenerateContent 检测流式请求
- fix(zhipu_4v): coding plan 图片生成使用正确的 OpenAI endpoint
- fix(openai): MessageImageUrl.Detail 字段添加 omitempty
- fix(channel-affinity): skip_retry_on_failure 配置项为 false 时不再丢失
- fix(document-renderer): 使用 useMemo 替代 useState 处理 HTML payload
- fix(fetch-setting): ApplyIPFilterForDomain 默认值改为 true
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
2 meses atrás |
winter
|
08164cd0ae
|
fix
|
4 meses atrás |