mirror of
https://github.com/pacnpal/Roo-Code.git
synced 2025-12-20 12:21:13 -05:00
support o3-mini
This commit is contained in:
@@ -289,6 +289,20 @@ describe("OpenAiNativeHandler", () => {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
it("should complete prompt successfully with o3-mini model", async () => {
|
||||||
|
handler = new OpenAiNativeHandler({
|
||||||
|
apiModelId: "o3-mini",
|
||||||
|
openAiNativeApiKey: "test-api-key",
|
||||||
|
})
|
||||||
|
|
||||||
|
const result = await handler.completePrompt("Test prompt")
|
||||||
|
expect(result).toBe("Test response")
|
||||||
|
expect(mockCreate).toHaveBeenCalledWith({
|
||||||
|
model: "o3-mini",
|
||||||
|
messages: [{ role: "user", content: "Test prompt" }],
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
it("should handle API errors", async () => {
|
it("should handle API errors", async () => {
|
||||||
mockCreate.mockRejectedValueOnce(new Error("API Error"))
|
mockCreate.mockRejectedValueOnce(new Error("API Error"))
|
||||||
await expect(handler.completePrompt("Test prompt")).rejects.toThrow(
|
await expect(handler.completePrompt("Test prompt")).rejects.toThrow(
|
||||||
|
|||||||
@@ -510,6 +510,14 @@ export type OpenAiNativeModelId = keyof typeof openAiNativeModels
|
|||||||
export const openAiNativeDefaultModelId: OpenAiNativeModelId = "gpt-4o"
|
export const openAiNativeDefaultModelId: OpenAiNativeModelId = "gpt-4o"
|
||||||
export const openAiNativeModels = {
|
export const openAiNativeModels = {
|
||||||
// don't support tool use yet
|
// don't support tool use yet
|
||||||
|
"o3-mini": {
|
||||||
|
maxTokens: 100_000,
|
||||||
|
contextWindow: 200_000,
|
||||||
|
supportsImages: false,
|
||||||
|
supportsPromptCache: false,
|
||||||
|
inputPrice: 1.1,
|
||||||
|
outputPrice: 4.4,
|
||||||
|
},
|
||||||
o1: {
|
o1: {
|
||||||
maxTokens: 100_000,
|
maxTokens: 100_000,
|
||||||
contextWindow: 200_000,
|
contextWindow: 200_000,
|
||||||
|
|||||||
Reference in New Issue
Block a user