Browse Source

Update AI.js

jelveh 1 month ago
parent
commit
590973f50d
1 changed files with 5 additions and 0 deletions
  1. 5 0
      src/puter-js/src/modules/AI.js

+ 5 - 0
src/puter-js/src/modules/AI.js

@@ -292,6 +292,11 @@ class AI{
             requestParams.model = 'deepseek-chat';
             requestParams.model = 'deepseek-chat';
         }
         }
 
 
+        // o1-mini to openrouter:openai/o1-mini
+        if ( requestParams.model === 'o1-mini' ) {
+            requestParams.model = 'openrouter:openai/o1-mini';
+        }
+
         // map model to the appropriate driver
         // map model to the appropriate driver
         if (!requestParams.model || requestParams.model === 'gpt-4o' || requestParams.model === 'gpt-4o-mini') {
         if (!requestParams.model || requestParams.model === 'gpt-4o' || requestParams.model === 'gpt-4o-mini') {
             driver = 'openai-completion';
             driver = 'openai-completion';