llm-async-codex
ChatGPT Codex subscription provider for llm-async.
from llm_async_codex import CodexProvider
provider = CodexProvider.from_codex_home()
response = await provider.acomplete(
model="gpt-5.5",
messages=[{"role": "user", "content": "Review this repository."}],
stream=True,
)
async for chunk in response.stream_content():
print(chunk, end="", flush=True)
This reads an existing Codex CLI login from $CODEX_HOME/auth.json or ~/.codex/auth.json by default (CodexProvider.from_codex_home()), or a CodexCredentials loaded from any path via load_credentials(path).
Login
If you don't already have a Codex CLI login, log in directly:
llm-async-codex login
llm-async-codex login --device-code # headless/SSH, no local browser needed
llm-async-codex login --auth-file ~/.my-tool/auth.json
llm-async-codex login --verbose
or from Python: await login(device_code=False, auth_path=None, verbose=False).
Tool calling
Tool calling works through the normal streaming API: call provider.acomplete(..., stream=True, tools=[...]), drain response.stream_content(), then read response.main_response.tool_calls. Requires llm-async>=0.5.2.
Model catalog
await provider.list_model_slugs() lists models available to the authenticated account.
await provider.get_model_capabilities(model) returns its context-window and automatic
compaction limits when present.
Limitations
- Streaming only: the Codex backend requires
stream=True; non-streaming requests are rejected. - No stateless multi-turn: the backend rejects
store=True("Store must be set to false"), soprevious_response_id-based continuation (as used in some ofllm-async's other Responses API examples) does not work here. Resend the full conversation history (includingfunction_call/function_call_outputitems) on every turn instead. max_output_tokensis ignored because the Codex backend rejects it.
Metadata
Release files for llm-async-codex 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| llm_async_codex-0.2.0.tar.gz | 10.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| llm_async_codex-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 22.1 kB
Release files / llm_async_codex-0.2.0.tar.gz
| Download URL | llm_async_codex-0.2.0.tar.gz |
|---|---|
| Size | 10.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5f1c4c458a5bb457de628b1f98d8ca26ef5aba18a0377c95e800d8837bf36be0
|
|
BLAKE2b-256 checksum How to use checksums |
923cf119b633f969b13547892cb876c4c7d576d3e39ef0cefc7db50f0cb72e4e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.13
|
Release files / llm_async_codex-0.2.0-py3-none-any.whl
| Download URL | llm_async_codex-0.2.0-py3-none-any.whl |
|---|---|
| Size | 12.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
04d071f441609900f4d37b5eb368f0929a674a73bdfa0221ff018b6f80d18174
|
|
BLAKE2b-256 checksum How to use checksums |
2688fdc20544bb19e4bd716ac7ceff374025343a4a1e50bafaec38037e8cf95e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.13
|