fengsilin
|
0e3b98efe0
|
chore: commit relay SSE error handling fixes and E2E mock server
- relay: SSE stream error exposure improvements (Claude/Gemini/OpenAI)
- test: add mock capture server for E2E relay capture testing
Co-Authored-By: Claude <noreply@anthropic.com>
|
2 settimane fa |
fengsilin
|
1d01c4cd64
|
feat: 增强流式响应错误处理,SSE内嵌错误正确曝光为API错误
- Gemini stream: 捕获 promptFeedback.blockReason 后停止流并返回 OpenAPI 错误
- OpenAI stream: 检测 SSE 帧中的 error 响应,在首帧写入前转换为 API 错误
- Responses stream: 处理 response.error / response.failed / error 类型帧
- 新增 ClearEventStreamHeadersIfNotWritten 工具方法,错误转换时清除流式头
- 新增 streamOpenAIErrorFromData,从 SSE data 帧提取 OpenAPI 错误结构
- 上游错误体会截断后存入 UpstreamBody 供排障
Co-Authored-By: Claude <noreply@anthropic.com>
|
3 settimane fa |
fengsilin
|
8945f8c39e
|
fix: synced 用户剩余额度取 synced_quota + 记录 chat ID
- 前端用户列表:synced 用户显式取 synced_quota 字段作为剩余额度
- 各 OpenAI handler 中记录 relayChatID 用于日志追踪
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
2 mesi fa |
fengsilin
|
e41f2951f7
|
fix: preserve relay body and capture invalid responses body
|
2 mesi fa |
fengsilin
|
caf457ce9e
|
feat: 错误时记录上游响应体,支持流式
- 提取 TruncateBody 公共函数,截断到 2KB 避免日志过大
- 新增 handleResponsesStreamError 统一 SSE 错误提取逻辑
- 流式/非流式 Responses API 错误路径均捕获 UpstreamBody
- 添加 upstream_body 和 truncate_body 单元测试
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
2 mesi fa |
winter
|
08164cd0ae
|
fix
|
4 mesi fa |