Merge pull request #4451 from continuedev/dallin/proxy-tool-support
tools support for "continue-proxy" provider
This commit is contained in:
commit
71eb67d2ab
1 changed files with 18 additions and 3 deletions
|
|
@ -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 (
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue