0
Fork 0
mirror of https://github.com/TanStack/ai.git synced 2026-11-16 19:38:41 +00:00
ai/docs/reference/classes/DuplicateToolNameError.md
github-actions[bot] 0c0c54b92a
docs: regenerate API documentation (#1155)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-08-19 19:30:00 +02:00

1.3 KiB

id title
DuplicateToolNameError DuplicateToolNameError

Class: DuplicateToolNameError

Defined in: packages/ai/src/activities/chat/tools/unique-tool-names.ts:11

Thrown when chat({ tools }) (or a provider converter) receives two tools with the same public name.

The common case is a provider-native factory (webSearchTool()) next to an ordinary function that reused the reserved name (web_search). Providers reject that pair, so we fail before the request is built.

Extends

  • Error

Constructors

Constructor

new DuplicateToolNameError(toolName, message): DuplicateToolNameError;

Defined in: packages/ai/src/activities/chat/tools/unique-tool-names.ts:14

Parameters

toolName

string

message

string

Returns

DuplicateToolNameError

Overrides

Error.constructor

Properties

toolName

readonly toolName: string;

Defined in: packages/ai/src/activities/chat/tools/unique-tool-names.ts:12