shaw
d754be0d8e
refactor(gateway): 抽取 CC forwarder 公共管线并拆分两大 service 文件
PR #3802 遗留项:三个 CC forwarder(raw 直转 / responses 回退 / messages
回退)间约 85% 重复的 HTTP 管线与 SSE 循环骨架收敛到新文件
openai_gateway_cc_pipeline.go,messages / chat_completions 两条主路径中
逐字相同的错误处理块一并接入。各路径有意保留的行为差异(GLM effort
归一化、fast policy 适用范围、ClientDisconnect 语义、Grok 分支等)留在
调用方,未强行统一。
同时对两个最臃肿的网关文件做纯移动拆分(零语义变化,逐字节校验):
- openai_gateway_service.go 7821→4872 行:
调度 → openai_gateway_scheduling.go
passthrough → openai_gateway_passthrough.go
用量/计费/codex 快照 → openai_gateway_usage.go
- gateway_service.go 10912→7294 行:
调度 → gateway_scheduling.go
Anthropic APIKey 直通 → gateway_anthropic_passthrough.go
Bedrock → gateway_bedrock.go
回归保障:全部搬迁块与 HEAD 逐字节 diff 一致;留存文件经"HEAD 减去搬迁
范围"重构比对,差异仅为 goimports 移除的孤儿 import;定向单测
(fallback/raw/cyber/grok/transport/调度/用量/广域 Forward-Handle 扫描)
全绿;另经独立对抗审计确认零行为差异。
2026-07-07 22:14:46 +08:00
..
2026-07-07 15:14:37 +08:00
2026-07-06 12:22:04 +08:00
2026-07-07 22:14:46 +08:00
2026-07-06 14:25:10 +08:00
2026-07-07 03:27:11 +08:00
2026-07-01 14:25:46 +08:00
2026-01-11 23:00:31 +08:00
2026-03-07 15:17:16 +08:00
2026-07-01 14:25:46 +08:00
2026-07-02 11:42:10 +08:00
2026-07-02 11:42:10 +08:00
2026-07-01 14:25:46 +08:00