Skip to content

AmazonBedrockToolIds

Namespace: Vercel.AI.AmazonBedrock

public static class AmazonBedrockToolIds

Mistral tool-call ids on Bedrock must be exactly nine alphanumeric characters.

Inheritance: object

View source

public static bool IsMistralModel(string modelId)

True when <code class=“paramref”>modelId</code> is a Mistral model, including region-prefixed ids.

Parameters

Name Type Description
modelId string

Returns: bool

View source

public static string Normalize(string toolCallId, bool isMistral)

Returns <code class=“paramref”>toolCallId</code> unchanged for other models. For Mistral, keeps a valid nine-character alphanumeric id and hashes any other id into one.

Parameters

Name Type Description
toolCallId string
isMistral bool

Returns: string

View source

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