Skip to content

feat(codex): prefer upstream websockets for responses#3562

Open
hemo94931 wants to merge 1 commit into
router-for-me:devfrom
hemo94931:dev
Open

feat(codex): prefer upstream websockets for responses#3562
hemo94931 wants to merge 1 commit into
router-for-me:devfrom
hemo94931:dev

Conversation

@hemo94931
Copy link
Copy Markdown

配置项中添加:codex-prefer-upstream-websockets: false
用于控制 codex下游http/sse连接cpa时,cpa是否使用websocket与OpenAI建立连接(需要auth的json文件配置"websockets":true,否则回退为http)

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces the codex-prefer-upstream-websockets configuration option, allowing ordinary HTTP/SSE requests to prefer Codex credentials configured with websockets and utilize the upstream websocket transport. It adds context helpers to propagate this preference, updates the CodexAutoExecutor to route requests accordingly, and modifies the scheduler and selector logic to prioritize websocket-enabled credentials when the preference is active. Additionally, comprehensive unit tests have been added to verify the new behavior. I have no feedback to provide as there are no review comments to address.

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.

1 participant