Changesets · Branches · Tags · Compare
| Changeset | cb66032ac113744fe9957c2662dd36d2f5198ab9bb00dcd0c13c71ffe668d897 |
|---|---|
| Author | Nate Sesti <33237525+sestinj@users.noreply.github.com> · 2025-05-25 22:20 -07:00 |
| Committer | GitHub <noreply@github.com> · 2025-05-25 22:20 -07:00 |
| Parents | 0ac707eac642, 1db4eaf4c0a7 |
5 files changed
modified core/llm/llms/Vllm.ts +4 −0
| @@ -12,6 +12,10 @@ | ||
| 12 | 12 | } |
| 13 | 13 | } |
| 14 | 14 | |
| 15 | + supportsFim(): boolean { | |
| 16 | + return false; | |
| 17 | + } | |
| 18 | + | |
| 15 | 19 | private _setupCompletionOptions() { |
| 16 | 20 | this.fetch(this._getEndpoint("models"), { |
| 17 | 21 | method: "GET", |
modified core/llm/llms/stubs/ContinueProxy.ts +4 −0
| @@ -89,6 +89,10 @@ | ||
| 89 | 89 | } |
| 90 | 90 | |
| 91 | 91 | supportsFim(): boolean { |
| 92 | + const { provider } = parseProxyModelName(this.model); | |
| 93 | + if (provider === "vllm") { | |
| 94 | + return false; | |
| 95 | + } | |
| 92 | 96 | return true; |
| 93 | 97 | } |
| 94 | 98 |
added core/llm/llms/test/supportsFim.test.ts +55 −0
| @@ -0,0 +1,55 @@ | ||
| 1 | +import { jest } from "@jest/globals"; | |
| 2 | +import Anthropic from "../Anthropic.js"; | |
| 3 | +import Deepseek from "../Deepseek.js"; | |
| 4 | +import FunctionNetwork from "../FunctionNetwork.js"; | |
| 5 | +import Mistral from "../Mistral.js"; | |
| 6 | +import OpenAI from "../OpenAI.js"; | |
| 7 | +import ContinueProxy from "../stubs/ContinueProxy.js"; | |
| 8 | +import Vllm from "../Vllm.js"; | |
| 9 | + | |
| 10 | +// Mock the parseProxyModelName function | |
| 11 | +const mockParseProxyModelName = jest.fn(); | |
| 12 | +jest.mock("@continuedev/config-yaml", () => ({ | |
| 13 | + parseProxyModelName: mockParseProxyModelName, | |
| 14 | + decodeSecretLocation: jest.fn(), | |
| 15 | + SecretType: { NotFound: "not-found" }, | |
| 16 | +})); | |
| 17 | + | |
| 18 | +// Test cases: [LLM class, model, expected supportsFim result, description] | |
| 19 | +const testCases: [any, string, boolean, string][] = [ | |
| 20 | + [ContinueProxy, "owner/package/vllm/some-model", false, "vllm provider"], | |
| 21 | + [ContinueProxy, "owner/package/openai/gpt-4", true, "openai provider"], | |
| 22 | + [ | |
| 23 | + ContinueProxy, | |
| 24 | + "owner/package/anthropic/claude-3", | |
| 25 | + true, | |
| 26 | + "anthropic provider", | |
| 27 | + ], | |
| 28 | + [ContinueProxy, "owner/package/cohere/command-r", true, "cohere provider"], | |
| 29 | + [ | |
| 30 | + ContinueProxy, | |
| 31 | + "owner/package/unknown-provider/some-model", | |
| 32 | + true, | |
| 33 | + "unknown provider", | |
| 34 | + ], | |
| 35 | + [ContinueProxy, "owner/package/groq/llama-model", true, "groq provider"], | |
| 36 | + [Vllm, "any-model", false, "Vllm"], | |
| 37 | + [Anthropic, "claude-3-5-sonnet-latest", false, "Anthropic"], | |
| 38 | + [FunctionNetwork, "any-model", false, "FunctionNetwork"], | |
| 39 | + [OpenAI, "codestral", false, "OpenAI"], | |
| 40 | + [Mistral, "codestral", true, "Mistral"], | |
| 41 | + [Deepseek, "deepseek-chat", true, "Deepseek"], | |
| 42 | +]; | |
| 43 | + | |
| 44 | +testCases.forEach(([LLMClass, model, expectedResult, description]) => { | |
| 45 | + test(`supportsFim returns ${expectedResult} for ${description}`, () => { | |
| 46 | + const llm = new LLMClass({ | |
| 47 | + model, | |
| 48 | + apiKey: "test-key", | |
| 49 | + }); | |
| 50 | + | |
| 51 | + const result = llm.supportsFim(); | |
| 52 | + | |
| 53 | + expect(result).toBe(expectedResult); | |
| 54 | + }); | |
| 55 | +}); |
modified core/llm/toolSupport.ts +4 −3
| @@ -18,7 +18,7 @@ | ||
| 18 | 18 | "claude-3.5", |
| 19 | 19 | "claude-3-7", |
| 20 | 20 | "claude-3.7", |
| 21 | - "claude-4", | |
| 21 | + "claude-sonnet-4", | |
| 22 | 22 | "gpt-4", |
| 23 | 23 | "o3", |
| 24 | 24 | "gemini", |
| @@ -31,7 +31,7 @@ | ||
| 31 | 31 | "claude-3.5", |
| 32 | 32 | "claude-3-7", |
| 33 | 33 | "claude-3.7", |
| 34 | - "claude-4", | |
| 34 | + "claude-sonnet-4", | |
| 35 | 35 | ].some((part) => model.toLowerCase().startsWith(part)) |
| 36 | 36 | ) { |
| 37 | 37 | return true; |
| @@ -91,7 +91,7 @@ | ||
| 91 | 91 | "claude-3.5", |
| 92 | 92 | "claude-3-7", |
| 93 | 93 | "claude-3.7", |
| 94 | - "claude-4", | |
| 94 | + "claude-sonnet-4", | |
| 95 | 95 | ].some((part) => model.toLowerCase().includes(part)) |
| 96 | 96 | ) { |
| 97 | 97 | return true; |
| @@ -104,6 +104,7 @@ | ||
| 104 | 104 | return ( |
| 105 | 105 | !model.toLowerCase().includes("mamba") && |
| 106 | 106 | [ |
| 107 | + "devstral", | |
| 107 | 108 | "codestral", |
| 108 | 109 | "mistral-large", |
| 109 | 110 | "mistral-small", |
modified extensions/vscode/package.json +1 −1
| @@ -2,7 +2,7 @@ | ||
| 2 | 2 | "name": "continue", |
| 3 | 3 | "icon": "media/icon.png", |
| 4 | 4 | "author": "Continue Dev, Inc", |
| 5 | - "version": "1.1.39", | |
| 5 | + "version": "1.1.40", | |
| 6 | 6 | "repository": { |
| 7 | 7 | "type": "git", |
| 8 | 8 | "url": "https://github.com/continuedev/continue" |