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