Skip to content

OpenAIResponsesAllowedTools

Namespace: Vercel.AI.OpenAI

public sealed class OpenAIResponsesAllowedTools

The tools a request may call, sent as tool_choice: { type: "allowed_tools" }. Maps to the allowedTools option of the OpenAI Responses provider options.

Inheritance: object

View source

OpenAIResponsesAllowedTools(IReadOnlyList<string>, string?)

Section titled “OpenAIResponsesAllowedTools(IReadOnlyList<string>, string?)”
public OpenAIResponsesAllowedTools(IReadOnlyList<string> toolNames, string? mode = null)

Creates the allow-list.

Parameters

Name Type Description
toolNames IReadOnlyList<string> Names of the tools the model may call. Not empty.
mode string auto (default) or required.

View source

public string? Mode { get; }

auto or required. Null means auto.

Value: string

View source

public IReadOnlyList<string> ToolNames { get; }

Names of the tools the model may call.

Value: IReadOnlyList<string>

View source

Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product