- 14 Apr, 2026 1 commit
-
-
b2e379cf 引入的 BufferedResponseAccumulator 已修复了 chat_completions 非流式路径和 responses OAuth 非流式路径,但遗漏了 Anthropic /v1/messages 非流式路径 (handleAnthropicBufferedStreamingResponse)。 当客户端请求 stream=false 且模型开启思考时,上游 response.completed 终态事件的 output 字段可能为空,实际 message 内容通过 response.output_text.delta 增量事件下发。旧代码只读终态事件的 Response, 导致客户端收到的 content 字段为空 ([{"type":"text"}])。 本 commit 将 b2e379cf 的相同修复模式镜像到 Anthropic 路径:在 SSE 扫描 过程中用 BufferedResponseAccumulator 累积 delta 内容,终态 output 为空 时通过 SupplementResponseOutput 补充重建。 同时修复 handleAnthropicBufferedStreamingResponse 遗漏 response.done 事件类型的问题,与 chat completions 路径保持一致,避免上游发送 response.done 时 handler 认不出终态事件、最终返回 502 的潜在问题。 BufferedResponseAccumulator 已在 chatcompletions_responses_test.go 有 完整单元测试覆盖(TextOnly/ToolCalls/Reasoning/Mixed/SupplementEmpty/ NoSupplementWhenOutputExists/EmptyDeltas/IgnoresNonFunctionCallItems), 本次复用相同累加器无需新增测试。
-
- 09 Apr, 2026 1 commit
-
-
IanShaw027 authored
-
- 08 Apr, 2026 1 commit
-
- 07 Apr, 2026 1 commit
-
-
Alex authored
-
- 04 Apr, 2026 1 commit
-
-
erio authored
Eliminates unnecessary indirection layer. The wrapper function only called normalizeCodexModel with a special case for "gpt 5.3 codex spark" (space-separated variant) that is no longer needed. All call sites now use normalizeCodexModel directly.
-
- 03 Apr, 2026 2 commits
-
-
Anthropic compat requests normalize reasoning suffixes before forwarding, but the account mapping step was still using the raw request model. Resolve billing and upstream models from the normalized compat model so explicit account mappings win over fallback defaults. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent ) Co-authored-by:
Sisyphus <clio-agent@sisyphuslabs.ai>
-
陈曦 authored
-
- 31 Mar, 2026 1 commit
-
-
InCerry authored
Anthropic compat requests normalize reasoning suffixes before forwarding, but the account mapping step was still using the raw request model. Resolve billing and upstream models from the normalized compat model so explicit account mappings win over fallback defaults. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent ) Co-authored-by:
Sisyphus <clio-agent@sisyphuslabs.ai>
-
- 29 Mar, 2026 1 commit
-
-
YanzheL authored
-
- 24 Mar, 2026 1 commit
-
-
InCerry authored
-
- 17 Mar, 2026 1 commit
-
-
Ethan0x0000 authored
Propagate UpstreamModel through ForwardResult and OpenAIForwardResult in Anthropic direct, API-key passthrough, Bedrock, and OpenAI gateway flows. Extract optionalNonEqualStringPtr and optionalTrimmedStringPtr into usage_log_helpers.go. Store upstream_model only when it differs from the requested model. Also introduces anthropicPassthroughForwardInput struct to reduce parameter count.
-
- 16 Mar, 2026 1 commit
-
-
QTom authored
根因:多个用户共享同一 OAuth 账号时,conversation_id/session_id 头 未做用户隔离,导致上游 chatgpt.com 将不同用户的请求关联到同一会话。 HTTP SSE 修复: - 新增 isolateOpenAISessionID(apiKeyID, raw),将 API Key ID 混入 session 标识符(xxhash),确保不同 Key 的用户产生不同上游会话 - buildUpstreamRequest: OAuth 分支先 Del 客户端透传的 session 头, 再用隔离值覆盖 - buildUpstreamRequestOpenAIPassthrough: 透传路径同样隔离 - ForwardAsAnthropic: Anthropic Messages 兼容路径同步修复 - buildOpenAIWSHeaders: WS 路径的 OAuth session 头同步隔离
-
- 14 Mar, 2026 1 commit
-
-
Wang Lvyuan authored
-
- 11 Mar, 2026 1 commit
-
-
shaw authored
将 /v1/chat/completions 端点从 ResponseWriter 劫持模式重构为独立的 类型安全转换路径,与 Anthropic Messages 端点架构对齐: - 在 apicompat 包新增 Chat Completions 完整类型定义和双向转换器 - 新增 ForwardAsChatCompletions service 方法,走 Responses API 上游 - Handler 改为独立的账号选择/failover 循环,不再劫持 Responses handler - 提取 handleCompatErrorResponse 为 Chat Completions 和 Messages 共用 - 删除旧的 forwardChatCompletions 直传路径及相关死代码
-
- 09 Mar, 2026 5 commits
-
-
kyx236 authored
1. 识别OpenAI "An error occurred while processing your request" 临时性400错误 并触发failover,同时在池模式下标记RetryableOnSameAccount,允许同账号重试 2. ForwardAsAnthropic路径同步支持临时性400错误的识别和同账号重试 3. HelpTooltip组件使用Teleport渲染到body,修复在dialog内被裁切的问题
-
erio authored
Two SSE scanners in openai_gateway_messages.go were hardcoded to 1MB while all other scanners use defaultMaxLineSize (500MB) with config override. This caused Responses API streams to fail on large payloads.
-
shaw authored
-
shaw authored
-
shaw authored
-
- 07 Mar, 2026 2 commits
- 06 Mar, 2026 4 commits
-
-
shaw authored
-
神乐 authored
-
alfadb authored
- Add recoverAnthropicMessagesPanic for Messages handler to return Anthropic-formatted errors instead of OpenAI Responses format on panic - Add nil check for rateLimitService.HandleUpstreamError in ForwardAsAnthropic to match defensive pattern used elsewhere Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
alfadb authored
Add Anthropic Messages API support for OpenAI platform groups, enabling clients using Claude-style /v1/messages format to access OpenAI accounts through automatic protocol conversion. - Add apicompat package with type definitions and bidirectional converters (Anthropic
↔ Chat, Chat↔ Responses, Anthropic↔ Responses) - Implement /v1/messages endpoint for OpenAI gateway with streaming support - Add model mapping UI for OpenAI OAuth accounts (whitelist + mapping modes) - Support prompt caching fields and codex OAuth transforms - Fix tool call ID conversion for Responses API (fc_ prefix) - Ensure function_call_output has non-empty output field Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-