Skip to main content

Crate codex_sdk_rs

Crate codex_sdk_rs 

Source
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§

AccountLoginCompletedNotification
AgentMessageDeltaNotification
AgentMessageThreadItem
AsyncChatgptLoginHandle
Live browser-based login attempt.
AsyncCodex
Asynchronous Codex client mirroring Python’s AsyncCodex.
AsyncDeviceCodeLoginHandle
Live device-code login attempt.
AsyncThread
Asynchronous thread handle.
AsyncTurnHandle
Control handle for an active asynchronous turn.
CancelLoginAccountResponse
ChatgptLoginHandle
Synchronous browser-login handle.
Codex
Synchronous Codex client mirroring Python’s Codex.
CodexConfig
Configuration for launching and identifying the local Codex runtime.
DeviceCodeLoginHandle
Synchronous device-code login handle.
GetAccountResponse
ImageInput
InitializeResponse
Input
Normalized turn input.
ItemCompletedNotification
ItemStartedNotification
JsonRpcError
Error object returned by the Codex app server.
LocalImageInput
MentionInput
Model
ModelListResponse
Notification
RawNotification
Lossless payload for an unmodeled or invalid notification.
RawThreadItem
Lossless representation for thread item variants not modeled directly.
ReasoningEffortOption
RetryPolicy
Retry policy matching retry_on_overload in the Python SDK.
SandboxPolicy
Raw sandbox policy returned by the runtime.
ServerInfo
SkillInput
TextInput
Thread
Synchronous thread handle.
ThreadArchiveResponse
ThreadCompactStartResponse
ThreadData
ThreadForkOptions
ThreadListOptions
ThreadListResponse
ThreadReadResponse
ThreadResumeOptions
ThreadSetNameResponse
ThreadStartOptions
ThreadTokenUsage
ThreadTokenUsageUpdatedNotification
TokenUsageBreakdown
Turn
TurnCompletedNotification
TurnError
TurnHandle
Synchronous turn control handle.
TurnInterruptResponse
TurnIter
Blocking iterator over one turn’s notifications.
TurnOptions
TurnResult
Collected result returned after a turn completes.
TurnStartedNotification
TurnSteerResponse
TurnStream
Stream of notifications routed to one turn.

Enums§

Account
ApprovalMode
High-level approval behavior matching the Python SDK.
ApprovalsReviewer
AskForApproval
App-server approval policy, including future granular policy objects.
AskForApprovalValue
CancelLoginAccountStatus
Error
Errors produced by the SDK.
InputItem
One item accepted by a turn or steering request.
JsonRpcErrorKind
Typed classification for JSON-RPC failures.
MessagePhase
NotificationPayload
Personality
PlanType
ReasoningEffort
Model reasoning effort. Unknown strings are retained for protocol forward compatibility.
ReasoningSummary
Sandbox
Filesystem access preset used for threads and turns.
SandboxMode
SortDirection
ThreadItem
Thread item with a typed assistant-message variant and lossless fallback.
ThreadListCwdFilter
ThreadSortKey
ThreadSource
ThreadSourceKind
ThreadStartSource
TurnStatus

Constants§

UPSTREAM_PYTHON_SDK_COMMIT
Exact openai/codex revision 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§

ApprovalHandler
Callback used to answer app-server requests such as command approvals.
JsonObject
Key/value view useful when consuming unmodeled protocol objects.
JsonValue
OrderedJsonObject
Result
SDK result type.
RunInput
ThreadRecord
Public alias matching the protocol’s Thread model without colliding with the SDK handle.
UnknownNotification