Skip to main content

ChatGPT (Codex) OAuth transport for Axio using Responses API

Project description

axio-transport-codex

PyPI Python License: MIT

ChatGPT OAuth transport for axio using the OpenAI Responses API.

Authenticates via the same OAuth flow used by ChatGPT — no API key required; your ChatGPT subscription covers usage. Implements the OpenAI Responses API (not the legacy completions endpoint).

Features

  • No API key — authenticates with your ChatGPT account via OAuth
  • Responses API — uses OpenAI's newer stateful Responses endpoint
  • Full streaming — incremental text and tool-call events via SSE
  • Tool calling — works with all axio tool handlers
  • aiohttp-based — non-blocking I/O throughout

Installation

pip install axio-transport-codex

Usage

from axio import Agent
from axio.context import MemoryContextStore
from axio_transport_codex import CodexTransport

transport = CodexTransport(
    access_token="your-chatgpt-oauth-token",
    model="gpt-4o",
)

agent = Agent(system="You are a helpful assistant.", tools=[], transport=transport)

async def main() -> None:
    ctx = MemoryContextStore()
    async for event in agent.run_stream("Summarise the Rust ownership model", ctx):
        from axio.events import TextDelta
        if isinstance(event, TextDelta):
            print(event.delta, end="", flush=True)
    print()

Plugin registration

[project.entry-points."axio.transport"]
codex = "axio_transport_codex:CodexTransport"

Part of the axio ecosystem

axio · axio-transport-openai · axio-transport-nebius · axio-tui

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

axio_transport_codex-0.2.3.tar.gz (87.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

axio_transport_codex-0.2.3-py3-none-any.whl (12.9 kB view details)

Uploaded Python 3

File details

Details for the file axio_transport_codex-0.2.3.tar.gz.

File metadata

  • Download URL: axio_transport_codex-0.2.3.tar.gz
  • Upload date:
  • Size: 87.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for axio_transport_codex-0.2.3.tar.gz
Algorithm Hash digest
SHA256 2b2fc84265209324090a14865e34badf894ca7a6cf84755ef52f6e60bf654131
MD5 c18433ddd8aa6611a9f7b2b67fdbb799
BLAKE2b-256 cf18b0741248af1acbf360f91191fc2a54fad80acb7d04776148d82630d91e72

See more details on using hashes here.

Provenance

The following attestation bundles were made for axio_transport_codex-0.2.3.tar.gz:

Publisher: publish.yml on axio-agent/axio-transport-codex

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file axio_transport_codex-0.2.3-py3-none-any.whl.

File metadata

File hashes

Hashes for axio_transport_codex-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 4c85537184c64aaddb11f3659af39f3605a5281e3108c985ec9f5d37cf1de236
MD5 287b20c5429a0d00a7e5c613ed322436
BLAKE2b-256 1f5c671e1f510fbcf6ebc79354611236f825c7faf25b1e7f2ffbf5262cd37b03

See more details on using hashes here.

Provenance

The following attestation bundles were made for axio_transport_codex-0.2.3-py3-none-any.whl:

Publisher: publish.yml on axio-agent/axio-transport-codex

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page