mirror of
https://github.com/openai/codex.git
synced 2026-04-28 08:34:54 +00:00
python-sdk: clarify initialize metadata and async entrypoint (2026-03-16)
Normalize validated initialize metadata back onto InitializeResponse so successful metadata access exposes populated serverInfo fields even when they were derived from userAgent. Also make async lifecycle guidance explicit in the public surface by documenting async with AsyncCodex() as the preferred entrypoint and aligning the AsyncCodex metadata error message with that model. Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
@@ -61,6 +61,9 @@ with Codex() as codex:
|
||||
|
||||
## 4) Async parity
|
||||
|
||||
Use `async with AsyncCodex()` as the normal async entrypoint. `AsyncCodex`
|
||||
initializes lazily, and context entry makes startup/shutdown explicit.
|
||||
|
||||
```python
|
||||
import asyncio
|
||||
from codex_app_server import AsyncCodex, TextInput
|
||||
|
||||
Reference in New Issue
Block a user