{"id":47728222,"url":"https://github.com/protolabs42/codex-provider","last_synced_at":"2026-04-02T21:01:39.258Z","repository":{"id":341769511,"uuid":"1168306714","full_name":"protolabs42/codex-provider","owner":"protolabs42","description":"Agent Zero plugin: Use your ChatGPT subscription to power Agent Zero with OpenAI Codex models via OAuth","archived":false,"fork":false,"pushed_at":"2026-03-18T12:12:31.000Z","size":40,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-19T02:47:50.855Z","etag":null,"topics":["agent-zero","ai-agent","chatgpt","codex","oauth","openai","plugin","proxy"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/protolabs42.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-02-27T08:33:58.000Z","updated_at":"2026-03-18T12:12:35.000Z","dependencies_parsed_at":"2026-03-03T11:03:31.731Z","dependency_job_id":null,"html_url":"https://github.com/protolabs42/codex-provider","commit_stats":null,"previous_names":["protolabs42/codex-provider"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/protolabs42/codex-provider","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/protolabs42%2Fcodex-provider","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/protolabs42%2Fcodex-provider/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/protolabs42%2Fcodex-provider/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/protolabs42%2Fcodex-provider/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/protolabs42","download_url":"https://codeload.github.com/protolabs42/codex-provider/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/protolabs42%2Fcodex-provider/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31316104,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-02T12:59:32.332Z","status":"ssl_error","status_checked_at":"2026-04-02T12:54:48.875Z","response_time":89,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["agent-zero","ai-agent","chatgpt","codex","oauth","openai","plugin","proxy"],"created_at":"2026-04-02T21:01:36.720Z","updated_at":"2026-04-02T21:01:39.237Z","avatar_url":"https://github.com/protolabs42.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Codex Provider — Agent Zero Plugin\n\nUse your **ChatGPT Pro, Plus, or Team subscription** to power [Agent Zero](https://github.com/agent0ai/agent-zero) with OpenAI's latest Codex models — no API key required.\n\n## What This Does\n\nThis plugin runs a local proxy inside the Agent Zero container that bridges LiteLLM's OpenAI-compatible calls to ChatGPT's backend Responses API. It authenticates via OAuth (the same device-code flow used by the official [Codex CLI](https://github.com/openai/codex)).\n\n```\nAgent Zero ──► LiteLLM ──► Local Proxy (:8400) ──► chatgpt.com/backend-api/codex/responses\n                           (this plugin)\n```\n\n## Supported Models\n\nThese models are verified working with ChatGPT subscription accounts:\n\n| Model | Description |\n|-------|-------------|\n| `gpt-5.3-codex` | Latest Codex model (recommended) |\n| `gpt-5.2-codex` | Previous-gen Codex |\n| `gpt-5.1-codex` | Earlier Codex |\n| `gpt-5.1-codex-mini` | Lightweight Codex (good for utility/browser) |\n| `gpt-5.2` | Base GPT-5.2 |\n| `gpt-5.1` | Base GPT-5.1 |\n\nModels **not** supported via this method: `codex-mini-latest`, `o3`, `o4-mini`, `gpt-4.x`, `gpt-4o`.\n\n## Installation\n\n1. Copy this entire `codex-provider/` directory into your Agent Zero `usr/plugins/` folder:\n\n   ```bash\n   # If running via Docker (recommended):\n   docker cp codex-provider/ agent-zero:/a0/usr/plugins/codex-provider/\n   docker compose restart agent-zero\n\n   # If running directly:\n   cp -r codex-provider/ /path/to/agent-zero/usr/plugins/\n   ```\n\n2. Open Agent Zero's web UI, go to **Settings \u003e Plugins** and verify \"Codex Provider\" appears.\n\n## Setup\n\n### Option A: Device Code Flow (Recommended)\n\n1. Open the **Codex Provider** plugin dashboard in Agent Zero\n2. Click **\"Sign in with OpenAI\"**\n3. A code appears (e.g. `ABCD-1234`) — enter it at the OpenAI verification page that opens\n4. Once approved, the plugin automatically:\n   - Stores your OAuth tokens\n   - Starts the local proxy\n   - Configures Agent Zero to use the proxy\n\n### Option B: Import from Codex CLI\n\nIf you already use the [Codex CLI](https://github.com/openai/codex):\n\n1. Run `codex auth login` on your machine\n2. Copy the contents of `~/.codex/auth.json`\n3. Paste them into the \"Import Tokens\" section of the plugin dashboard\n\n### Option C: Manual Token Import\n\nPaste an access token and/or refresh token directly via the dashboard.\n\n## How It Works\n\n### OAuth Authentication\n\nThe plugin uses OpenAI's device code authorization flow — the same flow the official Codex CLI uses. Your browser opens a verification page where you sign in with your ChatGPT account. The plugin receives OAuth tokens and stores them securely in the plugin config.\n\nTokens refresh automatically. You can also manually refresh or revoke tokens from the dashboard.\n\n### Proxy Architecture\n\nThe proxy listens on `127.0.0.1:8400` inside the container (not exposed externally) and handles two endpoint types:\n\n- **`/v1/responses`** — Near-passthrough for LiteLLM's Responses API calls (primary path for Codex models)\n- **`/v1/chat/completions`** — Transforms standard chat completion format to Responses API format\n\nBoth routes forward to `chatgpt.com/backend-api/codex/responses` with the required authentication headers.\n\n### Auto-Start\n\nWhen `auto_configure` is enabled (set automatically after successful authentication), the proxy starts on the first agent message loop via the `_10_codex_proxy.py` extension.\n\n## Configuration\n\nThe plugin settings page exposes:\n\n| Setting | Default | Description |\n|---------|---------|-------------|\n| `proxy_port` | `8400` | Local proxy port |\n| `chat_model` | `gpt-5.3-codex` | Default chat model |\n| `auto_configure` | `false` | Auto-start proxy on agent init |\n\nAdvanced users can edit `config.json` directly in the plugin's data directory.\n\n## File Structure\n\n```\ncodex-provider/\n├── plugin.yaml                          # Plugin manifest\n├── default_config.yaml                  # Default settings\n├── api/\n│   ├── oauth.py                         # OAuth device code + PKCE handlers\n│   ├── configure.py                     # Apply settings to Agent Zero\n│   └── status.py                        # Proxy health \u0026 status\n├── helpers/\n│   ├── oauth_manager.py                 # OAuth flow logic (device code, PKCE, refresh)\n│   └── proxy_server.py                  # aiohttp proxy server\n├── extensions/\n│   └── python/message_loop_start/\n│       └── _10_codex_proxy.py           # Auto-start extension\n└── webui/\n    ├── main.html                        # Plugin dashboard UI\n    ├── config.html                      # Settings panel\n    └── codex-store.js                   # Alpine.js frontend state\n```\n\n## Requirements\n\n- **Agent Zero** development branch (plugin system required)\n- **ChatGPT Pro, Plus, or Team subscription** (free accounts won't work)\n- **Python 3.12+** with `aiohttp` (included in Agent Zero's Docker image)\n\n## Disclaimer\n\nThis plugin uses ChatGPT's backend API (`chatgpt.com/backend-api`) and the Codex CLI's public OAuth client ID for authentication. These are the same endpoints and credentials used by [OpenAI's official Codex CLI](https://github.com/openai/codex).\n\n**Important:**\n- This is an unofficial plugin, not endorsed by OpenAI\n- The backend API is undocumented and may change without notice\n- Use of this plugin is subject to OpenAI's [Terms of Service](https://openai.com/policies/terms-of-use)\n- Your ChatGPT subscription usage through this plugin counts against your account's rate limits\n- No tokens, credentials, or user data are sent anywhere except to OpenAI's official servers\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprotolabs42%2Fcodex-provider","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprotolabs42%2Fcodex-provider","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprotolabs42%2Fcodex-provider/lists"}