mirror of
https://github.com/headroomlabs-ai/headroom.git
synced 2026-08-27 14:17:10 -04:00
Bug 3 fix is now consistent across all three Codex entry points. Subscription (ChatGPT plan) users will always have their traffic routed through headroom regardless of whether they reached Codex config via `headroom wrap codex`, `headroom init codex`, or the persistent-install provider scope — all three now write `openai_base_url` at the TOML top-level (outside any `[model_providers.*]` block) so Codex's built-in openai provider is intercepted even when subscription auth bypasses the `model_provider = "headroom"` selection. Changes: - headroom/cli/init.py: add `openai_base_url` line to `_ensure_codex_provider` block; add `_strip_codex_init_block` helper with orphan-key cleanup (mirrors `_strip_codex_headroom_blocks` in wrap.py) - headroom/providers/codex/install.py: add `openai_base_url` line to `apply_provider_scope` section; add orphan-cleanup regexes and apply them in `revert_provider_scope` to handle crash-recovery scenarios - tests/test_install/test_providers.py: add `test_apply_provider_scope_writes_openai_base_url`, `test_persistent_install_strip_removes_openai_base_url` - tests/test_cli/test_init_cli.py: add `test_init_codex_writes_openai_base_url`, `test_init_codex_strip_removes_openai_base_url` Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| test_init_cli.py | ||
| test_install_cli.py | ||
| test_main_help_version.py | ||
| test_mcp.py | ||
| test_wrap_aider.py | ||
| test_wrap_bridge.py | ||
| test_wrap_codex.py | ||
| test_wrap_copilot.py | ||
| test_wrap_openclaw.py | ||
| test_wrap_persistent.py | ||