sdk/python: use standalone codex-app-server runtime

This commit is contained in:
Michael Bolin
2026-04-24 16:19:11 -07:00
parent 9b8a1fbefc
commit 6aa4aed202
14 changed files with 521 additions and 206 deletions

View File

@@ -54,13 +54,13 @@ This avoids duplicate ways to do the same operation and keeps behavior explicit.
Common causes:
- published runtime package (`openai-codex-cli-bin`) is not installed
- local `codex_bin` override points to a missing file
- published runtime package (`openai-codex-app-server-bin`) is not installed
- local `app_server_bin` override points to a missing file
- local auth/session is missing
- incompatible/old app-server
Maintainers stage releases by building the SDK once and the runtime once per
platform with the same pinned runtime version. Publish `openai-codex-cli-bin` as
platform with the same pinned runtime version. Publish `openai-codex-app-server-bin` as
platform wheels only; do not publish an sdist:
```bash
@@ -72,8 +72,8 @@ python scripts/update_sdk_artifacts.py \
--runtime-version 1.2.3
python scripts/update_sdk_artifacts.py \
stage-runtime \
/tmp/codex-python-release/openai-codex-cli-bin \
/path/to/codex \
/tmp/codex-python-release/openai-codex-app-server-bin \
/path/to/codex-app-server \
--runtime-version 1.2.3
```

View File

@@ -18,7 +18,7 @@ Requirements:
- Python `>=3.10`
- uv
- installed `openai-codex-cli-bin` runtime package, or an explicit `codex_bin` override
- installed `openai-codex-app-server-bin` runtime package, or an explicit `app_server_bin` override
- local Codex auth/session configured
## 2) Run your first turn (sync)
@@ -40,7 +40,7 @@ with Codex() as codex:
What happened:
- `Codex()` started and initialized `codex app-server`.
- `Codex()` started and initialized `codex-app-server`.
- `thread_start(...)` created a thread.
- `thread.run("...")` started a turn, consumed events until completion, and returned the final assistant response plus collected items and usage.
- `result.final_response` is `None` when no final-answer or phase-less assistant message item completes for the turn.