go/resources/$shared/index.md +0 −1016 deleted
File Deleted View Diff
1# Shared
2
3## Domain Types
4
5### All Models
6
7- `type AllModels interface{…}`
8
9 - `string`
10
11 - `type ChatModel string`
12
13 - `const ChatModelGPT5_6Sol ChatModel = "gpt-5.6-sol"`
14
15 - `const ChatModelGPT5_6Terra ChatModel = "gpt-5.6-terra"`
16
17 - `const ChatModelGPT5_6Luna ChatModel = "gpt-5.6-luna"`
18
19 - `const ChatModelGPT5_4 ChatModel = "gpt-5.4"`
20
21 - `const ChatModelGPT5_4Mini ChatModel = "gpt-5.4-mini"`
22
23 - `const ChatModelGPT5_4Nano ChatModel = "gpt-5.4-nano"`
24
25 - `const ChatModelGPT5_4Mini2026_03_17 ChatModel = "gpt-5.4-mini-2026-03-17"`
26
27 - `const ChatModelGPT5_4Nano2026_03_17 ChatModel = "gpt-5.4-nano-2026-03-17"`
28
29 - `const ChatModelGPT5_3ChatLatest ChatModel = "gpt-5.3-chat-latest"`
30
31 - `const ChatModelGPT5_2 ChatModel = "gpt-5.2"`
32
33 - `const ChatModelGPT5_2_2025_12_11 ChatModel = "gpt-5.2-2025-12-11"`
34
35 - `const ChatModelGPT5_2ChatLatest ChatModel = "gpt-5.2-chat-latest"`
36
37 - `const ChatModelGPT5_2Pro ChatModel = "gpt-5.2-pro"`
38
39 - `const ChatModelGPT5_2Pro2025_12_11 ChatModel = "gpt-5.2-pro-2025-12-11"`
40
41 - `const ChatModelGPT5_1 ChatModel = "gpt-5.1"`
42
43 - `const ChatModelGPT5_1_2025_11_13 ChatModel = "gpt-5.1-2025-11-13"`
44
45 - `const ChatModelGPT5_1Codex ChatModel = "gpt-5.1-codex"`
46
47 - `const ChatModelGPT5_1Mini ChatModel = "gpt-5.1-mini"`
48
49 - `const ChatModelGPT5_1ChatLatest ChatModel = "gpt-5.1-chat-latest"`
50
51 - `const ChatModelGPT5 ChatModel = "gpt-5"`
52
53 - `const ChatModelGPT5Mini ChatModel = "gpt-5-mini"`
54
55 - `const ChatModelGPT5Nano ChatModel = "gpt-5-nano"`
56
57 - `const ChatModelGPT5_2025_08_07 ChatModel = "gpt-5-2025-08-07"`
58
59 - `const ChatModelGPT5Mini2025_08_07 ChatModel = "gpt-5-mini-2025-08-07"`
60
61 - `const ChatModelGPT5Nano2025_08_07 ChatModel = "gpt-5-nano-2025-08-07"`
62
63 - `const ChatModelGPT5ChatLatest ChatModel = "gpt-5-chat-latest"`
64
65 - `const ChatModelGPT4_1 ChatModel = "gpt-4.1"`
66
67 - `const ChatModelGPT4_1Mini ChatModel = "gpt-4.1-mini"`
68
69 - `const ChatModelGPT4_1Nano ChatModel = "gpt-4.1-nano"`
70
71 - `const ChatModelGPT4_1_2025_04_14 ChatModel = "gpt-4.1-2025-04-14"`
72
73 - `const ChatModelGPT4_1Mini2025_04_14 ChatModel = "gpt-4.1-mini-2025-04-14"`
74
75 - `const ChatModelGPT4_1Nano2025_04_14 ChatModel = "gpt-4.1-nano-2025-04-14"`
76
77 - `const ChatModelO4Mini ChatModel = "o4-mini"`
78
79 - `const ChatModelO4Mini2025_04_16 ChatModel = "o4-mini-2025-04-16"`
80
81 - `const ChatModelO3 ChatModel = "o3"`
82
83 - `const ChatModelO3_2025_04_16 ChatModel = "o3-2025-04-16"`
84
85 - `const ChatModelO3Mini ChatModel = "o3-mini"`
86
87 - `const ChatModelO3Mini2025_01_31 ChatModel = "o3-mini-2025-01-31"`
88
89 - `const ChatModelO1 ChatModel = "o1"`
90
91 - `const ChatModelO1_2024_12_17 ChatModel = "o1-2024-12-17"`
92
93 - `const ChatModelO1Preview ChatModel = "o1-preview"`
94
95 - `const ChatModelO1Preview2024_09_12 ChatModel = "o1-preview-2024-09-12"`
96
97 - `const ChatModelO1Mini ChatModel = "o1-mini"`
98
99 - `const ChatModelO1Mini2024_09_12 ChatModel = "o1-mini-2024-09-12"`
100
101 - `const ChatModelGPT4o ChatModel = "gpt-4o"`
102
103 - `const ChatModelGPT4o2024_11_20 ChatModel = "gpt-4o-2024-11-20"`
104
105 - `const ChatModelGPT4o2024_08_06 ChatModel = "gpt-4o-2024-08-06"`
106
107 - `const ChatModelGPT4o2024_05_13 ChatModel = "gpt-4o-2024-05-13"`
108
109 - `const ChatModelGPT4oAudioPreview ChatModel = "gpt-4o-audio-preview"`
110
111 - `const ChatModelGPT4oAudioPreview2024_10_01 ChatModel = "gpt-4o-audio-preview-2024-10-01"`
112
113 - `const ChatModelGPT4oAudioPreview2024_12_17 ChatModel = "gpt-4o-audio-preview-2024-12-17"`
114
115 - `const ChatModelGPT4oAudioPreview2025_06_03 ChatModel = "gpt-4o-audio-preview-2025-06-03"`
116
117 - `const ChatModelGPT4oMiniAudioPreview ChatModel = "gpt-4o-mini-audio-preview"`
118
119 - `const ChatModelGPT4oMiniAudioPreview2024_12_17 ChatModel = "gpt-4o-mini-audio-preview-2024-12-17"`
120
121 - `const ChatModelGPT4oSearchPreview ChatModel = "gpt-4o-search-preview"`
122
123 - `const ChatModelGPT4oMiniSearchPreview ChatModel = "gpt-4o-mini-search-preview"`
124
125 - `const ChatModelGPT4oSearchPreview2025_03_11 ChatModel = "gpt-4o-search-preview-2025-03-11"`
126
127 - `const ChatModelGPT4oMiniSearchPreview2025_03_11 ChatModel = "gpt-4o-mini-search-preview-2025-03-11"`
128
129 - `const ChatModelChatgpt4oLatest ChatModel = "chatgpt-4o-latest"`
130
131 - `const ChatModelCodexMiniLatest ChatModel = "codex-mini-latest"`
132
133 - `const ChatModelGPT4oMini ChatModel = "gpt-4o-mini"`
134
135 - `const ChatModelGPT4oMini2024_07_18 ChatModel = "gpt-4o-mini-2024-07-18"`
136
137 - `const ChatModelGPT4Turbo ChatModel = "gpt-4-turbo"`
138
139 - `const ChatModelGPT4Turbo2024_04_09 ChatModel = "gpt-4-turbo-2024-04-09"`
140
141 - `const ChatModelGPT4_0125Preview ChatModel = "gpt-4-0125-preview"`
142
143 - `const ChatModelGPT4TurboPreview ChatModel = "gpt-4-turbo-preview"`
144
145 - `const ChatModelGPT4_1106Preview ChatModel = "gpt-4-1106-preview"`
146
147 - `const ChatModelGPT4VisionPreview ChatModel = "gpt-4-vision-preview"`
148
149 - `const ChatModelGPT4 ChatModel = "gpt-4"`
150
151 - `const ChatModelGPT4_0314 ChatModel = "gpt-4-0314"`
152
153 - `const ChatModelGPT4_0613 ChatModel = "gpt-4-0613"`
154
155 - `const ChatModelGPT4_32k ChatModel = "gpt-4-32k"`
156
157 - `const ChatModelGPT4_32k0314 ChatModel = "gpt-4-32k-0314"`
158
159 - `const ChatModelGPT4_32k0613 ChatModel = "gpt-4-32k-0613"`
160
161 - `const ChatModelGPT3_5Turbo ChatModel = "gpt-3.5-turbo"`
162
163 - `const ChatModelGPT3_5Turbo16k ChatModel = "gpt-3.5-turbo-16k"`
164
165 - `const ChatModelGPT3_5Turbo0301 ChatModel = "gpt-3.5-turbo-0301"`
166
167 - `const ChatModelGPT3_5Turbo0613 ChatModel = "gpt-3.5-turbo-0613"`
168
169 - `const ChatModelGPT3_5Turbo1106 ChatModel = "gpt-3.5-turbo-1106"`
170
171 - `const ChatModelGPT3_5Turbo0125 ChatModel = "gpt-3.5-turbo-0125"`
172
173 - `const ChatModelGPT3_5Turbo16k0613 ChatModel = "gpt-3.5-turbo-16k-0613"`
174
175 - `type AllModels string`
176
177 - `const AllModelsO1Pro AllModels = "o1-pro"`
178
179 - `const AllModelsO1Pro2025_03_19 AllModels = "o1-pro-2025-03-19"`
180
181 - `const AllModelsO3Pro AllModels = "o3-pro"`
182
183 - `const AllModelsO3Pro2025_06_10 AllModels = "o3-pro-2025-06-10"`
184
185 - `const AllModelsO3DeepResearch AllModels = "o3-deep-research"`
186
187 - `const AllModelsO3DeepResearch2025_06_26 AllModels = "o3-deep-research-2025-06-26"`
188
189 - `const AllModelsO4MiniDeepResearch AllModels = "o4-mini-deep-research"`
190
191 - `const AllModelsO4MiniDeepResearch2025_06_26 AllModels = "o4-mini-deep-research-2025-06-26"`
192
193 - `const AllModelsComputerUsePreview AllModels = "computer-use-preview"`
194
195 - `const AllModelsComputerUsePreview2025_03_11 AllModels = "computer-use-preview-2025-03-11"`
196
197 - `const AllModelsGPT5Codex AllModels = "gpt-5-codex"`
198
199 - `const AllModelsGPT5Pro AllModels = "gpt-5-pro"`
200
201 - `const AllModelsGPT5Pro2025_10_06 AllModels = "gpt-5-pro-2025-10-06"`
202
203 - `const AllModelsGPT5_1CodexMax AllModels = "gpt-5.1-codex-max"`
204
205### Chat Model
206
207- `type ChatModel string`
208
209 - `const ChatModelGPT5_6Sol ChatModel = "gpt-5.6-sol"`
210
211 - `const ChatModelGPT5_6Terra ChatModel = "gpt-5.6-terra"`
212
213 - `const ChatModelGPT5_6Luna ChatModel = "gpt-5.6-luna"`
214
215 - `const ChatModelGPT5_4 ChatModel = "gpt-5.4"`
216
217 - `const ChatModelGPT5_4Mini ChatModel = "gpt-5.4-mini"`
218
219 - `const ChatModelGPT5_4Nano ChatModel = "gpt-5.4-nano"`
220
221 - `const ChatModelGPT5_4Mini2026_03_17 ChatModel = "gpt-5.4-mini-2026-03-17"`
222
223 - `const ChatModelGPT5_4Nano2026_03_17 ChatModel = "gpt-5.4-nano-2026-03-17"`
224
225 - `const ChatModelGPT5_3ChatLatest ChatModel = "gpt-5.3-chat-latest"`
226
227 - `const ChatModelGPT5_2 ChatModel = "gpt-5.2"`
228
229 - `const ChatModelGPT5_2_2025_12_11 ChatModel = "gpt-5.2-2025-12-11"`
230
231 - `const ChatModelGPT5_2ChatLatest ChatModel = "gpt-5.2-chat-latest"`
232
233 - `const ChatModelGPT5_2Pro ChatModel = "gpt-5.2-pro"`
234
235 - `const ChatModelGPT5_2Pro2025_12_11 ChatModel = "gpt-5.2-pro-2025-12-11"`
236
237 - `const ChatModelGPT5_1 ChatModel = "gpt-5.1"`
238
239 - `const ChatModelGPT5_1_2025_11_13 ChatModel = "gpt-5.1-2025-11-13"`
240
241 - `const ChatModelGPT5_1Codex ChatModel = "gpt-5.1-codex"`
242
243 - `const ChatModelGPT5_1Mini ChatModel = "gpt-5.1-mini"`
244
245 - `const ChatModelGPT5_1ChatLatest ChatModel = "gpt-5.1-chat-latest"`
246
247 - `const ChatModelGPT5 ChatModel = "gpt-5"`
248
249 - `const ChatModelGPT5Mini ChatModel = "gpt-5-mini"`
250
251 - `const ChatModelGPT5Nano ChatModel = "gpt-5-nano"`
252
253 - `const ChatModelGPT5_2025_08_07 ChatModel = "gpt-5-2025-08-07"`
254
255 - `const ChatModelGPT5Mini2025_08_07 ChatModel = "gpt-5-mini-2025-08-07"`
256
257 - `const ChatModelGPT5Nano2025_08_07 ChatModel = "gpt-5-nano-2025-08-07"`
258
259 - `const ChatModelGPT5ChatLatest ChatModel = "gpt-5-chat-latest"`
260
261 - `const ChatModelGPT4_1 ChatModel = "gpt-4.1"`
262
263 - `const ChatModelGPT4_1Mini ChatModel = "gpt-4.1-mini"`
264
265 - `const ChatModelGPT4_1Nano ChatModel = "gpt-4.1-nano"`
266
267 - `const ChatModelGPT4_1_2025_04_14 ChatModel = "gpt-4.1-2025-04-14"`
268
269 - `const ChatModelGPT4_1Mini2025_04_14 ChatModel = "gpt-4.1-mini-2025-04-14"`
270
271 - `const ChatModelGPT4_1Nano2025_04_14 ChatModel = "gpt-4.1-nano-2025-04-14"`
272
273 - `const ChatModelO4Mini ChatModel = "o4-mini"`
274
275 - `const ChatModelO4Mini2025_04_16 ChatModel = "o4-mini-2025-04-16"`
276
277 - `const ChatModelO3 ChatModel = "o3"`
278
279 - `const ChatModelO3_2025_04_16 ChatModel = "o3-2025-04-16"`
280
281 - `const ChatModelO3Mini ChatModel = "o3-mini"`
282
283 - `const ChatModelO3Mini2025_01_31 ChatModel = "o3-mini-2025-01-31"`
284
285 - `const ChatModelO1 ChatModel = "o1"`
286
287 - `const ChatModelO1_2024_12_17 ChatModel = "o1-2024-12-17"`
288
289 - `const ChatModelO1Preview ChatModel = "o1-preview"`
290
291 - `const ChatModelO1Preview2024_09_12 ChatModel = "o1-preview-2024-09-12"`
292
293 - `const ChatModelO1Mini ChatModel = "o1-mini"`
294
295 - `const ChatModelO1Mini2024_09_12 ChatModel = "o1-mini-2024-09-12"`
296
297 - `const ChatModelGPT4o ChatModel = "gpt-4o"`
298
299 - `const ChatModelGPT4o2024_11_20 ChatModel = "gpt-4o-2024-11-20"`
300
301 - `const ChatModelGPT4o2024_08_06 ChatModel = "gpt-4o-2024-08-06"`
302
303 - `const ChatModelGPT4o2024_05_13 ChatModel = "gpt-4o-2024-05-13"`
304
305 - `const ChatModelGPT4oAudioPreview ChatModel = "gpt-4o-audio-preview"`
306
307 - `const ChatModelGPT4oAudioPreview2024_10_01 ChatModel = "gpt-4o-audio-preview-2024-10-01"`
308
309 - `const ChatModelGPT4oAudioPreview2024_12_17 ChatModel = "gpt-4o-audio-preview-2024-12-17"`
310
311 - `const ChatModelGPT4oAudioPreview2025_06_03 ChatModel = "gpt-4o-audio-preview-2025-06-03"`
312
313 - `const ChatModelGPT4oMiniAudioPreview ChatModel = "gpt-4o-mini-audio-preview"`
314
315 - `const ChatModelGPT4oMiniAudioPreview2024_12_17 ChatModel = "gpt-4o-mini-audio-preview-2024-12-17"`
316
317 - `const ChatModelGPT4oSearchPreview ChatModel = "gpt-4o-search-preview"`
318
319 - `const ChatModelGPT4oMiniSearchPreview ChatModel = "gpt-4o-mini-search-preview"`
320
321 - `const ChatModelGPT4oSearchPreview2025_03_11 ChatModel = "gpt-4o-search-preview-2025-03-11"`
322
323 - `const ChatModelGPT4oMiniSearchPreview2025_03_11 ChatModel = "gpt-4o-mini-search-preview-2025-03-11"`
324
325 - `const ChatModelChatgpt4oLatest ChatModel = "chatgpt-4o-latest"`
326
327 - `const ChatModelCodexMiniLatest ChatModel = "codex-mini-latest"`
328
329 - `const ChatModelGPT4oMini ChatModel = "gpt-4o-mini"`
330
331 - `const ChatModelGPT4oMini2024_07_18 ChatModel = "gpt-4o-mini-2024-07-18"`
332
333 - `const ChatModelGPT4Turbo ChatModel = "gpt-4-turbo"`
334
335 - `const ChatModelGPT4Turbo2024_04_09 ChatModel = "gpt-4-turbo-2024-04-09"`
336
337 - `const ChatModelGPT4_0125Preview ChatModel = "gpt-4-0125-preview"`
338
339 - `const ChatModelGPT4TurboPreview ChatModel = "gpt-4-turbo-preview"`
340
341 - `const ChatModelGPT4_1106Preview ChatModel = "gpt-4-1106-preview"`
342
343 - `const ChatModelGPT4VisionPreview ChatModel = "gpt-4-vision-preview"`
344
345 - `const ChatModelGPT4 ChatModel = "gpt-4"`
346
347 - `const ChatModelGPT4_0314 ChatModel = "gpt-4-0314"`
348
349 - `const ChatModelGPT4_0613 ChatModel = "gpt-4-0613"`
350
351 - `const ChatModelGPT4_32k ChatModel = "gpt-4-32k"`
352
353 - `const ChatModelGPT4_32k0314 ChatModel = "gpt-4-32k-0314"`
354
355 - `const ChatModelGPT4_32k0613 ChatModel = "gpt-4-32k-0613"`
356
357 - `const ChatModelGPT3_5Turbo ChatModel = "gpt-3.5-turbo"`
358
359 - `const ChatModelGPT3_5Turbo16k ChatModel = "gpt-3.5-turbo-16k"`
360
361 - `const ChatModelGPT3_5Turbo0301 ChatModel = "gpt-3.5-turbo-0301"`
362
363 - `const ChatModelGPT3_5Turbo0613 ChatModel = "gpt-3.5-turbo-0613"`
364
365 - `const ChatModelGPT3_5Turbo1106 ChatModel = "gpt-3.5-turbo-1106"`
366
367 - `const ChatModelGPT3_5Turbo0125 ChatModel = "gpt-3.5-turbo-0125"`
368
369 - `const ChatModelGPT3_5Turbo16k0613 ChatModel = "gpt-3.5-turbo-16k-0613"`
370
371### Comparison Filter
372
373- `type ComparisonFilter struct{…}`
374
375 A filter used to compare a specified attribute key to a given value using a defined comparison operation.
376
377 - `Key string`
378
379 The key to compare against the value.
380
381 - `Type ComparisonFilterType`
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 - `const ComparisonFilterTypeEq ComparisonFilterType = "eq"`
395
396 - `const ComparisonFilterTypeNe ComparisonFilterType = "ne"`
397
398 - `const ComparisonFilterTypeGt ComparisonFilterType = "gt"`
399
400 - `const ComparisonFilterTypeGte ComparisonFilterType = "gte"`
401
402 - `const ComparisonFilterTypeLt ComparisonFilterType = "lt"`
403
404 - `const ComparisonFilterTypeLte ComparisonFilterType = "lte"`
405
406 - `const ComparisonFilterTypeIn ComparisonFilterType = "in"`
407
408 - `const ComparisonFilterTypeNin ComparisonFilterType = "nin"`
409
410 - `Value ComparisonFilterValueUnion`
411
412 The value to compare against the attribute key; supports string, number, or boolean types.
413
414 - `string`
415
416 - `float64`
417
418 - `bool`
419
420 - `type ComparisonFilterValueArray []ComparisonFilterValueArrayItemUnion`
421
422 - `string`
423
424 - `float64`
425
426### Compound Filter
427
428- `type CompoundFilter struct{…}`
429
430 Combine multiple filters using `and` or `or`.
431
432 - `Filters []ComparisonFilter`
433
434 Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`.
435
436 - `type ComparisonFilter struct{…}`
437
438 A filter used to compare a specified attribute key to a given value using a defined comparison operation.
439
440 - `Key string`
441
442 The key to compare against the value.
443
444 - `Type ComparisonFilterType`
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 - `const ComparisonFilterTypeEq ComparisonFilterType = "eq"`
458
459 - `const ComparisonFilterTypeNe ComparisonFilterType = "ne"`
460
461 - `const ComparisonFilterTypeGt ComparisonFilterType = "gt"`
462
463 - `const ComparisonFilterTypeGte ComparisonFilterType = "gte"`
464
465 - `const ComparisonFilterTypeLt ComparisonFilterType = "lt"`
466
467 - `const ComparisonFilterTypeLte ComparisonFilterType = "lte"`
468
469 - `const ComparisonFilterTypeIn ComparisonFilterType = "in"`
470
471 - `const ComparisonFilterTypeNin ComparisonFilterType = "nin"`
472
473 - `Value ComparisonFilterValueUnion`
474
475 The value to compare against the attribute key; supports string, number, or boolean types.
476
477 - `string`
478
479 - `float64`
480
481 - `bool`
482
483 - `type ComparisonFilterValueArray []ComparisonFilterValueArrayItemUnion`
484
485 - `string`
486
487 - `float64`
488
489 - `Type CompoundFilterType`
490
491 Type of operation: `and` or `or`.
492
493 - `const CompoundFilterTypeAnd CompoundFilterType = "and"`
494
495 - `const CompoundFilterTypeOr CompoundFilterType = "or"`
496
497### Custom Tool Input Format
498
499- `type CustomToolInputFormatUnion interface{…}`
500
501 The input format for the custom tool. Default is unconstrained text.
502
503 - `type CustomToolInputFormatText struct{…}`
504
505 Unconstrained free-form text.
506
507 - `Type Text`
508
509 Unconstrained text format. Always `text`.
510
511 - `const TextText Text = "text"`
512
513 - `type CustomToolInputFormatGrammar struct{…}`
514
515 A grammar defined by the user.
516
517 - `Definition string`
518
519 The grammar definition.
520
521 - `Syntax string`
522
523 The syntax of the grammar definition. One of `lark` or `regex`.
524
525 - `const CustomToolInputFormatGrammarSyntaxLark CustomToolInputFormatGrammarSyntax = "lark"`
526
527 - `const CustomToolInputFormatGrammarSyntaxRegex CustomToolInputFormatGrammarSyntax = "regex"`
528
529 - `Type Grammar`
530
531 Grammar format. Always `grammar`.
532
533 - `const GrammarGrammar Grammar = "grammar"`
534
535### Error Object
536
537- `type ErrorObject struct{…}`
538
539 - `Code string`
540
541 - `Message string`
542
543 - `Param string`
544
545 - `Type string`
546
547### Function Definition
548
549- `type FunctionDefinition struct{…}`
550
551 - `Name string`
552
553 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.
554
555 - `Description string`
556
557 A description of what the function does, used by the model to choose when and how to call the function.
558
559 - `Parameters FunctionParameters`
560
561 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.
562
563 Omitting `parameters` defines a function with an empty parameter list.
564
565 - `Strict bool`
566
567 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).
568
569### Function Parameters
570
571- `type FunctionParameters map[string, any]`
572
573 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.
574
575 Omitting `parameters` defines a function with an empty parameter list.
576
577### Metadata
578
579- `type Metadata map[string, string]`
580
581 Set of 16 key-value pairs that can be attached to an object. This can be
582 useful for storing additional information about the object in a structured
583 format, and querying for objects via API or the dashboard.
584
585 Keys are strings with a maximum length of 64 characters. Values are strings
586 with a maximum length of 512 characters.
587
588### OAuth Error Code
589
590- `type OAuthErrorCode interface{…}`
591
592 - `type OAuthErrorCode string`
593
594 - `const OAuthErrorCodeInvalidGrant OAuthErrorCode = "invalid_grant"`
595
596 - `const OAuthErrorCodeInvalidSubjectToken OAuthErrorCode = "invalid_subject_token"`
597
598 - `string`
599
600### Reasoning
601
602- `type Reasoning struct{…}`
603
604 **gpt-5 and o-series models only**
605
606 Configuration options for
607 [reasoning models](https://platform.openai.com/docs/guides/reasoning).
608
609 - `Context ReasoningContext`
610
611 Controls which reasoning items are rendered back to the model on later turns.
612 If omitted or set to `auto`, the model determines the context mode. The
613 `gpt-5.6` model family defaults to `all_turns`; earlier models default to
614 `current_turn`.
615
616 When returned on a response, this is the effective reasoning context mode
617 used for the response.
618
619 - `const ReasoningContextAuto ReasoningContext = "auto"`
620
621 - `const ReasoningContextCurrentTurn ReasoningContext = "current_turn"`
622
623 - `const ReasoningContextAllTurns ReasoningContext = "all_turns"`
624
625 - `Effort ReasoningEffort`
626
627 Constrains effort on reasoning for reasoning models. Currently supported
628 values are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`.
629 Reducing reasoning effort can result in faster responses and fewer tokens
630 used on reasoning in a response. Not all reasoning models support every
631 value. See the
632 [reasoning guide](https://platform.openai.com/docs/guides/reasoning)
633 for model-specific support.
634
635 - `const ReasoningEffortNone ReasoningEffort = "none"`
636
637 - `const ReasoningEffortMinimal ReasoningEffort = "minimal"`
638
639 - `const ReasoningEffortLow ReasoningEffort = "low"`
640
641 - `const ReasoningEffortMedium ReasoningEffort = "medium"`
642
643 - `const ReasoningEffortHigh ReasoningEffort = "high"`
644
645 - `const ReasoningEffortXhigh ReasoningEffort = "xhigh"`
646
647 - `const ReasoningEffortMax ReasoningEffort = "max"`
648
649 - `GenerateSummary ReasoningGenerateSummary`
650
651 **Deprecated:** use `summary` instead.
652
653 A summary of the reasoning performed by the model. This can be
654 useful for debugging and understanding the model's reasoning process.
655 One of `auto`, `concise`, or `detailed`.
656
657 - `const ReasoningGenerateSummaryAuto ReasoningGenerateSummary = "auto"`
658
659 - `const ReasoningGenerateSummaryConcise ReasoningGenerateSummary = "concise"`
660
661 - `const ReasoningGenerateSummaryDetailed ReasoningGenerateSummary = "detailed"`
662
663 - `Mode ReasoningMode`
664
665 Controls the reasoning execution mode for the request.
666
667 When returned on a response, this is the effective execution mode.
668
669 - `string`
670
671 - `type ReasoningMode string`
672
673 Controls the reasoning execution mode for the request.
674
675 When returned on a response, this is the effective execution mode.
676
677 - `const ReasoningModeStandard ReasoningMode = "standard"`
678
679 - `const ReasoningModePro ReasoningMode = "pro"`
680
681 - `Summary ReasoningSummary`
682
683 A summary of the reasoning performed by the model. This can be
684 useful for debugging and understanding the model's reasoning process.
685 One of `auto`, `concise`, or `detailed`.
686
687 `concise` is supported for `computer-use-preview` models and all reasoning models after `gpt-5`.
688
689 - `const ReasoningSummaryAuto ReasoningSummary = "auto"`
690
691 - `const ReasoningSummaryConcise ReasoningSummary = "concise"`
692
693 - `const ReasoningSummaryDetailed ReasoningSummary = "detailed"`
694
695### Reasoning Effort
696
697- `type ReasoningEffort string`
698
699 Constrains effort on reasoning for reasoning models. Currently supported
700 values are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`.
701 Reducing reasoning effort can result in faster responses and fewer tokens
702 used on reasoning in a response. Not all reasoning models support every
703 value. See the
704 [reasoning guide](https://platform.openai.com/docs/guides/reasoning)
705 for model-specific support.
706
707 - `const ReasoningEffortNone ReasoningEffort = "none"`
708
709 - `const ReasoningEffortMinimal ReasoningEffort = "minimal"`
710
711 - `const ReasoningEffortLow ReasoningEffort = "low"`
712
713 - `const ReasoningEffortMedium ReasoningEffort = "medium"`
714
715 - `const ReasoningEffortHigh ReasoningEffort = "high"`
716
717 - `const ReasoningEffortXhigh ReasoningEffort = "xhigh"`
718
719 - `const ReasoningEffortMax ReasoningEffort = "max"`
720
721### Response Format JSON Object
722
723- `type ResponseFormatJSONObject struct{…}`
724
725 JSON object response format. An older method of generating JSON responses.
726 Using `json_schema` is recommended for models that support it. Note that the
727 model will not generate JSON without a system or user message instructing it
728 to do so.
729
730 - `Type JSONObject`
731
732 The type of response format being defined. Always `json_object`.
733
734 - `const JSONObjectJSONObject JSONObject = "json_object"`
735
736### Response Format JSON Schema
737
738- `type ResponseFormatJSONSchema struct{…}`
739
740 JSON Schema response format. Used to generate structured JSON responses.
741 Learn more about [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs).
742
743 - `JSONSchema ResponseFormatJSONSchemaJSONSchema`
744
745 Structured Outputs configuration options, including a JSON Schema.
746
747 - `Name string`
748
749 The name of the response format. Must be a-z, A-Z, 0-9, or contain
750 underscores and dashes, with a maximum length of 64.
751
752 - `Description string`
753
754 A description of what the response format is for, used by the model to
755 determine how to respond in the format.
756
757 - `Schema map[string, any]`
758
759 The schema for the response format, described as a JSON Schema object.
760 Learn how to build JSON schemas [here](https://json-schema.org/).
761
762 - `Strict bool`
763
764 Whether to enable strict schema adherence when generating the output.
765 If set to true, the model will always follow the exact schema defined
766 in the `schema` field. Only a subset of JSON Schema is supported when
767 `strict` is `true`. To learn more, read the [Structured Outputs
768 guide](https://platform.openai.com/docs/guides/structured-outputs).
769
770 - `Type JSONSchema`
771
772 The type of response format being defined. Always `json_schema`.
773
774 - `const JSONSchemaJSONSchema JSONSchema = "json_schema"`
775
776### Response Format Text
777
778- `type ResponseFormatText struct{…}`
779
780 Default response format. Used to generate text responses.
781
782 - `Type Text`
783
784 The type of response format being defined. Always `text`.
785
786 - `const TextText Text = "text"`
787
788### Response Format Text Grammar
789
790- `type ResponseFormatTextGrammar struct{…}`
791
792 A custom grammar for the model to follow when generating text.
793 Learn more in the [custom grammars guide](https://platform.openai.com/docs/guides/custom-grammars).
794
795 - `Grammar string`
796
797 The custom grammar for the model to follow.
798
799 - `Type Grammar`
800
801 The type of response format being defined. Always `grammar`.
802
803 - `const GrammarGrammar Grammar = "grammar"`
804
805### Response Format Text Python
806
807- `type ResponseFormatTextPython struct{…}`
808
809 Configure the model to generate valid Python code. See the
810 [custom grammars guide](https://platform.openai.com/docs/guides/custom-grammars) for more details.
811
812 - `Type Python`
813
814 The type of response format being defined. Always `python`.
815
816 - `const PythonPython Python = "python"`
817
818### Responses Model
819
820- `type ResponsesModel interface{…}`
821
822 - `string`
823
824 - `type ChatModel string`
825
826 - `const ChatModelGPT5_6Sol ChatModel = "gpt-5.6-sol"`
827
828 - `const ChatModelGPT5_6Terra ChatModel = "gpt-5.6-terra"`
829
830 - `const ChatModelGPT5_6Luna ChatModel = "gpt-5.6-luna"`
831
832 - `const ChatModelGPT5_4 ChatModel = "gpt-5.4"`
833
834 - `const ChatModelGPT5_4Mini ChatModel = "gpt-5.4-mini"`
835
836 - `const ChatModelGPT5_4Nano ChatModel = "gpt-5.4-nano"`
837
838 - `const ChatModelGPT5_4Mini2026_03_17 ChatModel = "gpt-5.4-mini-2026-03-17"`
839
840 - `const ChatModelGPT5_4Nano2026_03_17 ChatModel = "gpt-5.4-nano-2026-03-17"`
841
842 - `const ChatModelGPT5_3ChatLatest ChatModel = "gpt-5.3-chat-latest"`
843
844 - `const ChatModelGPT5_2 ChatModel = "gpt-5.2"`
845
846 - `const ChatModelGPT5_2_2025_12_11 ChatModel = "gpt-5.2-2025-12-11"`
847
848 - `const ChatModelGPT5_2ChatLatest ChatModel = "gpt-5.2-chat-latest"`
849
850 - `const ChatModelGPT5_2Pro ChatModel = "gpt-5.2-pro"`
851
852 - `const ChatModelGPT5_2Pro2025_12_11 ChatModel = "gpt-5.2-pro-2025-12-11"`
853
854 - `const ChatModelGPT5_1 ChatModel = "gpt-5.1"`
855
856 - `const ChatModelGPT5_1_2025_11_13 ChatModel = "gpt-5.1-2025-11-13"`
857
858 - `const ChatModelGPT5_1Codex ChatModel = "gpt-5.1-codex"`
859
860 - `const ChatModelGPT5_1Mini ChatModel = "gpt-5.1-mini"`
861
862 - `const ChatModelGPT5_1ChatLatest ChatModel = "gpt-5.1-chat-latest"`
863
864 - `const ChatModelGPT5 ChatModel = "gpt-5"`
865
866 - `const ChatModelGPT5Mini ChatModel = "gpt-5-mini"`
867
868 - `const ChatModelGPT5Nano ChatModel = "gpt-5-nano"`
869
870 - `const ChatModelGPT5_2025_08_07 ChatModel = "gpt-5-2025-08-07"`
871
872 - `const ChatModelGPT5Mini2025_08_07 ChatModel = "gpt-5-mini-2025-08-07"`
873
874 - `const ChatModelGPT5Nano2025_08_07 ChatModel = "gpt-5-nano-2025-08-07"`
875
876 - `const ChatModelGPT5ChatLatest ChatModel = "gpt-5-chat-latest"`
877
878 - `const ChatModelGPT4_1 ChatModel = "gpt-4.1"`
879
880 - `const ChatModelGPT4_1Mini ChatModel = "gpt-4.1-mini"`
881
882 - `const ChatModelGPT4_1Nano ChatModel = "gpt-4.1-nano"`
883
884 - `const ChatModelGPT4_1_2025_04_14 ChatModel = "gpt-4.1-2025-04-14"`
885
886 - `const ChatModelGPT4_1Mini2025_04_14 ChatModel = "gpt-4.1-mini-2025-04-14"`
887
888 - `const ChatModelGPT4_1Nano2025_04_14 ChatModel = "gpt-4.1-nano-2025-04-14"`
889
890 - `const ChatModelO4Mini ChatModel = "o4-mini"`
891
892 - `const ChatModelO4Mini2025_04_16 ChatModel = "o4-mini-2025-04-16"`
893
894 - `const ChatModelO3 ChatModel = "o3"`
895
896 - `const ChatModelO3_2025_04_16 ChatModel = "o3-2025-04-16"`
897
898 - `const ChatModelO3Mini ChatModel = "o3-mini"`
899
900 - `const ChatModelO3Mini2025_01_31 ChatModel = "o3-mini-2025-01-31"`
901
902 - `const ChatModelO1 ChatModel = "o1"`
903
904 - `const ChatModelO1_2024_12_17 ChatModel = "o1-2024-12-17"`
905
906 - `const ChatModelO1Preview ChatModel = "o1-preview"`
907
908 - `const ChatModelO1Preview2024_09_12 ChatModel = "o1-preview-2024-09-12"`
909
910 - `const ChatModelO1Mini ChatModel = "o1-mini"`
911
912 - `const ChatModelO1Mini2024_09_12 ChatModel = "o1-mini-2024-09-12"`
913
914 - `const ChatModelGPT4o ChatModel = "gpt-4o"`
915
916 - `const ChatModelGPT4o2024_11_20 ChatModel = "gpt-4o-2024-11-20"`
917
918 - `const ChatModelGPT4o2024_08_06 ChatModel = "gpt-4o-2024-08-06"`
919
920 - `const ChatModelGPT4o2024_05_13 ChatModel = "gpt-4o-2024-05-13"`
921
922 - `const ChatModelGPT4oAudioPreview ChatModel = "gpt-4o-audio-preview"`
923
924 - `const ChatModelGPT4oAudioPreview2024_10_01 ChatModel = "gpt-4o-audio-preview-2024-10-01"`
925
926 - `const ChatModelGPT4oAudioPreview2024_12_17 ChatModel = "gpt-4o-audio-preview-2024-12-17"`
927
928 - `const ChatModelGPT4oAudioPreview2025_06_03 ChatModel = "gpt-4o-audio-preview-2025-06-03"`
929
930 - `const ChatModelGPT4oMiniAudioPreview ChatModel = "gpt-4o-mini-audio-preview"`
931
932 - `const ChatModelGPT4oMiniAudioPreview2024_12_17 ChatModel = "gpt-4o-mini-audio-preview-2024-12-17"`
933
934 - `const ChatModelGPT4oSearchPreview ChatModel = "gpt-4o-search-preview"`
935
936 - `const ChatModelGPT4oMiniSearchPreview ChatModel = "gpt-4o-mini-search-preview"`
937
938 - `const ChatModelGPT4oSearchPreview2025_03_11 ChatModel = "gpt-4o-search-preview-2025-03-11"`
939
940 - `const ChatModelGPT4oMiniSearchPreview2025_03_11 ChatModel = "gpt-4o-mini-search-preview-2025-03-11"`
941
942 - `const ChatModelChatgpt4oLatest ChatModel = "chatgpt-4o-latest"`
943
944 - `const ChatModelCodexMiniLatest ChatModel = "codex-mini-latest"`
945
946 - `const ChatModelGPT4oMini ChatModel = "gpt-4o-mini"`
947
948 - `const ChatModelGPT4oMini2024_07_18 ChatModel = "gpt-4o-mini-2024-07-18"`
949
950 - `const ChatModelGPT4Turbo ChatModel = "gpt-4-turbo"`
951
952 - `const ChatModelGPT4Turbo2024_04_09 ChatModel = "gpt-4-turbo-2024-04-09"`
953
954 - `const ChatModelGPT4_0125Preview ChatModel = "gpt-4-0125-preview"`
955
956 - `const ChatModelGPT4TurboPreview ChatModel = "gpt-4-turbo-preview"`
957
958 - `const ChatModelGPT4_1106Preview ChatModel = "gpt-4-1106-preview"`
959
960 - `const ChatModelGPT4VisionPreview ChatModel = "gpt-4-vision-preview"`
961
962 - `const ChatModelGPT4 ChatModel = "gpt-4"`
963
964 - `const ChatModelGPT4_0314 ChatModel = "gpt-4-0314"`
965
966 - `const ChatModelGPT4_0613 ChatModel = "gpt-4-0613"`
967
968 - `const ChatModelGPT4_32k ChatModel = "gpt-4-32k"`
969
970 - `const ChatModelGPT4_32k0314 ChatModel = "gpt-4-32k-0314"`
971
972 - `const ChatModelGPT4_32k0613 ChatModel = "gpt-4-32k-0613"`
973
974 - `const ChatModelGPT3_5Turbo ChatModel = "gpt-3.5-turbo"`
975
976 - `const ChatModelGPT3_5Turbo16k ChatModel = "gpt-3.5-turbo-16k"`
977
978 - `const ChatModelGPT3_5Turbo0301 ChatModel = "gpt-3.5-turbo-0301"`
979
980 - `const ChatModelGPT3_5Turbo0613 ChatModel = "gpt-3.5-turbo-0613"`
981
982 - `const ChatModelGPT3_5Turbo1106 ChatModel = "gpt-3.5-turbo-1106"`
983
984 - `const ChatModelGPT3_5Turbo0125 ChatModel = "gpt-3.5-turbo-0125"`
985
986 - `const ChatModelGPT3_5Turbo16k0613 ChatModel = "gpt-3.5-turbo-16k-0613"`
987
988 - `type ResponsesModel string`
989
990 - `const ResponsesModelO1Pro ResponsesModel = "o1-pro"`
991
992 - `const ResponsesModelO1Pro2025_03_19 ResponsesModel = "o1-pro-2025-03-19"`
993
994 - `const ResponsesModelO3Pro ResponsesModel = "o3-pro"`
995
996 - `const ResponsesModelO3Pro2025_06_10 ResponsesModel = "o3-pro-2025-06-10"`
997
998 - `const ResponsesModelO3DeepResearch ResponsesModel = "o3-deep-research"`
999
1000 - `const ResponsesModelO3DeepResearch2025_06_26 ResponsesModel = "o3-deep-research-2025-06-26"`
1001
1002 - `const ResponsesModelO4MiniDeepResearch ResponsesModel = "o4-mini-deep-research"`
1003
1004 - `const ResponsesModelO4MiniDeepResearch2025_06_26 ResponsesModel = "o4-mini-deep-research-2025-06-26"`
1005
1006 - `const ResponsesModelComputerUsePreview ResponsesModel = "computer-use-preview"`
1007
1008 - `const ResponsesModelComputerUsePreview2025_03_11 ResponsesModel = "computer-use-preview-2025-03-11"`
1009
1010 - `const ResponsesModelGPT5Codex ResponsesModel = "gpt-5-codex"`
1011
1012 - `const ResponsesModelGPT5Pro ResponsesModel = "gpt-5-pro"`
1013
1014 - `const ResponsesModelGPT5Pro2025_10_06 ResponsesModel = "gpt-5-pro-2025-10-06"`
1015
1016 - `const ResponsesModelGPT5_1CodexMax ResponsesModel = "gpt-5.1-codex-max"`