You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: specification/base/typespec/responses/models.tsp
+26-1Lines changed: 26 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -459,6 +459,7 @@ union ToolType {
459
459
file_search:"file_search",
460
460
function:"function",
461
461
computer_use_preview:"computer_use_preview",
462
+
web_search:"web_search",
462
463
web_search_preview:"web_search_preview",
463
464
mcp:"mcp",
464
465
code_interpreter:"code_interpreter",
@@ -613,7 +614,31 @@ model WebSearchPreviewTool extends Tool {
613
614
@doc("""
614
615
High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default.
615
616
""")
616
-
search_context_size?:"low" | "medium" | "high";
617
+
search_context_size?:SearchContextSize;
618
+
}
619
+
620
+
// Tool customization (apply_discriminator): Apply discriminated type base for tools
621
+
/** This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search). */
622
+
modelWebSearchToolextendsTool {
623
+
/** The type of the web search tool. One of `web_search` or `web_search_2025_08_26`. */
624
+
type:ToolType.web_search;
625
+
626
+
filters?:WebSearchToolFilters | null;
627
+
628
+
user_location?:Location | null;
629
+
630
+
/** High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default. */
631
+
search_context_size?:SearchContextSize;
632
+
}
633
+
634
+
enumSearchContextSize {
635
+
low,
636
+
medium,
637
+
high,
638
+
}
639
+
640
+
modelWebSearchToolFilters {
641
+
allowed_domains?:string[] | null;
617
642
}
618
643
619
644
// Tool customization: Establish a discriminated base for location approximation
0 commit comments