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.
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.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file llm_async_codex-0.1.1.tar.gz.
File metadata
- Download URL: llm_async_codex-0.1.1.tar.gz
- Upload date:
- Size: 8.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fbaa0e208d738280ee316c7a01fd28f3b8425c12a20e5138056cdc7d8397b3bf
|
|
| MD5 |
bd8949628d9ea865d97e79cd66f5e8b9
|
|
| BLAKE2b-256 |
3e7de7421433a7550d008a21a14ce02d2844a74c982625fb61f758ec98164fec
|
File details
Details for the file llm_async_codex-0.1.1-py3-none-any.whl.
File metadata
- Download URL: llm_async_codex-0.1.1-py3-none-any.whl
- Upload date:
- Size: 10.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b8f460abb92c195990285ba3c8e7115e50ef13505252b8901c61ab0f23383700
|
|
| MD5 |
a5aac8a7123e963fb6972a50735a52bd
|
|
| BLAKE2b-256 |
e348b5fdcbbdb9c46887f015ae750f907a0dc29115ba01cf78b0fea5c5eea627
|