File tree Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -289,6 +289,21 @@ describe("OpenAiNativeHandler", () => {
289289 } )
290290 } )
291291
292+ it ( "should complete prompt successfully with o3-mini model" , async ( ) => {
293+ handler = new OpenAiNativeHandler ( {
294+ apiModelId : "o3-mini" ,
295+ openAiNativeApiKey : "test-api-key" ,
296+ } )
297+
298+ const result = await handler . completePrompt ( "Test prompt" )
299+ expect ( result ) . toBe ( "Test response" )
300+ expect ( mockCreate ) . toHaveBeenCalledWith ( {
301+ model : "o3-mini" ,
302+ messages : [ { role : "user" , content : "Test prompt" } ] ,
303+ temperature : 0 ,
304+ } )
305+ } )
306+
292307 it ( "should handle API errors" , async ( ) => {
293308 mockCreate . mockRejectedValueOnce ( new Error ( "API Error" ) )
294309 await expect ( handler . completePrompt ( "Test prompt" ) ) . rejects . toThrow (
Original file line number Diff line number Diff line change @@ -510,6 +510,14 @@ export type OpenAiNativeModelId = keyof typeof openAiNativeModels
510510export const openAiNativeDefaultModelId : OpenAiNativeModelId = "gpt-4o"
511511export const openAiNativeModels = {
512512 // don't support tool use yet
513+ "o3-mini" : {
514+ maxTokens : 100_000 ,
515+ contextWindow : 200_000 ,
516+ supportsImages : false ,
517+ supportsPromptCache : false ,
518+ inputPrice : 1.1 ,
519+ outputPrice : 4.4 ,
520+ } ,
513521 o1 : {
514522 maxTokens : 100_000 ,
515523 contextWindow : 200_000 ,
You can’t perform that action at this time.
0 commit comments