{"id":51214802,"url":"https://github.com/bdcdo/strixcodex","last_synced_at":"2026-06-28T03:31:16.715Z","repository":{"id":361053117,"uuid":"1245202623","full_name":"bdcdo/strixcodex","owner":"bdcdo","description":"Local OpenAI-compatible proxy bridging Strix AI to the ChatGPT Codex backend","archived":false,"fork":false,"pushed_at":"2026-05-29T01:43:47.000Z","size":67,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-29T03:22:05.680Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bdcdo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-21T02:24:58.000Z","updated_at":"2026-05-29T01:43:49.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/bdcdo/strixcodex","commit_stats":null,"previous_names":["bdcdo/strixcodex"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/bdcdo/strixcodex","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bdcdo%2Fstrixcodex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bdcdo%2Fstrixcodex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bdcdo%2Fstrixcodex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bdcdo%2Fstrixcodex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bdcdo","download_url":"https://codeload.github.com/bdcdo/strixcodex/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bdcdo%2Fstrixcodex/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34876271,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-28T02:00:05.809Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-06-28T03:31:14.481Z","updated_at":"2026-06-28T03:31:16.169Z","avatar_url":"https://github.com/bdcdo.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# strixcodex\n\nLocal OpenAI-compatible proxy that bridges **Strix AI** (autonomous pentest agent)\nto the **ChatGPT Codex backend**, so you can run Strix using your **ChatGPT Pro**\nsubscription instead of paying for OpenAI API tokens.\n\nInspired by and reusing OAuth code from\n[`simonw/llm-openai-via-codex`](https://github.com/simonw/llm-openai-via-codex)\n(Apache-2.0).\n\n```\nStrix (LiteLLM, Chat Completions)\n        ↓ http://localhost:8787/v1/chat/completions\nstrixcodex proxy   ← translates Chat Completions ↔ Responses\n        ↓ https://chatgpt.com/backend-api/codex/responses\nChatGPT Codex backend (auth via OAuth from ~/.codex/auth.json)\n```\n\n## Why this exists\n\n- Strix uses LiteLLM and speaks `/chat/completions`.\n- The ChatGPT Codex backend only speaks the Responses API (`/responses`).\n- This proxy translates between the two formats, including streaming SSE and tool calls,\n  while reusing the OAuth tokens that the official `codex` CLI stores locally.\n\n## Prerequisites\n\n- ChatGPT Pro (or Plus, with Codex access).\n- [`codex`](https://github.com/openai/codex) CLI installed and logged in (`codex login`).\n- Python 3.10+, [`uv`](https://docs.astral.sh/uv/) (or `pip`).\n- Strix AI installed (see [docs.strix.ai](https://docs.strix.ai/)).\n\n## Install\n\n```bash\nuv sync\n# or:\npip install -e .\n```\n\n## Run the proxy\n\nStrix runs inside a Docker container, so the proxy must listen on `0.0.0.0`\nand Strix must dial it via `host.docker.internal` (which Strix already maps\nto `host-gateway` automatically — see `strix/runtime/docker_runtime.py`).\n\n```bash\nuv run python -m strixcodex --host 0.0.0.0\n# listens on http://0.0.0.0:8787\n```\n\nSmoke test (from the host):\n\n```bash\ncurl -fsS http://127.0.0.1:8787/healthz\ncurl -fsS http://127.0.0.1:8787/v1/models | jq\ncurl http://127.0.0.1:8787/v1/chat/completions \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n    \"model\": \"gpt-5.4\",\n    \"messages\": [{\"role\":\"user\",\"content\":\"reply with the word ok\"}]\n  }'\n```\n\n## Run Strix through the proxy\n\nStrix runs a connectivity probe against `LLM_API_BASE` from the host **before**\nlaunching its Docker sandbox (`strix/interface/main.py:230`). On Linux,\n`host.docker.internal` does not resolve on the host, only inside containers,\nso the URL must use an IP that works from both sides — the `docker0` bridge\ngateway (typically `172.17.0.1`) does.\n\n```bash\n# from the directory you want Strix to analyze\nexport STRIX_LLM=\"openai/gpt-5.4\"\nexport LLM_API_KEY=\"anything-non-empty\"\nexport LLM_API_BASE=\"http://172.17.0.1:8787/v1\"\nstrix -t .\n```\n\nOr use the helper that boots the proxy and exports the right env:\n\n```bash\ncd /path/to/target\n/path/to/strixcodex/scripts/run-strix.sh -t .\n```\n\nOn startup the helper checks PyPI for a newer `strix-agent` release and, in an\ninteractive terminal, asks whether to run `uv tool upgrade strix-agent` before\nlaunching. The check is non-blocking — if you are offline or PyPI is\nunreachable it is skipped silently — and non-interactive runs only print the\nupgrade command. It runs at most once a day, caching the result under `$XDG_CACHE_HOME/strixcodex` (default `~/.cache/strixcodex`). Disable it entirely with `STRIX_VERSION_CHECK=0`.\n\n## Tests\n\n```bash\nuv run pytest\n```\n\nTranslator tests cover round-trips of: simple prompts, system messages, tool definitions,\nassistant-with-tool-call → tool-result chains, image attachments, streaming text deltas,\nand streaming tool-call argument assembly.\n\n## Limitations and caveats\n\n- The Codex endpoint is **semi-official**: tolerated by OpenAI (\"use Codex wherever you\n  like\" — Romain Huet, OpenAI) but not a public API. It can change without notice.\n- Run the proxy **bound to 127.0.0.1 only**. Do not expose it.\n- Strix executes code autonomously. With this setup it runs against **your personal\n  ChatGPT account** — only target systems you are authorized to test.\n- The Codex backend may have stricter rate / context limits than the paid API.\n- Embeddings, image generation, and audio endpoints are **not** implemented; only\n  `/v1/chat/completions` and `/v1/models`.\n\n## License\n\nMIT for the original code in this repo. The vendored `borrow_codex_key` helper\nin `strixcodex/auth.py` is Apache-2.0 from `simonw/llm-openai-via-codex`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbdcdo%2Fstrixcodex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbdcdo%2Fstrixcodex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbdcdo%2Fstrixcodex/lists"}