mirror of
https://github.com/usestrix/strix.git
synced 2026-10-22 05:23:43 +00:00
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> |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| test_agent_factory_shell.py | ||
| test_agent_tool_registration.py | ||
| test_auth_cli.py | ||
| test_cli_target_list.py | ||
| test_codex_auth.py | ||
| test_codex_streaming.py | ||
| test_config_loader.py | ||
| test_cost_tracking.py | ||
| test_docker_client_delete.py | ||
| test_execution.py | ||
| test_hooks.py | ||
| test_inputs.py | ||
| test_local_dir_staging.py | ||
| test_local_sources.py | ||
| test_model_retry.py | ||
| test_models.py | ||
| test_notes.py | ||
| test_optional_deps.py | ||
| test_provider_hints.py | ||
| test_proxy_client.py | ||
| test_proxy_renderer.py | ||
| test_report_pdf.py | ||
| test_report_writer.py | ||
| test_reporting_fields.py | ||
| test_runner_rate_limit.py | ||
| test_runner_root_prompt.py | ||
| test_sarif.py | ||
| test_sarif_stride.py | ||
| test_session_entries.py | ||
| test_skill_dir_extension.py | ||
| test_state_repo_context.py | ||
| test_usage_subscription.py | ||
| test_viewer.py | ||
| test_viewer_auth.py | ||
| test_viewer_runs_gating.py | ||