java/resources/$shared/index.md +0 −991 deleted
File Deleted View Diff
1# Shared
2
3## Domain Types
4
5### All Models
6
7- `class AllModels: A class that can be one of several variants.union`
8
9 - `String`
10
11 - `enum ChatModel:`
12
13 - `GPT_5_6_SOL("gpt-5.6-sol")`
14
15 - `GPT_5_6_TERRA("gpt-5.6-terra")`
16
17 - `GPT_5_6_LUNA("gpt-5.6-luna")`
18
19 - `GPT_5_4("gpt-5.4")`
20
21 - `GPT_5_4_MINI("gpt-5.4-mini")`
22
23 - `GPT_5_4_NANO("gpt-5.4-nano")`
24
25 - `GPT_5_4_MINI_2026_03_17("gpt-5.4-mini-2026-03-17")`
26
27 - `GPT_5_4_NANO_2026_03_17("gpt-5.4-nano-2026-03-17")`
28
29 - `GPT_5_3_CHAT_LATEST("gpt-5.3-chat-latest")`
30
31 - `GPT_5_2("gpt-5.2")`
32
33 - `GPT_5_2_2025_12_11("gpt-5.2-2025-12-11")`
34
35 - `GPT_5_2_CHAT_LATEST("gpt-5.2-chat-latest")`
36
37 - `GPT_5_2_PRO("gpt-5.2-pro")`
38
39 - `GPT_5_2_PRO_2025_12_11("gpt-5.2-pro-2025-12-11")`
40
41 - `GPT_5_1("gpt-5.1")`
42
43 - `GPT_5_1_2025_11_13("gpt-5.1-2025-11-13")`
44
45 - `GPT_5_1_CODEX("gpt-5.1-codex")`
46
47 - `GPT_5_1_MINI("gpt-5.1-mini")`
48
49 - `GPT_5_1_CHAT_LATEST("gpt-5.1-chat-latest")`
50
51 - `GPT_5("gpt-5")`
52
53 - `GPT_5_MINI("gpt-5-mini")`
54
55 - `GPT_5_NANO("gpt-5-nano")`
56
57 - `GPT_5_2025_08_07("gpt-5-2025-08-07")`
58
59 - `GPT_5_MINI_2025_08_07("gpt-5-mini-2025-08-07")`
60
61 - `GPT_5_NANO_2025_08_07("gpt-5-nano-2025-08-07")`
62
63 - `GPT_5_CHAT_LATEST("gpt-5-chat-latest")`
64
65 - `GPT_4_1("gpt-4.1")`
66
67 - `GPT_4_1_MINI("gpt-4.1-mini")`
68
69 - `GPT_4_1_NANO("gpt-4.1-nano")`
70
71 - `GPT_4_1_2025_04_14("gpt-4.1-2025-04-14")`
72
73 - `GPT_4_1_MINI_2025_04_14("gpt-4.1-mini-2025-04-14")`
74
75 - `GPT_4_1_NANO_2025_04_14("gpt-4.1-nano-2025-04-14")`
76
77 - `O4_MINI("o4-mini")`
78
79 - `O4_MINI_2025_04_16("o4-mini-2025-04-16")`
80
81 - `O3("o3")`
82
83 - `O3_2025_04_16("o3-2025-04-16")`
84
85 - `O3_MINI("o3-mini")`
86
87 - `O3_MINI_2025_01_31("o3-mini-2025-01-31")`
88
89 - `O1("o1")`
90
91 - `O1_2024_12_17("o1-2024-12-17")`
92
93 - `O1_PREVIEW("o1-preview")`
94
95 - `O1_PREVIEW_2024_09_12("o1-preview-2024-09-12")`
96
97 - `O1_MINI("o1-mini")`
98
99 - `O1_MINI_2024_09_12("o1-mini-2024-09-12")`
100
101 - `GPT_4O("gpt-4o")`
102
103 - `GPT_4O_2024_11_20("gpt-4o-2024-11-20")`
104
105 - `GPT_4O_2024_08_06("gpt-4o-2024-08-06")`
106
107 - `GPT_4O_2024_05_13("gpt-4o-2024-05-13")`
108
109 - `GPT_4O_AUDIO_PREVIEW("gpt-4o-audio-preview")`
110
111 - `GPT_4O_AUDIO_PREVIEW_2024_10_01("gpt-4o-audio-preview-2024-10-01")`
112
113 - `GPT_4O_AUDIO_PREVIEW_2024_12_17("gpt-4o-audio-preview-2024-12-17")`
114
115 - `GPT_4O_AUDIO_PREVIEW_2025_06_03("gpt-4o-audio-preview-2025-06-03")`
116
117 - `GPT_4O_MINI_AUDIO_PREVIEW("gpt-4o-mini-audio-preview")`
118
119 - `GPT_4O_MINI_AUDIO_PREVIEW_2024_12_17("gpt-4o-mini-audio-preview-2024-12-17")`
120
121 - `GPT_4O_SEARCH_PREVIEW("gpt-4o-search-preview")`
122
123 - `GPT_4O_MINI_SEARCH_PREVIEW("gpt-4o-mini-search-preview")`
124
125 - `GPT_4O_SEARCH_PREVIEW_2025_03_11("gpt-4o-search-preview-2025-03-11")`
126
127 - `GPT_4O_MINI_SEARCH_PREVIEW_2025_03_11("gpt-4o-mini-search-preview-2025-03-11")`
128
129 - `CHATGPT_4O_LATEST("chatgpt-4o-latest")`
130
131 - `CODEX_MINI_LATEST("codex-mini-latest")`
132
133 - `GPT_4O_MINI("gpt-4o-mini")`
134
135 - `GPT_4O_MINI_2024_07_18("gpt-4o-mini-2024-07-18")`
136
137 - `GPT_4_TURBO("gpt-4-turbo")`
138
139 - `GPT_4_TURBO_2024_04_09("gpt-4-turbo-2024-04-09")`
140
141 - `GPT_4_0125_PREVIEW("gpt-4-0125-preview")`
142
143 - `GPT_4_TURBO_PREVIEW("gpt-4-turbo-preview")`
144
145 - `GPT_4_1106_PREVIEW("gpt-4-1106-preview")`
146
147 - `GPT_4_VISION_PREVIEW("gpt-4-vision-preview")`
148
149 - `GPT_4("gpt-4")`
150
151 - `GPT_4_0314("gpt-4-0314")`
152
153 - `GPT_4_0613("gpt-4-0613")`
154
155 - `GPT_4_32K("gpt-4-32k")`
156
157 - `GPT_4_32K_0314("gpt-4-32k-0314")`
158
159 - `GPT_4_32K_0613("gpt-4-32k-0613")`
160
161 - `GPT_3_5_TURBO("gpt-3.5-turbo")`
162
163 - `GPT_3_5_TURBO_16K("gpt-3.5-turbo-16k")`
164
165 - `GPT_3_5_TURBO_0301("gpt-3.5-turbo-0301")`
166
167 - `GPT_3_5_TURBO_0613("gpt-3.5-turbo-0613")`
168
169 - `GPT_3_5_TURBO_1106("gpt-3.5-turbo-1106")`
170
171 - `GPT_3_5_TURBO_0125("gpt-3.5-turbo-0125")`
172
173 - `GPT_3_5_TURBO_16K_0613("gpt-3.5-turbo-16k-0613")`
174
175 - `ResponsesOnlyModel`
176
177 - `O1_PRO("o1-pro")`
178
179 - `O1_PRO_2025_03_19("o1-pro-2025-03-19")`
180
181 - `O3_PRO("o3-pro")`
182
183 - `O3_PRO_2025_06_10("o3-pro-2025-06-10")`
184
185 - `O3_DEEP_RESEARCH("o3-deep-research")`
186
187 - `O3_DEEP_RESEARCH_2025_06_26("o3-deep-research-2025-06-26")`
188
189 - `O4_MINI_DEEP_RESEARCH("o4-mini-deep-research")`
190
191 - `O4_MINI_DEEP_RESEARCH_2025_06_26("o4-mini-deep-research-2025-06-26")`
192
193 - `COMPUTER_USE_PREVIEW("computer-use-preview")`
194
195 - `COMPUTER_USE_PREVIEW_2025_03_11("computer-use-preview-2025-03-11")`
196
197 - `GPT_5_CODEX("gpt-5-codex")`
198
199 - `GPT_5_PRO("gpt-5-pro")`
200
201 - `GPT_5_PRO_2025_10_06("gpt-5-pro-2025-10-06")`
202
203 - `GPT_5_1_CODEX_MAX("gpt-5.1-codex-max")`
204
205### Chat Model
206
207- `enum ChatModel:`
208
209 - `GPT_5_6_SOL("gpt-5.6-sol")`
210
211 - `GPT_5_6_TERRA("gpt-5.6-terra")`
212
213 - `GPT_5_6_LUNA("gpt-5.6-luna")`
214
215 - `GPT_5_4("gpt-5.4")`
216
217 - `GPT_5_4_MINI("gpt-5.4-mini")`
218
219 - `GPT_5_4_NANO("gpt-5.4-nano")`
220
221 - `GPT_5_4_MINI_2026_03_17("gpt-5.4-mini-2026-03-17")`
222
223 - `GPT_5_4_NANO_2026_03_17("gpt-5.4-nano-2026-03-17")`
224
225 - `GPT_5_3_CHAT_LATEST("gpt-5.3-chat-latest")`
226
227 - `GPT_5_2("gpt-5.2")`
228
229 - `GPT_5_2_2025_12_11("gpt-5.2-2025-12-11")`
230
231 - `GPT_5_2_CHAT_LATEST("gpt-5.2-chat-latest")`
232
233 - `GPT_5_2_PRO("gpt-5.2-pro")`
234
235 - `GPT_5_2_PRO_2025_12_11("gpt-5.2-pro-2025-12-11")`
236
237 - `GPT_5_1("gpt-5.1")`
238
239 - `GPT_5_1_2025_11_13("gpt-5.1-2025-11-13")`
240
241 - `GPT_5_1_CODEX("gpt-5.1-codex")`
242
243 - `GPT_5_1_MINI("gpt-5.1-mini")`
244
245 - `GPT_5_1_CHAT_LATEST("gpt-5.1-chat-latest")`
246
247 - `GPT_5("gpt-5")`
248
249 - `GPT_5_MINI("gpt-5-mini")`
250
251 - `GPT_5_NANO("gpt-5-nano")`
252
253 - `GPT_5_2025_08_07("gpt-5-2025-08-07")`
254
255 - `GPT_5_MINI_2025_08_07("gpt-5-mini-2025-08-07")`
256
257 - `GPT_5_NANO_2025_08_07("gpt-5-nano-2025-08-07")`
258
259 - `GPT_5_CHAT_LATEST("gpt-5-chat-latest")`
260
261 - `GPT_4_1("gpt-4.1")`
262
263 - `GPT_4_1_MINI("gpt-4.1-mini")`
264
265 - `GPT_4_1_NANO("gpt-4.1-nano")`
266
267 - `GPT_4_1_2025_04_14("gpt-4.1-2025-04-14")`
268
269 - `GPT_4_1_MINI_2025_04_14("gpt-4.1-mini-2025-04-14")`
270
271 - `GPT_4_1_NANO_2025_04_14("gpt-4.1-nano-2025-04-14")`
272
273 - `O4_MINI("o4-mini")`
274
275 - `O4_MINI_2025_04_16("o4-mini-2025-04-16")`
276
277 - `O3("o3")`
278
279 - `O3_2025_04_16("o3-2025-04-16")`
280
281 - `O3_MINI("o3-mini")`
282
283 - `O3_MINI_2025_01_31("o3-mini-2025-01-31")`
284
285 - `O1("o1")`
286
287 - `O1_2024_12_17("o1-2024-12-17")`
288
289 - `O1_PREVIEW("o1-preview")`
290
291 - `O1_PREVIEW_2024_09_12("o1-preview-2024-09-12")`
292
293 - `O1_MINI("o1-mini")`
294
295 - `O1_MINI_2024_09_12("o1-mini-2024-09-12")`
296
297 - `GPT_4O("gpt-4o")`
298
299 - `GPT_4O_2024_11_20("gpt-4o-2024-11-20")`
300
301 - `GPT_4O_2024_08_06("gpt-4o-2024-08-06")`
302
303 - `GPT_4O_2024_05_13("gpt-4o-2024-05-13")`
304
305 - `GPT_4O_AUDIO_PREVIEW("gpt-4o-audio-preview")`
306
307 - `GPT_4O_AUDIO_PREVIEW_2024_10_01("gpt-4o-audio-preview-2024-10-01")`
308
309 - `GPT_4O_AUDIO_PREVIEW_2024_12_17("gpt-4o-audio-preview-2024-12-17")`
310
311 - `GPT_4O_AUDIO_PREVIEW_2025_06_03("gpt-4o-audio-preview-2025-06-03")`
312
313 - `GPT_4O_MINI_AUDIO_PREVIEW("gpt-4o-mini-audio-preview")`
314
315 - `GPT_4O_MINI_AUDIO_PREVIEW_2024_12_17("gpt-4o-mini-audio-preview-2024-12-17")`
316
317 - `GPT_4O_SEARCH_PREVIEW("gpt-4o-search-preview")`
318
319 - `GPT_4O_MINI_SEARCH_PREVIEW("gpt-4o-mini-search-preview")`
320
321 - `GPT_4O_SEARCH_PREVIEW_2025_03_11("gpt-4o-search-preview-2025-03-11")`
322
323 - `GPT_4O_MINI_SEARCH_PREVIEW_2025_03_11("gpt-4o-mini-search-preview-2025-03-11")`
324
325 - `CHATGPT_4O_LATEST("chatgpt-4o-latest")`
326
327 - `CODEX_MINI_LATEST("codex-mini-latest")`
328
329 - `GPT_4O_MINI("gpt-4o-mini")`
330
331 - `GPT_4O_MINI_2024_07_18("gpt-4o-mini-2024-07-18")`
332
333 - `GPT_4_TURBO("gpt-4-turbo")`
334
335 - `GPT_4_TURBO_2024_04_09("gpt-4-turbo-2024-04-09")`
336
337 - `GPT_4_0125_PREVIEW("gpt-4-0125-preview")`
338
339 - `GPT_4_TURBO_PREVIEW("gpt-4-turbo-preview")`
340
341 - `GPT_4_1106_PREVIEW("gpt-4-1106-preview")`
342
343 - `GPT_4_VISION_PREVIEW("gpt-4-vision-preview")`
344
345 - `GPT_4("gpt-4")`
346
347 - `GPT_4_0314("gpt-4-0314")`
348
349 - `GPT_4_0613("gpt-4-0613")`
350
351 - `GPT_4_32K("gpt-4-32k")`
352
353 - `GPT_4_32K_0314("gpt-4-32k-0314")`
354
355 - `GPT_4_32K_0613("gpt-4-32k-0613")`
356
357 - `GPT_3_5_TURBO("gpt-3.5-turbo")`
358
359 - `GPT_3_5_TURBO_16K("gpt-3.5-turbo-16k")`
360
361 - `GPT_3_5_TURBO_0301("gpt-3.5-turbo-0301")`
362
363 - `GPT_3_5_TURBO_0613("gpt-3.5-turbo-0613")`
364
365 - `GPT_3_5_TURBO_1106("gpt-3.5-turbo-1106")`
366
367 - `GPT_3_5_TURBO_0125("gpt-3.5-turbo-0125")`
368
369 - `GPT_3_5_TURBO_16K_0613("gpt-3.5-turbo-16k-0613")`
370
371### Comparison Filter
372
373- `class ComparisonFilter:`
374
375 A filter used to compare a specified attribute key to a given value using a defined comparison operation.
376
377 - `String key`
378
379 The key to compare against the value.
380
381 - `Type type`
382
383 Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.
384
385 - `eq`: equals
386 - `ne`: not equal
387 - `gt`: greater than
388 - `gte`: greater than or equal
389 - `lt`: less than
390 - `lte`: less than or equal
391 - `in`: in
392 - `nin`: not in
393
394 - `EQ("eq")`
395
396 - `NE("ne")`
397
398 - `GT("gt")`
399
400 - `GTE("gte")`
401
402 - `LT("lt")`
403
404 - `LTE("lte")`
405
406 - `IN("in")`
407
408 - `NIN("nin")`
409
410 - `Value value`
411
412 The value to compare against the attribute key; supports string, number, or boolean types.
413
414 - `String`
415
416 - `double`
417
418 - `boolean`
419
420 - `List<ComparisonFilterValueItem>`
421
422 - `String`
423
424 - `double`
425
426### Compound Filter
427
428- `class CompoundFilter:`
429
430 Combine multiple filters using `and` or `or`.
431
432 - `List<Filter> filters`
433
434 Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`.
435
436 - `class ComparisonFilter:`
437
438 A filter used to compare a specified attribute key to a given value using a defined comparison operation.
439
440 - `String key`
441
442 The key to compare against the value.
443
444 - `Type type`
445
446 Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.
447
448 - `eq`: equals
449 - `ne`: not equal
450 - `gt`: greater than
451 - `gte`: greater than or equal
452 - `lt`: less than
453 - `lte`: less than or equal
454 - `in`: in
455 - `nin`: not in
456
457 - `EQ("eq")`
458
459 - `NE("ne")`
460
461 - `GT("gt")`
462
463 - `GTE("gte")`
464
465 - `LT("lt")`
466
467 - `LTE("lte")`
468
469 - `IN("in")`
470
471 - `NIN("nin")`
472
473 - `Value value`
474
475 The value to compare against the attribute key; supports string, number, or boolean types.
476
477 - `String`
478
479 - `double`
480
481 - `boolean`
482
483 - `List<ComparisonFilterValueItem>`
484
485 - `String`
486
487 - `double`
488
489 - `JsonValue`
490
491 - `Type type`
492
493 Type of operation: `and` or `or`.
494
495 - `AND("and")`
496
497 - `OR("or")`
498
499### Custom Tool Input Format
500
501- `class CustomToolInputFormat: A class that can be one of several variants.union`
502
503 The input format for the custom tool. Default is unconstrained text.
504
505 - `JsonValue;`
506
507 - `JsonValue; type "text"constant`
508
509 Unconstrained text format. Always `text`.
510
511 - `TEXT("text")`
512
513 - `Grammar`
514
515 - `String definition`
516
517 The grammar definition.
518
519 - `Syntax syntax`
520
521 The syntax of the grammar definition. One of `lark` or `regex`.
522
523 - `LARK("lark")`
524
525 - `REGEX("regex")`
526
527 - `JsonValue; type "grammar"constant`
528
529 Grammar format. Always `grammar`.
530
531 - `GRAMMAR("grammar")`
532
533### Error Object
534
535- `class ErrorObject:`
536
537 - `Optional<String> code`
538
539 - `String message`
540
541 - `Optional<String> param`
542
543 - `String type`
544
545### Function Definition
546
547- `class FunctionDefinition:`
548
549 - `String name`
550
551 The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.
552
553 - `Optional<String> description`
554
555 A description of what the function does, used by the model to choose when and how to call the function.
556
557 - `Optional<FunctionParameters> parameters`
558
559 The parameters the functions accepts, described as a JSON Schema object. See the [guide](https://platform.openai.com/docs/guides/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format.
560
561 Omitting `parameters` defines a function with an empty parameter list.
562
563 - `Optional<Boolean> strict`
564
565 Whether to enable strict schema adherence when generating the function call. If set to true, the model will follow the exact schema defined in the `parameters` field. Only a subset of JSON Schema is supported when `strict` is `true`. Learn more about Structured Outputs in the [function calling guide](https://platform.openai.com/docs/guides/function-calling).
566
567### Function Parameters
568
569- `class FunctionParameters:`
570
571 The parameters the functions accepts, described as a JSON Schema object. See the [guide](https://platform.openai.com/docs/guides/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format.
572
573 Omitting `parameters` defines a function with an empty parameter list.
574
575### OAuth Error Code
576
577- `enum OAuthErrorCode:`
578
579 - `INVALID_GRANT("invalid_grant")`
580
581 - `INVALID_SUBJECT_TOKEN("invalid_subject_token")`
582
583### Reasoning
584
585- `class Reasoning:`
586
587 **gpt-5 and o-series models only**
588
589 Configuration options for
590 [reasoning models](https://platform.openai.com/docs/guides/reasoning).
591
592 - `Optional<Context> context`
593
594 Controls which reasoning items are rendered back to the model on later turns.
595 If omitted or set to `auto`, the model determines the context mode. The
596 `gpt-5.6` model family defaults to `all_turns`; earlier models default to
597 `current_turn`.
598
599 When returned on a response, this is the effective reasoning context mode
600 used for the response.
601
602 - `AUTO("auto")`
603
604 - `CURRENT_TURN("current_turn")`
605
606 - `ALL_TURNS("all_turns")`
607
608 - `Optional<ReasoningEffort> effort`
609
610 Constrains effort on reasoning for reasoning models. Currently supported
611 values are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`.
612 Reducing reasoning effort can result in faster responses and fewer tokens
613 used on reasoning in a response. Not all reasoning models support every
614 value. See the
615 [reasoning guide](https://platform.openai.com/docs/guides/reasoning)
616 for model-specific support.
617
618 - `NONE("none")`
619
620 - `MINIMAL("minimal")`
621
622 - `LOW("low")`
623
624 - `MEDIUM("medium")`
625
626 - `HIGH("high")`
627
628 - `XHIGH("xhigh")`
629
630 - `MAX("max")`
631
632 - `Optional<GenerateSummary> generateSummary`
633
634 **Deprecated:** use `summary` instead.
635
636 A summary of the reasoning performed by the model. This can be
637 useful for debugging and understanding the model's reasoning process.
638 One of `auto`, `concise`, or `detailed`.
639
640 - `AUTO("auto")`
641
642 - `CONCISE("concise")`
643
644 - `DETAILED("detailed")`
645
646 - `Optional<Mode> mode`
647
648 Controls the reasoning execution mode for the request.
649
650 When returned on a response, this is the effective execution mode.
651
652 - `STANDARD("standard")`
653
654 - `PRO("pro")`
655
656 - `Optional<Summary> summary`
657
658 A summary of the reasoning performed by the model. This can be
659 useful for debugging and understanding the model's reasoning process.
660 One of `auto`, `concise`, or `detailed`.
661
662 `concise` is supported for `computer-use-preview` models and all reasoning models after `gpt-5`.
663
664 - `AUTO("auto")`
665
666 - `CONCISE("concise")`
667
668 - `DETAILED("detailed")`
669
670### Reasoning Effort
671
672- `enum ReasoningEffort:`
673
674 Constrains effort on reasoning for reasoning models. Currently supported
675 values are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`.
676 Reducing reasoning effort can result in faster responses and fewer tokens
677 used on reasoning in a response. Not all reasoning models support every
678 value. See the
679 [reasoning guide](https://platform.openai.com/docs/guides/reasoning)
680 for model-specific support.
681
682 - `NONE("none")`
683
684 - `MINIMAL("minimal")`
685
686 - `LOW("low")`
687
688 - `MEDIUM("medium")`
689
690 - `HIGH("high")`
691
692 - `XHIGH("xhigh")`
693
694 - `MAX("max")`
695
696### Response Format JSON Object
697
698- `class ResponseFormatJsonObject:`
699
700 JSON object response format. An older method of generating JSON responses.
701 Using `json_schema` is recommended for models that support it. Note that the
702 model will not generate JSON without a system or user message instructing it
703 to do so.
704
705 - `JsonValue; type "json_object"constant`
706
707 The type of response format being defined. Always `json_object`.
708
709 - `JSON_OBJECT("json_object")`
710
711### Response Format JSON Schema
712
713- `class ResponseFormatJsonSchema:`
714
715 JSON Schema response format. Used to generate structured JSON responses.
716 Learn more about [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs).
717
718 - `JsonSchema jsonSchema`
719
720 Structured Outputs configuration options, including a JSON Schema.
721
722 - `String name`
723
724 The name of the response format. Must be a-z, A-Z, 0-9, or contain
725 underscores and dashes, with a maximum length of 64.
726
727 - `Optional<String> description`
728
729 A description of what the response format is for, used by the model to
730 determine how to respond in the format.
731
732 - `Optional<Schema> schema`
733
734 The schema for the response format, described as a JSON Schema object.
735 Learn how to build JSON schemas [here](https://json-schema.org/).
736
737 - `Optional<Boolean> strict`
738
739 Whether to enable strict schema adherence when generating the output.
740 If set to true, the model will always follow the exact schema defined
741 in the `schema` field. Only a subset of JSON Schema is supported when
742 `strict` is `true`. To learn more, read the [Structured Outputs
743 guide](https://platform.openai.com/docs/guides/structured-outputs).
744
745 - `JsonValue; type "json_schema"constant`
746
747 The type of response format being defined. Always `json_schema`.
748
749 - `JSON_SCHEMA("json_schema")`
750
751### Response Format Text
752
753- `class ResponseFormatText:`
754
755 Default response format. Used to generate text responses.
756
757 - `JsonValue; type "text"constant`
758
759 The type of response format being defined. Always `text`.
760
761 - `TEXT("text")`
762
763### Response Format Text Grammar
764
765- `class ResponseFormatTextGrammar:`
766
767 A custom grammar for the model to follow when generating text.
768 Learn more in the [custom grammars guide](https://platform.openai.com/docs/guides/custom-grammars).
769
770 - `String grammar`
771
772 The custom grammar for the model to follow.
773
774 - `JsonValue; type "grammar"constant`
775
776 The type of response format being defined. Always `grammar`.
777
778 - `GRAMMAR("grammar")`
779
780### Response Format Text Python
781
782- `class ResponseFormatTextPython:`
783
784 Configure the model to generate valid Python code. See the
785 [custom grammars guide](https://platform.openai.com/docs/guides/custom-grammars) for more details.
786
787 - `JsonValue; type "python"constant`
788
789 The type of response format being defined. Always `python`.
790
791 - `PYTHON("python")`
792
793### Responses Model
794
795- `class ResponsesModel: A class that can be one of several variants.union`
796
797 - `String`
798
799 - `enum ChatModel:`
800
801 - `GPT_5_6_SOL("gpt-5.6-sol")`
802
803 - `GPT_5_6_TERRA("gpt-5.6-terra")`
804
805 - `GPT_5_6_LUNA("gpt-5.6-luna")`
806
807 - `GPT_5_4("gpt-5.4")`
808
809 - `GPT_5_4_MINI("gpt-5.4-mini")`
810
811 - `GPT_5_4_NANO("gpt-5.4-nano")`
812
813 - `GPT_5_4_MINI_2026_03_17("gpt-5.4-mini-2026-03-17")`
814
815 - `GPT_5_4_NANO_2026_03_17("gpt-5.4-nano-2026-03-17")`
816
817 - `GPT_5_3_CHAT_LATEST("gpt-5.3-chat-latest")`
818
819 - `GPT_5_2("gpt-5.2")`
820
821 - `GPT_5_2_2025_12_11("gpt-5.2-2025-12-11")`
822
823 - `GPT_5_2_CHAT_LATEST("gpt-5.2-chat-latest")`
824
825 - `GPT_5_2_PRO("gpt-5.2-pro")`
826
827 - `GPT_5_2_PRO_2025_12_11("gpt-5.2-pro-2025-12-11")`
828
829 - `GPT_5_1("gpt-5.1")`
830
831 - `GPT_5_1_2025_11_13("gpt-5.1-2025-11-13")`
832
833 - `GPT_5_1_CODEX("gpt-5.1-codex")`
834
835 - `GPT_5_1_MINI("gpt-5.1-mini")`
836
837 - `GPT_5_1_CHAT_LATEST("gpt-5.1-chat-latest")`
838
839 - `GPT_5("gpt-5")`
840
841 - `GPT_5_MINI("gpt-5-mini")`
842
843 - `GPT_5_NANO("gpt-5-nano")`
844
845 - `GPT_5_2025_08_07("gpt-5-2025-08-07")`
846
847 - `GPT_5_MINI_2025_08_07("gpt-5-mini-2025-08-07")`
848
849 - `GPT_5_NANO_2025_08_07("gpt-5-nano-2025-08-07")`
850
851 - `GPT_5_CHAT_LATEST("gpt-5-chat-latest")`
852
853 - `GPT_4_1("gpt-4.1")`
854
855 - `GPT_4_1_MINI("gpt-4.1-mini")`
856
857 - `GPT_4_1_NANO("gpt-4.1-nano")`
858
859 - `GPT_4_1_2025_04_14("gpt-4.1-2025-04-14")`
860
861 - `GPT_4_1_MINI_2025_04_14("gpt-4.1-mini-2025-04-14")`
862
863 - `GPT_4_1_NANO_2025_04_14("gpt-4.1-nano-2025-04-14")`
864
865 - `O4_MINI("o4-mini")`
866
867 - `O4_MINI_2025_04_16("o4-mini-2025-04-16")`
868
869 - `O3("o3")`
870
871 - `O3_2025_04_16("o3-2025-04-16")`
872
873 - `O3_MINI("o3-mini")`
874
875 - `O3_MINI_2025_01_31("o3-mini-2025-01-31")`
876
877 - `O1("o1")`
878
879 - `O1_2024_12_17("o1-2024-12-17")`
880
881 - `O1_PREVIEW("o1-preview")`
882
883 - `O1_PREVIEW_2024_09_12("o1-preview-2024-09-12")`
884
885 - `O1_MINI("o1-mini")`
886
887 - `O1_MINI_2024_09_12("o1-mini-2024-09-12")`
888
889 - `GPT_4O("gpt-4o")`
890
891 - `GPT_4O_2024_11_20("gpt-4o-2024-11-20")`
892
893 - `GPT_4O_2024_08_06("gpt-4o-2024-08-06")`
894
895 - `GPT_4O_2024_05_13("gpt-4o-2024-05-13")`
896
897 - `GPT_4O_AUDIO_PREVIEW("gpt-4o-audio-preview")`
898
899 - `GPT_4O_AUDIO_PREVIEW_2024_10_01("gpt-4o-audio-preview-2024-10-01")`
900
901 - `GPT_4O_AUDIO_PREVIEW_2024_12_17("gpt-4o-audio-preview-2024-12-17")`
902
903 - `GPT_4O_AUDIO_PREVIEW_2025_06_03("gpt-4o-audio-preview-2025-06-03")`
904
905 - `GPT_4O_MINI_AUDIO_PREVIEW("gpt-4o-mini-audio-preview")`
906
907 - `GPT_4O_MINI_AUDIO_PREVIEW_2024_12_17("gpt-4o-mini-audio-preview-2024-12-17")`
908
909 - `GPT_4O_SEARCH_PREVIEW("gpt-4o-search-preview")`
910
911 - `GPT_4O_MINI_SEARCH_PREVIEW("gpt-4o-mini-search-preview")`
912
913 - `GPT_4O_SEARCH_PREVIEW_2025_03_11("gpt-4o-search-preview-2025-03-11")`
914
915 - `GPT_4O_MINI_SEARCH_PREVIEW_2025_03_11("gpt-4o-mini-search-preview-2025-03-11")`
916
917 - `CHATGPT_4O_LATEST("chatgpt-4o-latest")`
918
919 - `CODEX_MINI_LATEST("codex-mini-latest")`
920
921 - `GPT_4O_MINI("gpt-4o-mini")`
922
923 - `GPT_4O_MINI_2024_07_18("gpt-4o-mini-2024-07-18")`
924
925 - `GPT_4_TURBO("gpt-4-turbo")`
926
927 - `GPT_4_TURBO_2024_04_09("gpt-4-turbo-2024-04-09")`
928
929 - `GPT_4_0125_PREVIEW("gpt-4-0125-preview")`
930
931 - `GPT_4_TURBO_PREVIEW("gpt-4-turbo-preview")`
932
933 - `GPT_4_1106_PREVIEW("gpt-4-1106-preview")`
934
935 - `GPT_4_VISION_PREVIEW("gpt-4-vision-preview")`
936
937 - `GPT_4("gpt-4")`
938
939 - `GPT_4_0314("gpt-4-0314")`
940
941 - `GPT_4_0613("gpt-4-0613")`
942
943 - `GPT_4_32K("gpt-4-32k")`
944
945 - `GPT_4_32K_0314("gpt-4-32k-0314")`
946
947 - `GPT_4_32K_0613("gpt-4-32k-0613")`
948
949 - `GPT_3_5_TURBO("gpt-3.5-turbo")`
950
951 - `GPT_3_5_TURBO_16K("gpt-3.5-turbo-16k")`
952
953 - `GPT_3_5_TURBO_0301("gpt-3.5-turbo-0301")`
954
955 - `GPT_3_5_TURBO_0613("gpt-3.5-turbo-0613")`
956
957 - `GPT_3_5_TURBO_1106("gpt-3.5-turbo-1106")`
958
959 - `GPT_3_5_TURBO_0125("gpt-3.5-turbo-0125")`
960
961 - `GPT_3_5_TURBO_16K_0613("gpt-3.5-turbo-16k-0613")`
962
963 - `ResponsesOnlyModel`
964
965 - `O1_PRO("o1-pro")`
966
967 - `O1_PRO_2025_03_19("o1-pro-2025-03-19")`
968
969 - `O3_PRO("o3-pro")`
970
971 - `O3_PRO_2025_06_10("o3-pro-2025-06-10")`
972
973 - `O3_DEEP_RESEARCH("o3-deep-research")`
974
975 - `O3_DEEP_RESEARCH_2025_06_26("o3-deep-research-2025-06-26")`
976
977 - `O4_MINI_DEEP_RESEARCH("o4-mini-deep-research")`
978
979 - `O4_MINI_DEEP_RESEARCH_2025_06_26("o4-mini-deep-research-2025-06-26")`
980
981 - `COMPUTER_USE_PREVIEW("computer-use-preview")`
982
983 - `COMPUTER_USE_PREVIEW_2025_03_11("computer-use-preview-2025-03-11")`
984
985 - `GPT_5_CODEX("gpt-5-codex")`
986
987 - `GPT_5_PRO("gpt-5-pro")`
988
989 - `GPT_5_PRO_2025_10_06("gpt-5-pro-2025-10-06")`
990
991 - `GPT_5_1_CODEX_MAX("gpt-5.1-codex-max")`