mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-09-08 22:21:23 +00:00
feat: add supportsNativeTools toggle to OpenAI-compatible custom model info
This allows users to disable native tool calling for OpenAI-compatible models that do not properly support the OpenAI function calling format. Users can now set supportsNativeTools: false in the custom model info settings to fall back to XML-based tool definitions. Closes #10477
This commit is contained in:
parent
6b13d1d84e
commit
759fc5d9a7
2 changed files with 30 additions and 0 deletions
|
|
@ -420,6 +420,32 @@ export const OpenAICompatible = ({
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div className="flex items-center gap-1">
|
||||
<Checkbox
|
||||
checked={apiConfiguration?.openAiCustomModelInfo?.supportsNativeTools ?? true}
|
||||
onChange={handleInputChange("openAiCustomModelInfo", (checked) => {
|
||||
return {
|
||||
...(apiConfiguration?.openAiCustomModelInfo || openAiModelInfoSaneDefaults),
|
||||
supportsNativeTools: checked,
|
||||
}
|
||||
})}>
|
||||
<span className="font-medium">
|
||||
{t("settings:providers.customModel.nativeToolCalling.label")}
|
||||
</span>
|
||||
</Checkbox>
|
||||
<StandardTooltip content={t("settings:providers.customModel.nativeToolCalling.description")}>
|
||||
<i
|
||||
className="codicon codicon-info text-vscode-descriptionForeground"
|
||||
style={{ fontSize: "12px" }}
|
||||
/>
|
||||
</StandardTooltip>
|
||||
</div>
|
||||
<div className="text-sm text-vscode-descriptionForeground pt-1">
|
||||
{t("settings:providers.customModel.nativeToolCalling.description")}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<VSCodeTextField
|
||||
value={
|
||||
|
|
|
|||
|
|
@ -475,6 +475,10 @@
|
|||
"label": "Prompt Caching",
|
||||
"description": "Is this model capable of caching prompts?"
|
||||
},
|
||||
"nativeToolCalling": {
|
||||
"label": "Native Tool Calling",
|
||||
"description": "Enable OpenAI-style function calling for this model. Disable if the model does not support native tool calling and falls back to XML-based tool definitions."
|
||||
},
|
||||
"pricing": {
|
||||
"input": {
|
||||
"label": "Input Price",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue