Repository navigation
fix(codex): size routed roles on the reasoning ladder Codex shows for them - #6761
LilMGenius wants to merge 1 commit into
Conversation
… them Auto-assign took a candidate's efforts from its provider row only. A routed model whose row declares no levels (for example cpa/claude-*) got an empty ladder, so its proposal carried no effort even though Codex's catalog offers low..ultra for it. The mapper now falls back to the written catalog's ladder and default, the same source the Models page reads.
|
✅ Deterministic PR hygiene checks passed. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (4)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review. 📝 WalkthroughWalkthroughThe catalog now exposes reasoning ladders with supported efforts and a validated default. Routed-model candidate selection uses that ladder when the model does not declare reasoning efforts. ChangesRouted model effort fallback
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Sequence Diagram(s)sequenceDiagram
participant RoutedModel
participant modelCandidates
participant catalogModelLadders
participant ProposalGeneration
RoutedModel->>modelCandidates: provide declared reasoning efforts
modelCandidates->>catalogModelLadders: look up catalog ladder when efforts are empty
catalogModelLadders-->>modelCandidates: return supported efforts and valid default
modelCandidates->>ProposalGeneration: provide candidate efforts and default
Merge Risk: ⚪ Minimal · up to The routed-model effort fallback appears ready to merge after normal checks; no unresolved issue is identified. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
✅ READY
Review readiness checklist
✅ 4/4 boxes ticked. This pull request is already Ready for Review. |
…effort ladder, omo tab) (#6785) * fix(codex): mirror LazyCodex role models into the [codex] section omo reads LazyCodex reads per-role overrides from `[codex].agents` in ~/.omo/omo.jsonc. The mirror wrote a bare `codex` key, which LazyCodex's strict config loader drops as unknown, so a role picked in the dashboard reverted to the old model on the next LazyCodex install. * docs(codex): name the [codex] section in the omo.jsonc mirror docs and messages * test(codex): seed the role route tests with the [codex] section The fixtures still wrote a bare "codex" block, which passed only because the writer creates the section it needs. They now start from the shape LazyCodex reads. * fix(codex): size routed roles on the reasoning ladder Codex shows for them Auto-assign took a candidate's efforts from its provider row only. A routed model whose row declares no levels (for example cpa/claude-*) got an empty ladder, so its proposal carried no effort even though Codex's catalog offers low..ultra for it. The mapper now falls back to the written catalog's ladder and default, the same source the Models page reads. * feat(gui): show the LazyCodex role models on the omo tab The section manages omo's Codex variant, so it sits with the other omo controls. It still renders only when LazyCodex is detected, so a Pi-based omo install sees the tab unchanged. * fix(gui): set the LazyCodex section apart from the Pi-based omo block On the omo tab the section's heading ran straight on from the Pi restore center and read as part of it. A rule and spacing now separate the two variants. * test(gui): pin the LazyCodex section to the omo tab and to a detected install * fix(codex): keep the shown default and an explicit empty ladder when sizing routed roles A routed row that declares its own ladder but no default now keeps the default the written Codex catalog shows, when that rung is on the ladder, instead of falling back to the middle rung. An explicit empty reasoningEfforts declares no effort control and no longer borrows the written ladder. Documents the fallback in the auto-assign contract. Co-authored-by: LilMGenius <[email protected]> * docs(devlog): plan the LazyCodex role carry (#6760, #6761, #6762) * test(gui): wait on the LazyCodex roles answer instead of a fixed delay The omo-tab placement test checked the section 30 ms after mounting, so a slow runner could pass the absence checks before the roles request landed or fail the presence check before React rendered. Each step now waits for the state it asserts: the roles answer for the undetected case, the rendered row for the detected case, the panel for the Codex tab. Co-authored-by: LilMGenius <[email protected]> * test(gui): check LazyCodex section placement from a seeded store The omo-tab placement test waited on timing and asserted absence with toBeNull(), which under happy-dom also accepts an HTMLElement, so its absence checks could not fail. It now seeds the role list's store, so the active tab's copy of the section renders in the first commit, and compares the list of panels that carry it: none for a Pi-based omo install, only the omo panel when LazyCodex is detected, none with the Codex tab active. Placing the section on the Codex tab, alone or alongside the omo tab, fails the test. Co-authored-by: LilMGenius <[email protected]> --------- Co-authored-by: LilMGenius <[email protected]>
Summary
Auto-assign maps each role's sized effort onto the reasoning ladder of the model it picks. It took that ladder only from the provider's catalog row (
reasoningEfforts). A routed model whose row declares no levels got an empty ladder, so its proposal carried no effort, even though the catalog opencodex writes for Codex offers itlowtoultrawithmediumas default.Measured on 2.80.0 with
ocx agent roles suggest --json: six of fourteen roles were proposedcpa/claude-sonnet-5-5, and all six hadproposedEffort: null. Every role proposed agpt-6-*model had one.opencodex-catalog.jsonlistssupported_reasoning_levelslow..ultra for thosecpa/claude-*slugs.Change
catalogModelLadders(slugs)insrc/codex/catalog/effort.tsreads each slug's ladder and default from the written catalog.catalogModelEffortsnow derives from it, with the same output as before.modelCandidatesincodex-role-auto-assign.tsfalls back to that ladder and default when the row declares none. A row with its own levels keeps them.The Subagents page's Suggest uses the same candidates, so its routed picks get an effort too.
Verification
glancegiveslow,measuredgives the catalog defaultmedium). It fails ondevand passes with the change.bun test tests/server/codex-role-auto-assign-routes.test.ts: 7 pass.bun x tsc --noEmitpasses.No GUI change.
Checklist
Review readiness checklist
This PR stays in draft until every box below is ticked. Tick all four boxes once the requirements are met:
Required local validation passed; commands, results, and any full-suite exception are documented.
I pushed my PR to a recent dev commit (at most 10 behind; a maintainer may still ask for the exact tip before merge).
I resolved all correct Codex and CodeRabbit findings.
My PR is ready for review.
Summary by CodeRabbit
New Features
Tests