fix: enforce Mistral tool call ids (#1372) (thanks @zerone0x)

This commit is contained in:
Peter Steinberger
2026-01-22 00:38:48 +00:00
parent d51eca64cc
commit 0704fe7dbb
13 changed files with 193 additions and 51 deletions

View File

@@ -33,7 +33,12 @@ export async function sanitizeSessionMessagesImages(
label: string,
options?: {
sanitizeToolCallIds?: boolean;
/** Mode for tool call ID sanitization: "standard" (default, preserves _-) or "strict" (alphanumeric only) */
/**
* Mode for tool call ID sanitization:
* - "standard" (default, preserves _-)
* - "strict" (alphanumeric only)
* - "strict9" (alphanumeric only, length 9)
*/
toolCallIdMode?: ToolCallIdMode;
enforceToolCallLast?: boolean;
preserveSignatures?: boolean;