diff --git a/.changeset/purple-oranges-eat.md b/.changeset/purple-oranges-eat.md new file mode 100644 index 00000000000..83793a5c9bc --- /dev/null +++ b/.changeset/purple-oranges-eat.md @@ -0,0 +1,5 @@ +--- +"roo-cline": patch +--- + +v3.11.16 diff --git a/src/api/providers/__tests__/openai-native.test.ts b/src/api/providers/__tests__/openai-native.test.ts index eda744c335c..5b60d46c368 100644 --- a/src/api/providers/__tests__/openai-native.test.ts +++ b/src/api/providers/__tests__/openai-native.test.ts @@ -76,7 +76,7 @@ describe("OpenAiNativeHandler", () => { beforeEach(() => { mockOptions = { - apiModelId: "gpt-4o", + apiModelId: "gpt-4.1", openAiNativeApiKey: "test-api-key", } handler = new OpenAiNativeHandler(mockOptions) @@ -91,7 +91,7 @@ describe("OpenAiNativeHandler", () => { it("should initialize with empty API key", () => { const handlerWithoutKey = new OpenAiNativeHandler({ - apiModelId: "gpt-4o", + apiModelId: "gpt-4.1", openAiNativeApiKey: "", }) expect(handlerWithoutKey).toBeInstanceOf(OpenAiNativeHandler) @@ -196,7 +196,7 @@ describe("OpenAiNativeHandler", () => { beforeEach(() => { handler = new OpenAiNativeHandler({ ...mockOptions, - apiModelId: "gpt-4o", + apiModelId: "gpt-4.1", }) }) @@ -229,7 +229,7 @@ describe("OpenAiNativeHandler", () => { ]) expect(mockCreate).toHaveBeenCalledWith({ - model: "gpt-4o", + model: "gpt-4.1", temperature: 0, messages: [ { role: "system", content: systemPrompt }, @@ -269,11 +269,11 @@ describe("OpenAiNativeHandler", () => { }) describe("completePrompt", () => { - it("should complete prompt successfully with gpt-4o model", async () => { + it("should complete prompt successfully with gpt-4.1 model", async () => { const result = await handler.completePrompt("Test prompt") expect(result).toBe("Test response") expect(mockCreate).toHaveBeenCalledWith({ - model: "gpt-4o", + model: "gpt-4.1", messages: [{ role: "user", content: "Test prompt" }], temperature: 0, }) @@ -357,8 +357,8 @@ describe("OpenAiNativeHandler", () => { const modelInfo = handler.getModel() expect(modelInfo.id).toBe(mockOptions.apiModelId) expect(modelInfo.info).toBeDefined() - expect(modelInfo.info.maxTokens).toBe(16384) - expect(modelInfo.info.contextWindow).toBe(128_000) + expect(modelInfo.info.maxTokens).toBe(32768) + expect(modelInfo.info.contextWindow).toBe(1047576) }) it("should handle undefined model ID", () => { @@ -366,7 +366,7 @@ describe("OpenAiNativeHandler", () => { openAiNativeApiKey: "test-api-key", }) const modelInfo = handlerWithoutModel.getModel() - expect(modelInfo.id).toBe("gpt-4o") // Default model + expect(modelInfo.id).toBe("gpt-4.1") // Default model expect(modelInfo.info).toBeDefined() }) })