Skip to content

Fix OpenAI WS tool continuation recovery#2241

Open
Hundun-Online wants to merge 3 commits intoWei-Shaw:mainfrom
Hundun-Online:codex/ws-function-call-output-recovery
Open

Fix OpenAI WS tool continuation recovery#2241
Hundun-Online wants to merge 3 commits intoWei-Shaw:mainfrom
Hundun-Online:codex/ws-function-call-output-recovery

Conversation

@Hundun-Online
Copy link
Copy Markdown

Summary\n- preserve previous_response_id for function_call_output turns when WS ingress preflight ping recovery reconnects\n- allow a one-time connection drift after a broken strict-affinity connection while keeping tool continuation context intact\n- apply temp-unschedulable rules to OpenAI response.failed SSE events using a synthetic 502 so stream-level capacity/overload failures can influence scheduling\n\n## Tests\n- go test ./internal/service -run 'Test.*OpenAIWS|Test.*FunctionCall|Test.*ToolContinuation|Test.*Streaming|Test.*TempUnsched|Test.*ErrorPolicy'\n- go test ./internal/handler -run 'TestHandleFailoverError|TestOpenAI|Test.*Failover'

- Keep gin v1.9.1 (v1.11+ breaks Get() API compatibility)
- Fix quic-go at v0.57.1 (req/v3 v3.57.0 depends on ConnectionTracingID)
- Upgrade other Go dependencies (go mod tidy)
- Sync frontend package-lock.json
## 版本亮点

修复 OpenAI 兼容接口中未知模型被默认模型静默兜底的问题,请求会保留原始模型并透传上游错误。

## Bug 修复

- OpenAI 模型转发:移除未知 GPT 模型自动回退到分组默认模型的逻辑,避免无效模型被错误转发为默认模型
- 计费记录:保持渠道未映射请求按实际上游计费模型记录,避免计费模型被原始请求模型覆盖

## 优化改进

- 模型支持:补充 gpt-5.4-nano 本地兜底计费价格
- 测试覆盖:增加未知模型不兜底、OAuth 透传和模型归一化相关用例
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 7, 2026

Thank you for your contribution! Before we can merge this PR, we need you to sign our Contributor License Agreement (CLA).

To sign, please reply with the following comment:

I have read the CLA Document and I hereby sign the CLA

You only need to sign once — it will be valid for all your future contributions to this project.


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants