Merge pull request #4451 from continuedev/dallin/proxy-tool-support

tools support for "continue-proxy" provider
This commit is contained in:
Dallin Romney 2025-03-04 11:20:09 -08:00 • committed by GitHub
commit 71eb67d2ab
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -3,9 +3,24 @@ export const PROVIDER_TOOL_SUPPORT: Record<
(model: string) => boolean | undefined
> = {
"continue-proxy": (model) => {
return ["claude-3-5", "claude-3.5", "claude-3-7", "claude-3.7", "gpt-4", "o3", "gemini"].some((part) =>
model.toLowerCase().startsWith(part),
);
// see getContinueProxyModelName
const provider = model.split("/")[2];
const _model = model.split("/")[3];
if (provider && _model && provider !== "continue-proxy") {
const fn = PROVIDER_TOOL_SUPPORT[provider];
if (fn) {
return fn(_model);
}
}
return [
"claude-3-5",
"claude-3.5",
"claude-3-7",
"claude-3.7",
"gpt-4",
"o3",
"gemini",
].some((part) => model.toLowerCase().startsWith(part));
},
anthropic: (model) => {
if (