mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-08-28 05:27:24 +00:00
Merge 226469dab2 into b867ec9145
This commit is contained in:
commit
f42e5c576d
1 changed files with 5 additions and 2 deletions
|
|
@ -224,12 +224,15 @@ export class OpenRouterHandler extends BaseProvider implements SingleCompletionH
|
|||
|
||||
// Convert Anthropic messages to OpenAI format.
|
||||
// Pass normalization function for Mistral compatibility (requires 9-char alphanumeric IDs)
|
||||
const isMistral = modelId.toLowerCase().includes("mistral")
|
||||
// Also detect Devstral models which are part of the Mistral family
|
||||
const isMistralFamily = modelId.toLowerCase().includes("mistral") || modelId.toLowerCase().includes("devstral")
|
||||
let openAiMessages: OpenAI.Chat.ChatCompletionMessageParam[] = [
|
||||
{ role: "system", content: systemPrompt },
|
||||
...convertToOpenAiMessages(
|
||||
messages,
|
||||
isMistral ? { normalizeToolCallId: normalizeMistralToolCallId } : undefined,
|
||||
isMistralFamily
|
||||
? { normalizeToolCallId: normalizeMistralToolCallId, mergeToolResultText: true }
|
||||
: undefined,
|
||||
),
|
||||
]
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue