Repository navigation
Never hand Codex an unsupported Web source mode - #512
Dreamkeeper wants to merge 1 commit into
Conversation
Since the 0.54 port the Codex provider only supports Auto/OAuth/CLI and rejects SourceMode::Web outright. The desktop shell's default cookie source is "manual", so pasting a chatgpt.com Cookie header for Codex mapped the provider to Web and every refresh failed with "Source mode 'Web' not supported for this provider". Add the inverse of the existing Cli remap in build_fetch_context: if the resolved mode is Web and the provider does not advertise Web in available_sources(), fall back to the configured usage source (or Auto). Co-Authored-By: Claude Fable 5.1 <[email protected]>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthroughChangesCodex source-mode handling
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix · Severity of issue fixed: Medium Suggested reviewers: Merge Risk: ⚪ Minimal · up to The source-mode fallback prevents unsupported Web mode from reaching Codex while preserving supported explicit configuration. No actionable merge risk remains. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 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 |
Thermo-nuclear code-quality reviewReviewed head 0a8a0f6 against main using the full thermo-nuclear maintainability rubric. No high-confidence thermo findings. The change is a small, localized source-mode guard with focused tests and does not add structural, abstraction, boundary, orchestration, or file-size regression. |
Summary
On Windows 11 with the released
0.60.3build, the tray panel showed this for Codex on every refresh:while
codexbar-cli.exe usage -p codexworked fine (OAuth,supported_sources: ["auto","oauth","cli"]).Since the 0.54 port
CodexProvider::fetch_usagerejectsSourceMode::Weboutright, but the desktop shell can still produce it: the default cookie source is"manual", andbuild_fetch_contextmapsmanual+ a stored cookie toSourceMode::Webfor every provider with a cookie domain. Pasting a chatgpt.com Cookie header for Codex (the Codex cookie section still offers it) therefore breaks all Codex refreshes, even though the provider never reads that cookie.Fix
build_fetch_context: if the resolved mode isWeband the provider does not listWebinavailable_sources(), fall back to the configured usage source (orAuto).Auto, and an explicitoauthusage source is preserved.Local verification
manual_cookies.json/settings.json(Codex entry present, nocookie_sourceoverride).Checks
🤖 Generated with Claude Code
Summary by CodeRabbit