Repository: ai-shifu/ChatALL (language: javascript)

Issue:
[FEAT] Add OpenAI o3 and o4-mini reasoning model via official API
Add OpenAI o3 & o4-mini reasoning models

Model IDs:
- o3
- o4-mini

Reference:
- https://platform.openai.com/docs/models/o3
- https://platform.openai.com/docs/models/o4-mini
- https://openai.com/index/introducing-o3-and-o4-mini/


Discussion / hints:
@sunner we need your help here, thanks.
![Image](https://github.com/user-attachments/assets/689244e3-3507-4fea-a1c8-1614bf051f2b)
![Image](https://github.com/user-attachments/assets/6e9baf57-363c-4da7-ab1a-fdd05b6d2c3b)
@PeterDaveHello Enjoy them

Fix patch:
diff --git a/public/bots/openai-o3-logo.png b/public/bots/openai-o3-logo.png
new file mode 100644
index 000000000..099bea2e2
Binary files /dev/null and b/public/bots/openai-o3-logo.png differ
diff --git a/public/bots/openai-o4-mini-logo.png b/public/bots/openai-o4-mini-logo.png
new file mode 100644
index 000000000..db804e472
Binary files /dev/null and b/public/bots/openai-o4-mini-logo.png differ
diff --git a/src/bots/index.js b/src/bots/index.js
index 694995b9b..3a730adf5 100644
--- a/src/bots/index.js
+++ b/src/bots/index.js
@@ -25,7 +25,9 @@ import OpenAIAPI41MiniBot from "./openai/OpenAIAPI41MiniBot";
 import OpenAIAPI41NanoBot from "./openai/OpenAIAPI41NanoBot";
 import OpenAIAPIo1Bot from "./openai/OpenAIAPIo1Bot";
 import OpenAIAPIo1MiniBot from "./openai/OpenAIAPIo1MiniBot";
+import OpenAIAPIo3Bot from "@/bots/openai/OpenAIAPIo3Bot";
 import OpenAIAPIo3MiniBot from "./openai/OpenAIAPIo3MiniBot";
+import OpenAIAPIo4MiniBot from "@/bots/openai/OpenAIAPIo4MiniBot";
 import OpenAIAPI45Bot from "./openai/OpenAIAPI45Bot";
 import MistralBot from "./MistralBot";
 import MOSSBot from "@/bots/MOSSBot";
@@ -109,7 +111,9 @@ const all = [
   OpenAIAPI41NanoBot.getInstance(),
   OpenAIAPIo1Bot.getInstance(),
   OpenAIAPIo1MiniBot.getInstance(),
+  OpenAIAPIo3Bot.getInstance(),
   OpenAIAPIo3MiniBot.getInstance(),
+  OpenAIAPIo4MiniBot.getInstance(),
   OpenAIAPI45Bot.getInstance(),
   GradioAppBot.getInstance(),
   Gemma7bGroqAPIBot.getInstance(),
@@ -203,7 +207,9 @@ export const botTags = {
     bots.getBotByClassName("OpenAIAPI41NanoBot"),
     bots.getBotByClassName("OpenAIAPIo1Bot"),
     bots.getBotByClassName("OpenAIAPIo1MiniBot"),
+    bots.getBotByClassName("OpenAIAPIo3Bot"),
     bots.getBotByClassName("OpenAIAPIo3MiniBot"),
+    bots.getBotByClassName("OpenAIAPIo4MiniBot"),
     bots.getBotByClassName("OpenAIAPI45Bot"),
     bots.getBotByClassName("WenxinQianfanBot"),
     bots.getBotByClassName("WenxinQianfanTurboBot"),
diff --git a/src/bots/openai/OpenAIAPIo3Bot.js b/src/bots/openai/OpenAIAPIo3Bot.js
new file mode 100644
index 000000000..60ae73919
--- /dev/null
+++ b/src/bots/openai/OpenAIAPIo3Bot.js
@@ -0,0 +1,12 @@
+import OpenAIAPIBot from "./OpenAIAPIBot";
+
+export default class OpenAIAPIo3Bot extends OpenAIAPIBot {
+  static _className = "OpenAIAPIo3Bot"; // Class name of the bot
+  static _logoFilename = "openai-o3-logo.png"; // Place it in public/bots/
+  static _isDarkLogo = true; // The main color of logo is dark
+  static _model = "o3";
+
+  constructor() {
+    super();
+  }
+}
diff --git a/src/bots/openai/OpenAIAPIo4MiniBot.js b/src/bots/openai/OpenAIAPIo4MiniBot.js
new file mode 100644
index 000000000..bc56c79b3
--- /dev/null
+++ b/src/bots/openai/OpenAIAPIo4MiniBot.js
@@ -0,0 +1,12 @@
+import OpenAIAPIBot from "./OpenAIAPIBot";
+
+export default class OpenAIAPIo4MiniBot extends OpenAIAPIBot {
+  static _className = "OpenAIAPIo4MiniBot"; // Class name of the bot
+  static _logoFilename = "openai-o4-mini-logo.png"; // Place it in public/bots/
+  static _isDarkLogo = true; // The main color of logo is dark
+  static _model = "o4-mini";
+
+  constructor() {
+    super();
+  }
+}
diff --git a/src/i18n/locales/de.json b/src/i18n/locales/de.json
index fbeb135b4..c8be7333e 100644
--- a/src/i18n/locales/de.json
+++ b/src/i18n/locales/de.json
@@ -239,7 +239,9 @@
     "gpt-45-preview": "gpt-4.5-preview",
     "o1": "o1",
     "o1-mini": "o1-mini",
+    "o3": "o3",
     "o3-mini": "o3-mini",
+    "o4-mini": "o4-mini",
     "gpt-41": "gpt-4.1",
     "gpt-41-mini": "gpt-4.1-mini",
     "gpt-41-nano": "gpt-4.1-nano",
diff --git a/src/i18n/locales/en.json b/src/i18n/locales/en.json
index b0f6ae14a..b1ae5f6b3 100644
--- a/src/i18n/locales/en.json
+++ b/src/i18n/locales/en.json
@@ -239,7 +239,9 @@
     "gpt-45-preview": "gpt-4.5-preview",
     "o1": "o1",
     "o1-mini": "o1-mini",
+    "o3": "o3",
     "o3-mini": "o3-mini",
+    "o4-mini": "o4-mini",
     "gpt-41": "gpt-4.1",
     "gpt-41-mini": "gpt-4.1-mini",
     "gpt-41-nano": "gpt-4.1-nano",
diff --git a/src/i18n/locales/es.json b/src/i18n/locales/es.json
index eb8b6ce81..cbf4aaec1 100644
--- a/src/i18n/locales/es.json
+++ b/src/i18n/locales/es.json
@@ -239,7 +239,9 @@
     "gpt-45-preview": "gpt-4.5-preview",
     "o1": "o1",
     "o1-mini": "o1-mini",
+    "o3": "o3",
     "o3-mini": "o3-mini",
+    "o4-mini": "o4-mini",
     "gpt-41": "gpt-4.1",
     "gpt-41-mini": "gpt-4.1-mini",
     "gpt-41-nano": "gpt-4.1-nano",
diff --git a/src/i18n/locales/fr.json b/src/i18n/locales/fr.json
index 09994d194..cc1e20da9 100644
--- a/src/i18n/locales/fr.json
+++ b/src/i18n/locales/fr.json
@@ -239,7 +239,9 @@
     "gpt-45-preview": "gpt-4.5-preview",
     "o1": "o1",
     "o1-mini": "o1-mini",
+    "o3": "o3",
     "o3-mini": "o3-mini",
+    "o4-mini": "o4-mini",
     "gpt-41": "gpt-4.1",
     "gpt-41-mini": "gpt-4.1-mini",
     "gpt-41-nano": "gpt-4.1-nano",
diff --git a/src/i18n/locales/it.json b/src/i18n/locales/it.json
index ccb5a2b91..864f988f5 100644
--- a/src/i18n/locales/it.json
+++ b/src/i18n/locales/it.json
@@ -240,7 +240,9 @@
     "gpt-45-preview": "gpt-4.5-preview",
     "o1": "o1",
     "o1-mini": "o1-mini",
+    "o3": "o3",
     "o3-mini": "o3-mini",
+    "o4-mini": "o4-mini",
     "gpt-41": "gpt-4.1",
     "gpt-41-mini": "gpt-4.1-mini",
     "gpt-41-nano": "gpt-4.1-nano",
diff --git a/src/i18n/locales/ja.json b/src/i18n/locales/ja.json
index 266c8d3d4..3da5f32bf 100644
--- a/src/i18n/locales/ja.json
+++ b/src/i18n/locales/ja.json
@@ -239,7 +239,9 @@
     "gpt-45-preview": "gpt-4.5-preview",
     "o1": "o1",
     "o1-mini": "o1-mini",
+    "o3": "o3",
     "o3-mini": "o3-mini",
+    "o4-mini": "o4-mini",
     "gpt-41": "gpt-4.1",
     "gpt-41-mini": "gpt-4.1-mini",
     "gpt-41-nano": "gpt-4.1-nano",
diff --git a/src/i18n/locales/ko.json b/src/i18n/locales/ko.json
index bf3c6e3ee..f9be66069 100644
--- a/src/i18n/locales/ko.json
+++ b/src/i18n/locales/ko.json
@@ -239,7 +239,9 @@
     "gpt-45-preview": "gpt-4.5-preview",
     "o1": "o1",
     "o1-mini": "o1-mini",
+    "o3": "o3",
     "o3-mini": "o3-mini",
+    "o4-mini": "o4-mini",
     "gpt-41": "gpt-4.1",
     "gpt-41-mini": "gpt-4.1-mini",
     "gpt-41-nano": "gpt-4.1-nano",
diff --git a/src/i18n/locales/ru.json b/src/i18n/locales/ru.json
index 948965359..df05d4d1c 100644
--- a/src/i18n/locales/ru.json
+++ b/src/i18n/locales/ru.json
@@ -239,7 +239,9 @@
     "gpt-45-preview": "gpt-4.5-preview",
     "o1": "o1",
     "o1-mini": "o1-mini",
+    "o3": "o3",
     "o3-mini": "o3-mini",
+    "o4-mini": "o4-mini",
     "gpt-41": "gpt-4.1",
     "gpt-41-mini": "gpt-4.1-mini",
     "gpt-41-nano": "gpt-4.1-nano",
diff --git a/src/i18n/locales/vi.json b/src/i18n/locales/vi.json
index 4f82c33e4..4b5a9855c 100644
--- a/src/i18n/locales/vi.json
+++ b/src/i18n/locales/vi.json
@@ -220,7 +220,9 @@
     "gpt-45-preview": "gpt-4.5-preview",
     "o1": "o1",
     "o1-mini": "o1-mini",
+    "o3": "o3",
     "o3-mini": "o3-mini",
+    "o4-mini": "o4-mini",
     "gpt-41": "gpt-4.1",
     "gpt-41-mini": "gpt-4.1-mini",
     "gpt-41-nano": "gpt-4.1-nano",
diff --git a/src/i18n/locales/zh.json b/src/i18n/locales/zh.json
index 0c1ec08a4..2767db0f9 100644
--- a/src/i18n/locales/zh.json
+++ b/src/i18n/locales/zh.json
@@ -239,7 +239,9 @@
     "gpt-45-preview": "gpt-4.5-preview",
     "o1": "o1",
     "o1-mini": "o1-mini",
+    "o3": "o3",
     "o3-mini": "o3-mini",
+    "o4-mini": "o4-mini",
     "gpt-41": "gpt-4.1",
     "gpt-41-mini": "gpt-4.1-mini",
     "gpt-41-nano": "gpt-4.1-nano",
diff --git a/src/i18n/locales/zhtw.json b/src/i18n/locales/zhtw.json
index e21156711..11e2f9c06 100644
--- a/src/i18n/locales/zhtw.json
+++ b/src/i18n/locales/zhtw.json
@@ -239,7 +239,9 @@
     "gpt-45-preview": "gpt-4.5-preview",
     "o1": "o1",
     "o1-mini": "o1-mini",
+    "o3": "o3",
     "o3-mini": "o3-mini",
+    "o4-mini": "o4-mini",
     "gpt-41": "gpt-4.1",
     "gpt-41-mini": "gpt-4.1-mini",
     "gpt-41-nano": "gpt-4.1-nano",


Test patch: