mirror of
https://github.com/pchuan98/codex.git
synced 2026-07-01 00:31:56 +08:00
[codex] Rename Python SDK AppServerConfig to CodexConfig (#24800)
## Why
`AppServerConfig` is exported as part of the ergonomic Python SDK
surface and passed to `Codex(...)` and `AsyncCodex(...)`. That name
exposes the underlying app-server transport at the same layer where
users are configuring the Codex client. `CodexConfig` makes the common
callsite read naturally and names the object it configures.
## What changed
- Renamed the public configuration dataclass from `AppServerConfig` to
`CodexConfig`.
- Updated `Codex`, `AsyncCodex`, and the transport clients to accept
`CodexConfig`.
- Updated binary-resolution messages, package exports, docs, examples,
and related coverage to use the new public name.
## API impact
```python
from openai_codex import Codex, CodexConfig
with Codex(config=CodexConfig(codex_bin="/path/to/codex")) as codex:
...
```
Callers should now import and construct `CodexConfig`; `AppServerConfig`
is no longer part of the Python SDK surface.
## Validation
- `uv run --frozen --extra dev ruff check src/openai_codex scripts
examples tests`
- Tests are deferred to online CI for this PR.
This commit is contained in:
committed by
GitHub
Unverified
parent
090144e0ec
commit
0db49a7e6a
@@ -99,7 +99,7 @@ Available presets:
|
||||
- `Sandbox.workspace_write`: the normal default for projects with a recorded trust decision; read files and write inside the workspace and configured writable roots.
|
||||
- `Sandbox.full_access`: run without filesystem access restrictions.
|
||||
|
||||
When `sandbox=` is omitted, app-server uses its configured default. A turn
|
||||
When `sandbox=` is omitted, Codex uses its configured default. A turn
|
||||
override also becomes the sandbox for subsequent turns on that thread.
|
||||
|
||||
## 5) Continue the same thread (multi-turn)
|
||||
@@ -150,9 +150,9 @@ with Codex() as codex:
|
||||
print(result.final_response)
|
||||
```
|
||||
|
||||
## 8) Public app-server types
|
||||
## 8) Public Codex protocol types
|
||||
|
||||
The convenience wrappers live at the package root. Public app-server value and
|
||||
The convenience wrappers live at the package root. Public Codex protocol value and
|
||||
event types live under:
|
||||
|
||||
```python
|
||||
|
||||
Reference in New Issue
Block a user