Skip to content

[codex] Rename Python SDK AppServerConfig to CodexConfig#24800

Merged
aibrahim-oai merged 2 commits into
mainfrom
dev/python-sdk-codex-config
May 27, 2026
Merged

[codex] Rename Python SDK AppServerConfig to CodexConfig#24800
aibrahim-oai merged 2 commits into
mainfrom
dev/python-sdk-codex-config

Conversation

@aibrahim-oai
Copy link
Copy Markdown
Collaborator

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

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.

## Why

This is stacked on #24800. After exposing `CodexConfig`, the remaining
SDK naming still referred to the underlying transport through error and
client class names. The SDK-facing vocabulary should center on Codex
itself.

## What changed

- Renamed exported exceptions to `CodexError` and `CodexRpcError`.
- Renamed internal transport wrappers to `CodexClient` and
`AsyncCodexClient`, and removed the private `AppServerTurn` alias in
favor of `Turn`.
- Updated high-level docs and docstrings to say Codex or Codex protocol
where users interact with the SDK, while retaining precise executable
and transport references where those details matter.

## API impact

```python
from openai_codex import CodexError, CodexRpcError
```

`AppServerError` and `AppServerRpcError` are no longer exported.

## Validation

- `uv run --frozen --extra dev ruff check src/openai_codex scripts
examples tests`
- Tests are deferred to online CI for this PR.
@aibrahim-oai aibrahim-oai marked this pull request as ready for review May 27, 2026 23:09
@aibrahim-oai aibrahim-oai merged commit 0db49a7 into main May 27, 2026
31 checks passed
@aibrahim-oai aibrahim-oai deleted the dev/python-sdk-codex-config branch May 27, 2026 23:10
@github-actions github-actions Bot locked and limited conversation to collaborators May 27, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant