fix: detect Claude format for /v1/messages + sanitize tool descriptions (#397)
This commit is contained in:
@@ -138,7 +138,7 @@ export function openaiResponsesToOpenAIRequest(model, body, stream, credentials)
|
||||
type: "function",
|
||||
function: {
|
||||
name,
|
||||
description: tool.description,
|
||||
description: String(tool.description || ""),
|
||||
parameters: tool.parameters,
|
||||
strict: tool.strict
|
||||
}
|
||||
@@ -259,7 +259,7 @@ export function openaiToOpenAIResponsesRequest(model, body, stream, credentials)
|
||||
return {
|
||||
type: "function",
|
||||
name: tool.function.name,
|
||||
description: tool.function.description,
|
||||
description: String(tool.function.description || ""),
|
||||
parameters: tool.function.parameters,
|
||||
strict: tool.function.strict
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user