Skip to main content

gproxy_protocol/protocol/openai/common/enums/
responses.rs

1strict_string_enum!(ResponseStatus {
2    Completed => "completed",
3    Failed => "failed",
4    InProgress => "in_progress",
5    Cancelled => "cancelled",
6    Queued => "queued",
7    Incomplete => "incomplete",
8});
9
10strict_string_enum!(IncompleteReason {
11    MaxOutputTokens => "max_output_tokens",
12    ContentFilter => "content_filter",
13});
14
15extensible_string_enum!(ResponseErrorCode, ResponseErrorCodeKnown {
16    ServerError => "server_error",
17    RateLimitExceeded => "rate_limit_exceeded",
18    InvalidPrompt => "invalid_prompt",
19    VectorStoreTimeout => "vector_store_timeout",
20    InvalidImage => "invalid_image",
21    InvalidImageFormat => "invalid_image_format",
22    InvalidBase64Image => "invalid_base64_image",
23    InvalidImageUrl => "invalid_image_url",
24    ImageTooLarge => "image_too_large",
25    ImageTooSmall => "image_too_small",
26    ImageParseError => "image_parse_error",
27    ImageContentPolicyViolation => "image_content_policy_violation",
28    InvalidImageMode => "invalid_image_mode",
29    ImageFileTooLarge => "image_file_too_large",
30    UnsupportedImageMediaType => "unsupported_image_media_type",
31    EmptyImageFile => "empty_image_file",
32    FailedToDownloadImage => "failed_to_download_image",
33    ImageFileNotFound => "image_file_not_found",
34    DataResidencyMismatch => "data_residency_mismatch",
35});
36
37strict_string_enum!(ResponseItemLifecycleStatus {
38    InProgress => "in_progress",
39    Completed => "completed",
40    Incomplete => "incomplete",
41});
42
43strict_string_enum!(ResponseFileSearchCallStatus {
44    InProgress => "in_progress",
45    Searching => "searching",
46    Completed => "completed",
47    Incomplete => "incomplete",
48    Failed => "failed",
49});
50
51strict_string_enum!(ResponseWebSearchCallStatus {
52    InProgress => "in_progress",
53    Searching => "searching",
54    Completed => "completed",
55    Failed => "failed",
56});
57
58strict_string_enum!(ResponseComputerCallOutputStatus {
59    InProgress => "in_progress",
60    Completed => "completed",
61    Incomplete => "incomplete",
62    Failed => "failed",
63});
64
65strict_string_enum!(ResponseImageGenerationCallStatus {
66    InProgress => "in_progress",
67    Completed => "completed",
68    Generating => "generating",
69    Failed => "failed",
70});
71
72strict_string_enum!(ResponseCodeInterpreterCallStatus {
73    InProgress => "in_progress",
74    Completed => "completed",
75    Incomplete => "incomplete",
76    Interpreting => "interpreting",
77    Failed => "failed",
78});
79
80strict_string_enum!(ResponseApplyPatchCallStatus {
81    InProgress => "in_progress",
82    Completed => "completed",
83});
84
85strict_string_enum!(ResponseApplyPatchCallOutputStatus {
86    Completed => "completed",
87    Failed => "failed",
88});
89
90strict_string_enum!(ResponseMcpCallStatus {
91    InProgress => "in_progress",
92    Completed => "completed",
93    Incomplete => "incomplete",
94    Calling => "calling",
95    Failed => "failed",
96});
97
98extensible_string_enum!(ReasoningContext, ReasoningContextKnown {
99    Auto => "auto",
100    CurrentTurn => "current_turn",
101    AllTurns => "all_turns",
102});
103
104strict_string_enum!(ResponsePhase {
105    Commentary => "commentary",
106    FinalAnswer => "final_answer",
107});
108
109extensible_string_enum!(ResponseItemType, ResponseItemTypeKnown {
110    Message => "message",
111    FileSearchCall => "file_search_call",
112    ComputerCall => "computer_call",
113    ComputerCallOutput => "computer_call_output",
114    WebSearchCall => "web_search_call",
115    FunctionCall => "function_call",
116    FunctionCallOutput => "function_call_output",
117    ToolSearchCall => "tool_search_call",
118    ToolSearchOutput => "tool_search_output",
119    AdditionalTools => "additional_tools",
120    Reasoning => "reasoning",
121    Compaction => "compaction",
122    ImageGenerationCall => "image_generation_call",
123    CodeInterpreterCall => "code_interpreter_call",
124    LocalShellCall => "local_shell_call",
125    LocalShellCallOutput => "local_shell_call_output",
126    ShellCall => "shell_call",
127    ShellCallOutput => "shell_call_output",
128    ApplyPatchCall => "apply_patch_call",
129    ApplyPatchCallOutput => "apply_patch_call_output",
130    McpListTools => "mcp_list_tools",
131    McpApprovalRequest => "mcp_approval_request",
132    McpApprovalResponse => "mcp_approval_response",
133    McpCall => "mcp_call",
134    CustomToolCall => "custom_tool_call",
135    CustomToolCallOutput => "custom_tool_call_output",
136    Program => "program",
137    ProgramOutput => "program_output",
138    MultiAgentCall => "multi_agent_call",
139    MultiAgentCallOutput => "multi_agent_call_output",
140    AgentMessage => "agent_message",
141    CompactionTrigger => "compaction_trigger",
142    ItemReference => "item_reference",
143});
144
145strict_string_enum!(ResponseIncludable {
146    FileSearchCallResults => "file_search_call.results",
147    WebSearchCallResults => "web_search_call.results",
148    WebSearchCallActionSources => "web_search_call.action.sources",
149    MessageInputImageImageUrl => "message.input_image.image_url",
150    ComputerCallOutputOutputImageUrl => "computer_call_output.output.image_url",
151    CodeInterpreterCallOutputs => "code_interpreter_call.outputs",
152    ReasoningEncryptedContent => "reasoning.encrypted_content",
153    MessageOutputTextLogprobs => "message.output_text.logprobs",
154});
155
156extensible_string_enum!(ResponseStreamEventType, ResponseStreamEventTypeKnown {
157    ResponseCreated => "response.created",
158    ResponseInProgress => "response.in_progress",
159    ResponseCompleted => "response.completed",
160    ResponseFailed => "response.failed",
161    ResponseIncomplete => "response.incomplete",
162    ResponseQueued => "response.queued",
163    ResponseOutputItemAdded => "response.output_item.added",
164    ResponseOutputItemDone => "response.output_item.done",
165    ResponseContentPartAdded => "response.content_part.added",
166    ResponseContentPartDone => "response.content_part.done",
167    ResponseOutputTextDelta => "response.output_text.delta",
168    ResponseOutputTextDone => "response.output_text.done",
169    ResponseOutputTextAnnotationAdded => "response.output_text.annotation.added",
170    ResponseFunctionCallArgumentsDelta => "response.function_call_arguments.delta",
171    ResponseFunctionCallArgumentsDone => "response.function_call_arguments.done",
172    ResponseCustomToolCallInputDelta => "response.custom_tool_call_input.delta",
173    ResponseCustomToolCallInputDone => "response.custom_tool_call_input.done",
174    ResponseRefusalDelta => "response.refusal.delta",
175    ResponseRefusalDone => "response.refusal.done",
176    ResponseReasoningSummaryPartAdded => "response.reasoning_summary_part.added",
177    ResponseReasoningSummaryPartDone => "response.reasoning_summary_part.done",
178    ResponseReasoningSummaryTextDelta => "response.reasoning_summary_text.delta",
179    ResponseReasoningSummaryTextDone => "response.reasoning_summary_text.done",
180    ResponseReasoningTextDelta => "response.reasoning_text.delta",
181    ResponseReasoningTextDone => "response.reasoning_text.done",
182    ResponseAudioDelta => "response.audio.delta",
183    ResponseAudioDone => "response.audio.done",
184    ResponseAudioTranscriptDelta => "response.audio.transcript.delta",
185    ResponseAudioTranscriptDone => "response.audio.transcript.done",
186    ResponseImageGenerationCallCompleted => "response.image_generation_call.completed",
187    ResponseImageGenerationCallGenerating => "response.image_generation_call.generating",
188    ResponseImageGenerationCallInProgress => "response.image_generation_call.in_progress",
189    ResponseImageGenerationCallPartialImage => "response.image_generation_call.partial_image",
190    ResponseFileSearchCallInProgress => "response.file_search_call.in_progress",
191    ResponseFileSearchCallSearching => "response.file_search_call.searching",
192    ResponseFileSearchCallCompleted => "response.file_search_call.completed",
193    ResponseWebSearchCallInProgress => "response.web_search_call.in_progress",
194    ResponseWebSearchCallSearching => "response.web_search_call.searching",
195    ResponseWebSearchCallCompleted => "response.web_search_call.completed",
196    ResponseCodeInterpreterCallInProgress => "response.code_interpreter_call.in_progress",
197    ResponseCodeInterpreterCallInterpreting => "response.code_interpreter_call.interpreting",
198    ResponseCodeInterpreterCallCompleted => "response.code_interpreter_call.completed",
199    ResponseCodeInterpreterCallCodeDelta => "response.code_interpreter_call_code.delta",
200    ResponseCodeInterpreterCallCodeDone => "response.code_interpreter_call_code.done",
201    ResponseMcpCallArgumentsDelta => "response.mcp_call_arguments.delta",
202    ResponseMcpCallArgumentsDone => "response.mcp_call_arguments.done",
203    ResponseMcpCallInProgress => "response.mcp_call.in_progress",
204    ResponseMcpCallCompleted => "response.mcp_call.completed",
205    ResponseMcpCallFailed => "response.mcp_call.failed",
206    ResponseMcpListToolsInProgress => "response.mcp_list_tools.in_progress",
207    ResponseMcpListToolsCompleted => "response.mcp_list_tools.completed",
208    ResponseMcpListToolsFailed => "response.mcp_list_tools.failed",
209    Error => "error",
210});