Skip to content

Commit 71eb67d

Browse files
authored
Merge pull request continuedev#4451 from continuedev/dallin/proxy-tool-support
tools support for "continue-proxy" provider
2 parents 54c364d + 294c035 commit 71eb67d

File tree

1 file changed

+18
-3
lines changed

1 file changed

+18
-3
lines changed

core/llm/toolSupport.ts

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,24 @@ export const PROVIDER_TOOL_SUPPORT: Record<
33
(model: string) => boolean | undefined
44
> = {
55
"continue-proxy": (model) => {
6-
return ["claude-3-5", "claude-3.5", "claude-3-7", "claude-3.7", "gpt-4", "o3", "gemini"].some((part) =>
7-
model.toLowerCase().startsWith(part),
8-
);
6+
// see getContinueProxyModelName
7+
const provider = model.split("/")[2];
8+
const _model = model.split("/")[3];
9+
if (provider && _model && provider !== "continue-proxy") {
10+
const fn = PROVIDER_TOOL_SUPPORT[provider];
11+
if (fn) {
12+
return fn(_model);
13+
}
14+
}
15+
return [
16+
"claude-3-5",
17+
"claude-3.5",
18+
"claude-3-7",
19+
"claude-3.7",
20+
"gpt-4",
21+
"o3",
22+
"gemini",
23+
].some((part) => model.toLowerCase().startsWith(part));
924
},
1025
anthropic: (model) => {
1126
if (

0 commit comments

Comments
 (0)