Replace the separate STRIX_AUTH_MODE flag with a sentinel model value:
STRIX_LLM=openai/subscription selects the authenticated ChatGPT subscription,
and any other value is a normal API-key model. The env vars that already run
Strix are now the single source of truth — no second mode to keep in sync.
Encapsulate the behavior instead of branching everywhere:
- StrixProvider.get_model routes the sentinel to a _CodexResponsesModel backed
by a cached OAuth client (no global default-client mutation, no per-call
client churn).
- _CodexResponsesModel self-enforces the backend's requirements — streaming,
store=false, encrypted reasoning, and the configured reasoning effort — so the
runner, warm-up, and make_model_settings no longer special-case subscription.
Remove now-unneeded machinery: STRIX_AUTH_MODE/AuthMode, the
"incompatible model" warning, the non-OpenAI model coercion, the
make_model_settings codex flag, and the global set_default_openai_client wiring.
run.json still records a derived auth_mode so the viewer/telemetry/cost display
are unchanged. Switching modes is now just editing STRIX_LLM.
Sentinel-only (no per-model override): a subscription run uses gpt-5.4.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Add an OAuth-based path to run Strix on a user's ChatGPT Plus/Pro
subscription instead of a metered API key, modeled on OpenAI's Codex CLI.
Auth:
- strix/auth: Codex OAuth login (authorization-code + PKCE), a 0600 token
store, refresh-on-expiry, and an AsyncOpenAI client that routes inference
through the ChatGPT backend (chatgpt.com/backend-api/codex) with a
per-request auth hook so long scans survive token expiry.
- `strix auth login|logout|status` CLI (browser loopback on :1455 with a
manual-paste fallback); STRIX_AUTH_MODE=subscription persisted to config.
Inference wiring:
- Subscription branch in configure_sdk_model_defaults installs the Codex
client and the Responses API.
- _CodexResponsesModel always streams (the backend rejects non-streamed
requests) and aggregates back for the non-streaming get_response path.
- store=false + encrypted reasoning for the stateless backend; models
coerced to plan-available names (default gpt-5.4 — 5.5+ apply stricter
content moderation that interferes with security testing).
UX / reporting:
- Track tokens but report $0.00 in the TUI, completion panel, and web
viewer run details; record auth_mode in run.json and PostHog/Scarf.
- Graceful, actionable errors for unavailable models and expired sign-in.
- Restyled OAuth callback page (Strix branding + link to strix.ai).
Tests: PKCE/URL/redirect parsing, token refresh + account-id, streaming
aggregation, cost zeroing, CLI routing/provider aliasing.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
feat(inputs): implement logic for required tool choice based on model
test(inputs): add tests for force_required_tool_choice behavior
test(runner): update tests to include force_required_tool_choice in settings