Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion src/api/providers/openai.ts
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,14 @@ export class OpenAiHandler extends BaseProvider implements SingleCompletionHandl

override getModel() {
const id = this.options.openAiModelId ?? ""
const info = this.options.openAiCustomModelInfo ?? openAiModelInfoSaneDefaults
let info = this.options.openAiCustomModelInfo ?? openAiModelInfoSaneDefaults

// Gemini models don't support native OpenAI tool calling format when accessed via OpenAI Compatible endpoints
// They require XML-style tool calls instead
if (id.toLowerCase().includes("gemini")) {
info = { ...info, supportsNativeTools: false }
}
Comment on lines +319 to +323
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This new Gemini detection logic lacks test coverage. The fix should include tests verifying that models with 'gemini' in their ID (case-insensitive) have supportsNativeTools set to false, while other models are unaffected. This is especially important since the issue report indicates this is a regression from v3.33.0 to v3.33.1.

Fix it with Roo Code or mention @roomote and request a fix.


const params = getModelParams({ format: "openai", modelId: id, model: info, settings: this.options })
return { id, info, ...params }
}
Expand Down
Loading