#[non_exhaustive]pub enum Operation {
Show 32 variants
ListModels,
GetModel,
CountTokens,
GenerateContent,
StreamGenerateContent,
CreateModeration,
GuardianReview,
GuardianClassify,
CompactContent,
SummarizeMemory,
CreateConversation,
CreateEmbedding,
BatchCreateEmbedding,
Rerank,
WebSearch,
CreateImage,
EditImage,
CreateSpeech,
CreateTranscription,
CreateTranslation,
CreateFile,
ListFiles,
RetrieveFile,
RetrieveFileContent,
DeleteFile,
CreateVideo,
RetrieveVideo,
ListVideos,
DeleteVideo,
DownloadVideoContent,
CreateRealtimeCall,
ConnectRealtime,
}Expand description
What the caller wants done.
The operation and Dialect together identify the wire shape.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
ListModels
GetModel
CountTokens
GenerateContent
StreamGenerateContent
CreateModeration
Standard OpenAI moderation JSON, distinct from Codex Guardian’s SSE.
GuardianReview
GuardianClassify
CompactContent
SummarizeMemory
CreateConversation
CreateEmbedding
BatchCreateEmbedding
Rerank
WebSearch
CreateImage
EditImage
CreateSpeech
CreateTranscription
CreateTranslation
CreateFile
ListFiles
RetrieveFile
RetrieveFileContent
DeleteFile
CreateVideo
RetrieveVideo
ListVideos
DeleteVideo
DownloadVideoContent
Download video bytes, e.g. OpenAI’s GET /videos/{video_id}/content. Some vendors instead expose a download URL in a job response; their channel implementation resolves that URL as part of this operation.
CreateRealtimeCall
SDP handshake creating a WebRTC realtime call.
ConnectRealtime
Duplex websocket session. Never transformed — only same-protocol passthrough, because a client that can keep talking mid-response has no equivalent in a half-duplex dialect.
Implementations§
Source§impl Operation
impl Operation
Sourcepub const fn produces_usage(self) -> bool
pub const fn produces_usage(self) -> bool
Whether this operation performs inference or a metered tool action. Catalog, token-counting, resource management and signaling-only calls belong in request logs, not request-level usage statistics.
Sourcepub fn usage_operations() -> impl Iterator<Item = Self>
pub fn usage_operations() -> impl Iterator<Item = Self>
Shared by persistence and historical usage queries.