Análise profunda do provedor OpenAI Codex — modelos, autenticação, recursos e configuração.
O provedor Codex conecta o scorpiox code ao backend OpenAI Codex via autenticação OAuth Bearer. Ele se comunica com a API backend do ChatGPT e suporta streaming, pensamento estendido, uso de ferramentas, chamadas de função, visão e atualização automática de tokens.
O Codex usa autenticação OAuth Bearer via header Authorization. Os tokens são gerenciados pelo scorpiox-codex-fetchtoken e podem ser obtidos de três fontes:
CODEX_TOKEN_SOURCE=localscorpiox-codex-fetchtoken. Default mode — no network calls needed for token acquisition. The token file is stored alongside your scorpiox configuration.CODEX_TOKEN_SOURCE=remoteCODEX_REMOTE_URL. Default URL: https://token.scorpiox.net/codex. Useful for centralized token management across teams.CODEX_TOKEN_SOURCE=sshCODEX_SSH_HOST, CODEX_SSH_USER, CODEX_SSH_PASS, and CODEX_SSH_PORT. Ideal for air-gapped or private infrastructure environments.Todas as configurações do Codex são armazenadas em scorpiox-env.txt na raiz do projeto. Execute scorpiox-config para configurar interativamente.
| Key | Description | Default |
|---|---|---|
| PROVIDER | Set to codex to use this provider | scorpiox |
| MODEL | Model name or alias (e.g. gpt-5.3-codex) | sonnet |
| TOOLS | Enable/disable all tool execution | 1 |
| CODEX_TOKEN_SOURCE | Token acquisition method: local, remote, ssh | local |
| CODEX_REMOTE_URL | Remote HTTP endpoint for token fetching | https://token.scorpiox.net/codex |
| CODEX_SSH_HOST | SSH hostname for remote token retrieval | — |
| CODEX_SSH_USER | SSH username | — |
| CODEX_SSH_PASS | SSH password | — |
| CODEX_SSH_PORT | SSH port number | — |
| Feature | Codex | Claude Code | Anthropic | Gemini | OpenAI | Router |
|---|---|---|---|---|---|---|
| Streaming | ✓ | ✓ | ✓ | — | — | ✓ |
| Thinking | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| Tool Use | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| Function Calling | ✓ | — | — | — | — | — |
| Vision | ✓ | — | — | — | — | — |
| Token Refresh | ✓ | ✓ | — | — | — | — |
| Context Caching | — | — | — | ✓ | — | — |
| Auth Method | OAuth Bearer | OAuth Bearer | x-api-key | API Key | API Key | None |
The Codex provider is implemented as a single-file C module following the scorpiox provider interface pattern:
All providers compile as part of libsxnet and are statically linked into the sx binary. Zero runtime dependencies — the Codex provider uses raw socket HTTP built into scorpiox's networking layer.