Indicates that the model should use a built-in tool to generate a response. Learn more about built-in tools.

interface ToolChoiceTypes {
    type:
        | "file_search"
        | "web_search_preview"
        | "web_search_preview_2025_03_11"
        | "computer_use_preview";
}

Properties

Properties

type:
    | "file_search"
    | "web_search_preview"
    | "web_search_preview_2025_03_11"
    | "computer_use_preview"

The type of hosted tool the model should to use. Learn more about built-in tools.

Allowed values are:

  • file_search
  • web_search_preview
  • computer_use_preview