Skip to content

Commit a2ddc7f

Browse files
authored
Merge pull request #5494 from continuedev/nate/gpt-series-edit
mark all gpt- and o-series models as chat only (not /v1/completions)
2 parents b84d89c + f224e58 commit a2ddc7f

File tree

2 files changed

+6
-22
lines changed

2 files changed

+6
-22
lines changed

core/llm/llms/OpenAI.ts

Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -31,26 +31,10 @@ const NON_CHAT_MODELS = [
3131
"ada",
3232
];
3333

34-
const CHAT_ONLY_MODELS = [
35-
"gpt-3.5-turbo",
36-
"gpt-3.5-turbo-0613",
37-
"gpt-3.5-turbo-16k",
38-
"gpt-4",
39-
"gpt-4-turbo",
40-
"gpt-4o",
41-
"gpt-35-turbo-16k",
42-
"gpt-35-turbo-0613",
43-
"gpt-35-turbo",
44-
"gpt-4-32k",
45-
"gpt-4-turbo-preview",
46-
"gpt-4-vision",
47-
"gpt-4-0125-preview",
48-
"gpt-4-1106-preview",
49-
"gpt-4o-mini",
50-
"o1-preview",
51-
"o1-mini",
52-
"o3-mini",
53-
];
34+
function isChatOnlyModel(model: string): boolean {
35+
// gpt and o-series models
36+
return model.startsWith("gpt") || model.startsWith("o");
37+
}
5438

5539
const formatMessageForO1 = (messages: ChatCompletionMessageParam[]) => {
5640
return messages?.map((message: any) => {
@@ -335,7 +319,7 @@ class OpenAI extends BaseLLM {
335319
options: CompletionOptions,
336320
): AsyncGenerator<ChatMessage> {
337321
if (
338-
!CHAT_ONLY_MODELS.includes(options.model) &&
322+
!isChatOnlyModel(options.model) &&
339323
this.supportsCompletions() &&
340324
(NON_CHAT_MODELS.includes(options.model) ||
341325
this.useLegacyCompletionsEndpoint ||

extensions/vscode/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "continue",
33
"icon": "media/icon.png",
44
"author": "Continue Dev, Inc",
5-
"version": "1.1.31",
5+
"version": "1.1.32",
66
"repository": {
77
"type": "git",
88
"url": "https://github.com/continuedev/continue"

0 commit comments

Comments
 (0)