ccproxy.llms.models.openai¶
ccproxy.llms.models.openai
¶
Pydantic V2 models for OpenAI API endpoints based on the provided reference.
This module contains data structures for: - /v1/chat/completions (including streaming) - /v1/embeddings - /v1/models - /v1/responses (including streaming) - Common Error structures
The models are defined using modern Python 3.11 type hints and Pydantic V2 best practices.
ErrorDetail
¶
ErrorResponse
¶
Model
¶
ModelList
¶
EmbeddingRequest
¶
EmbeddingData
¶
EmbeddingUsage
¶
EmbeddingResponse
¶
ResponseFormat
¶
FunctionDefinition
¶
Tool
¶
ChatMessage
¶
ChatCompletionRequest
¶
OutputItem
¶
Bases: LlmBaseModel
Normalized representation of a Responses API output item.
OpenAI currently emits different shapes for text, tool, and reasoning
items. Some omit fields like status or role entirely, while others
include extra metadata such as summary or call_id. Keeping these
attributes optional lets us validate real-world payloads without fighting
the schema.