Expand description
Rust port of the public OpenAI Codex Python SDK.
AsyncCodex is the asynchronous client. With the default blocking
feature, Codex provides the synchronous API familiar to Python SDK
users.
Structs§
- Account
Login Completed Notification - Agent
Message Delta Notification - Agent
Message Thread Item - Async
Chatgpt Login Handle - Live browser-based login attempt.
- Async
Codex - Asynchronous Codex client mirroring Python’s
AsyncCodex. - Async
Device Code Login Handle - Live device-code login attempt.
- Async
Thread - Asynchronous thread handle.
- Async
Turn Handle - Control handle for an active asynchronous turn.
- Cancel
Login Account Response - Chatgpt
Login Handle - Synchronous browser-login handle.
- Codex
- Synchronous Codex client mirroring Python’s
Codex. - Codex
Config - Configuration for launching and identifying the local Codex runtime.
- Device
Code Login Handle - Synchronous device-code login handle.
- GetAccount
Response - Image
Input - Initialize
Response - Input
- Normalized turn input.
- Item
Completed Notification - Item
Started Notification - Json
RpcError - Error object returned by the Codex app server.
- Local
Image Input - Mention
Input - Model
- Model
List Response - Notification
- RawNotification
- Lossless payload for an unmodeled or invalid notification.
- RawThread
Item - Lossless representation for thread item variants not modeled directly.
- Reasoning
Effort Option - Retry
Policy - Retry policy matching
retry_on_overloadin the Python SDK. - Sandbox
Policy - Raw sandbox policy returned by the runtime.
- Server
Info - Skill
Input - Text
Input - Thread
- Synchronous thread handle.
- Thread
Archive Response - Thread
Compact Start Response - Thread
Data - Thread
Fork Options - Thread
List Options - Thread
List Response - Thread
Read Response - Thread
Resume Options - Thread
SetName Response - Thread
Start Options - Thread
Token Usage - Thread
Token Usage Updated Notification - Token
Usage Breakdown - Turn
- Turn
Completed Notification - Turn
Error - Turn
Handle - Synchronous turn control handle.
- Turn
Interrupt Response - Turn
Iter - Blocking iterator over one turn’s notifications.
- Turn
Options - Turn
Result - Collected result returned after a turn completes.
- Turn
Started Notification - Turn
Steer Response - Turn
Stream - Stream of notifications routed to one turn.
Enums§
- Account
- Approval
Mode - High-level approval behavior matching the Python SDK.
- Approvals
Reviewer - AskFor
Approval - App-server approval policy, including future granular policy objects.
- AskFor
Approval Value - Cancel
Login Account Status - Error
- Errors produced by the SDK.
- Input
Item - One item accepted by a turn or steering request.
- Json
RpcError Kind - Typed classification for JSON-RPC failures.
- Message
Phase - Notification
Payload - Personality
- Plan
Type - Reasoning
Effort - Model reasoning effort. Unknown strings are retained for protocol forward compatibility.
- Reasoning
Summary - Sandbox
- Filesystem access preset used for threads and turns.
- Sandbox
Mode - Sort
Direction - Thread
Item - Thread item with a typed assistant-message variant and lossless fallback.
- Thread
List CwdFilter - Thread
Sort Key - Thread
Source - Thread
Source Kind - Thread
Start Source - Turn
Status
Constants§
- UPSTREAM_
PYTHON_ SDK_ COMMIT - Exact
openai/codexrevision used for this port’s Python SDK contract. - VERSION
- Crate version sent in the app-server initialize handshake by default.
Functions§
- is_
retryable_ error - Returns whether an error represents transient server overload.
- retry_
on_ overload - Retry an asynchronous operation when the runtime reports overload.
Type Aliases§
- Approval
Handler - Callback used to answer app-server requests such as command approvals.
- Json
Object - Key/value view useful when consuming unmodeled protocol objects.
- Json
Value - Ordered
Json Object - Result
- SDK result type.
- RunInput
- Thread
Record - Public alias matching the protocol’s
Threadmodel without colliding with the SDK handle. - Unknown
Notification