Docs
CodeRabbit
Cloudflare
Railway
Clerk
SerpAPI
OpenRouter
Netlify
AG Grid
WorkOS
Unkey
Prisma
Sentry
Electric
CodeRabbit
Cloudflare
Railway
Clerk
SerpAPI
OpenRouter
Netlify
AG Grid
WorkOS
Unkey
Prisma
Sentry
Electric
Class References
Function References
Interface References
Type Alias References
Variable References

brandProviderTool

Function: brandProviderTool()

ts
function brandProviderTool<T>(tool): T;
function brandProviderTool<T>(tool): T;

Defined in: packages/ai/src/tools/provider-tool.ts:35

Attach the phantom brand to a plain -shaped object.

The brand fields (, ) exist only in the type system and are never assigned at runtime, so this is a single audited type-only assertion. Use it inside adapter factories instead of — the cast collapses to one named site.

Type Parameters

T

extends <, >

Parameters

tool

<, | >

Returns