Skip to content

fix(cli): enable WebSockets for Codex Magpie - #3830

Merged
Leeeon233 merged 1 commit into
LodyAI:mainfrom
joei4cm:fix/codex-magpie-supports-websockets
Dec 5, 2026
Merged

Leeeon233 merged 1 commit into
LodyAI:mainfrom
joei4cm:fix/codex-magpie-supports-websockets

Conversation

@joei4cm

@joei4cm joei4cm commented Dec 4, 2026

Copy link
Copy Markdown
Contributor

Related issue

Closes #3721

Problem / pressure

Codex defaults model_providers.*.supports_websockets to false. Lody's Codex/Magpie Responses provider omitted the field, preventing the WebSocket upgrade and causing follow-up turns to re-upload conversation history over HTTP. The fix needs to stay scoped to the generated Codex/Magpie provider configuration.

Summary

  • Add supports_websockets: true to the Codex/Magpie provider configuration shared by CODEX_CONFIG and LODY_CODEX_PROFILE_CONFIG.
  • Extend the existing Magpie runtime regression to assert the field, verify both Codex environment overlays carry the same configuration, and verify the Pi provider configuration does not gain the Codex-specific field.
  • Existing Kimi, Grok, Bub, catalog-validation, and capability tests remain in the same focused suite.

Visual explanation

Simple change: one generated provider capability field plus assertions on the resulting Codex and Pi configuration objects; no control flow, data ownership, or runtime lifecycle changes.

Before / after

Before After
Codex/Magpie omits supports_websockets, so Codex uses its default false. Codex/Magpie explicitly sets supports_websockets: true.
The regression checks the general Codex profile but not WebSocket support. The regression checks WebSocket support, matching Codex overlays, and non-propagation to Pi.

Test plan

  • NODE_OPTIONS="--max-old-space-size=4096" pnpm --filter lody exec vitest run src/agent/magpie-runtime.test.ts — passed: 1 test file, 8 tests.
  • NODE_OPTIONS="--max-old-space-size=4096" pnpm --filter lody typecheck — passed.
  • NODE_OPTIONS="--max-old-space-size=4096" pnpm check:quick — passed lint and repository boundary guards.
  • NODE_OPTIONS="--max-old-space-size=4096" pnpm run docs check --base origin/main — passed with no errors; existing documentation warnings remain.
  • pnpm format — passed.
  • Not run: the full pnpm check / complete repository test suite, because the task requested focused tests only. No live Codex/Magpie WebSocket acceptance was performed.

Context handoff

Original user prompt

Show original prompt
请开始实现 lody issue #3721:Codex-Magpie provider 需要补上 `supports_websockets`。先重读 issue、当前 `apps/cli/src/agent/magpie-runtime.ts`、相关测试和贡献规则;从最新 main 建小分支。实现只限于在 Codex/Magpie provider 配置中加入 `supports_websockets: true`,并新增/扩展回归测试断言该字段存在且其他 provider 不受影响。按仓库要求跑定向测试和必要的仓库门禁;提交使用 Conventional Commits,AI 提交按规则加 Model footer。完成后创建 Draft PR,关联 Fixes/Closes #3721,填写 PR 模板和公开 Context handoff(我们授权发布本次任务所需的原始提示与共享会话状态)。不要 merge。Node/pnpm 验证可加 NODE_OPTIONS="--max-old-space-size=4096";只跑定向测试,必要时 pnpm --filter ...。完成后回报分支、Draft PR、测试结果和剩余风险。

Shared conversation

Status: unavailable
Reason: OpenCode V2 in this authoring environment provides session export but no public HTTP(S) conversation-publishing operation. The user authorized publication of the original prompt and conversation-sharing status in the triggering request.

@joei4cm
joei4cm marked this pull request as ready for review December 5, 2026 10:11
@Leeeon233
Leeeon233 enabled auto-merge December 5, 2026 13:01
@Leeeon233
Leeeon233 added this pull request to the merge queue Dec 5, 2026
Merged via the queue into LodyAI:main with commit e46234b Dec 5, 2026
17 of 27 checks passed
@github-actions github-actions Bot mentioned this pull request Dec 5, 2026
@joei4cm
joei4cm deleted the fix/codex-magpie-supports-websockets branch December 5, 2026 14:05
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.

[Bug] Codex-Magpie provider omits supports_websockets, forcing full HTTP history re-upload on every turn

2 participants