fix: detect Claude format for /v1/messages + sanitize tool descriptions (#397)

This commit is contained in:
Ryan
2026-03-27 06:38:37 +03:00
committed by GitHub
parent 868eabffc0
commit 3b4184b09e
4 changed files with 8 additions and 5 deletions

View File

@@ -59,7 +59,7 @@ export function claudeToOpenAIRequest(model, body, stream) {
type: "function",
function: {
name: tool.name,
description: tool.description,
description: String(tool.description || ""),
parameters: tool.input_schema || { type: "object", properties: {} }
}
}));