Skip to content

Commit b2a590b

Browse files
daniel-lxsPeterDaveHello
authored andcommitted
fix: enable native tool calls for Requesty provider (ROO-235) (RooCodeInc#10211)
1 parent a363bdc commit b2a590b

3 files changed

Lines changed: 6 additions & 2 deletions

File tree

src/api/providers/fetchers/requesty.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ export async function getRequestyModels(baseUrl?: string, apiKey?: string): Prom
3838
supportsImages: rawModel.supports_vision,
3939
supportsReasoningBudget: reasoningBudget,
4040
supportsReasoningEffort: reasoningEffort,
41+
supportsNativeTools: true,
42+
defaultToolProtocol: "native",
4143
inputPrice: parseApiPrice(rawModel.input_price),
4244
outputPrice: parseApiPrice(rawModel.output_price),
4345
description: rawModel.description,

src/api/providers/router-provider.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,9 @@ export abstract class RouterProvider extends BaseProvider {
6464
const id = this.modelId ?? this.defaultModelId
6565

6666
// First check instance models (populated by fetchModel)
67+
// Merge native tool defaults for cached models that may lack these fields
6768
if (this.models[id]) {
68-
return { id, info: this.models[id] }
69+
return { id, info: { ...NATIVE_TOOL_DEFAULTS, ...this.models[id] } }
6970
}
7071

7172
// Fall back to global cache (synchronous disk/memory cache)
@@ -74,7 +75,7 @@ export abstract class RouterProvider extends BaseProvider {
7475
if (cachedModels?.[id]) {
7576
// Also populate instance models for future calls
7677
this.models = cachedModels
77-
return { id, info: cachedModels[id] }
78+
return { id, info: { ...NATIVE_TOOL_DEFAULTS, ...cachedModels[id] } }
7879
}
7980

8081
// Last resort: return default model

webview-ui/src/components/ui/hooks/useSelectedModel.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ import {
3131
isDynamicProvider,
3232
isRetiredProvider,
3333
getProviderDefaultModelId,
34+
NATIVE_TOOL_DEFAULTS,
3435
} from "@roo-code/types"
3536

3637
import { useRouterModels } from "./useRouterModels"

0 commit comments

Comments
 (0)