axio-transport-codex¶
ChatGPT OAuth transport using the Responses API.
It reads the stream through axio-responses, which it shares with
axio-transport-openai. Its ProviderEvents therefore say provider="openai".
- class axio_transport_codex.CodexTransport(name: 'str' = 'ChatGPT (Codex)', api_key: 'str' = '', refresh_token: 'str' = '', expires_at: 'str' = '', account_id: 'str' = '', base_url: 'str' = 'https://chatgpt.com/backend-api/codex', model: 'ModelSpec' = <factory>, models: 'ModelRegistry' = <factory>, session: 'aiohttp.ClientSession | None' = None, on_auth_refresh: 'Callable[[dict[str, str]], Awaitable[None]] | None' = None, max_retries: 'int' = 10, retry_base_delay: 'float' = 5.0)[source]¶
CODEX_MODELS is the ModelRegistry this transport ships, and the
default models for a CodexTransport. Query it like any other registry -
CODEX_MODELS.by_capability(Capability.vision), CODEX_MODELS.ids().