openmagic 0.5.0 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js CHANGED
@@ -896,6 +896,94 @@ var MODEL_REGISTRY = {
896
896
  keyPrefix: "gsk_",
897
897
  keyPlaceholder: "gsk_..."
898
898
  },
899
+ // ─── MiniMax ───────────────────────────────────────────────────
900
+ minimax: {
901
+ name: "MiniMax",
902
+ models: [
903
+ { id: "MiniMax-M2.7", name: "MiniMax M2.7", vision: true, context: 1048576, maxOutput: 16384 },
904
+ { id: "MiniMax-M2.7-highspeed", name: "MiniMax M2.7 Highspeed", vision: true, context: 1048576, maxOutput: 16384 },
905
+ { id: "MiniMax-M2.5", name: "MiniMax M2.5", vision: true, context: 1048576, maxOutput: 16384 },
906
+ { id: "MiniMax-M2.5-highspeed", name: "MiniMax M2.5 Highspeed", vision: true, context: 1048576, maxOutput: 16384 }
907
+ ],
908
+ apiBase: "https://api.minimax.chat/v1",
909
+ keyPrefix: "",
910
+ keyPlaceholder: "Enter MiniMax API key..."
911
+ },
912
+ // ─── Moonshot / Kimi ──────────────────────────────────────────
913
+ moonshot: {
914
+ name: "Kimi (Moonshot)",
915
+ models: [
916
+ {
917
+ id: "kimi-k2.5",
918
+ name: "Kimi K2.5",
919
+ vision: true,
920
+ context: 262144,
921
+ maxOutput: 16384,
922
+ thinking: {
923
+ supported: true,
924
+ paramName: "reasoning_effort",
925
+ paramType: "level",
926
+ levels: ["low", "medium", "high"],
927
+ defaultLevel: "medium"
928
+ }
929
+ },
930
+ {
931
+ id: "kimi-k2-thinking",
932
+ name: "Kimi K2 Thinking",
933
+ vision: false,
934
+ context: 262144,
935
+ maxOutput: 16384,
936
+ thinking: {
937
+ supported: true,
938
+ paramName: "reasoning_effort",
939
+ paramType: "level",
940
+ levels: ["low", "medium", "high"],
941
+ defaultLevel: "high"
942
+ }
943
+ }
944
+ ],
945
+ apiBase: "https://api.moonshot.cn/v1",
946
+ keyPrefix: "",
947
+ keyPlaceholder: "Enter Moonshot API key..."
948
+ },
949
+ // ─── Alibaba Qwen (DashScope) ────────────────────────────────
950
+ qwen: {
951
+ name: "Qwen (Alibaba)",
952
+ models: [
953
+ { id: "qwen3.5-plus", name: "Qwen 3.5 Plus", vision: true, context: 101e4, maxOutput: 16384 },
954
+ { id: "qwen-plus", name: "Qwen Plus", vision: false, context: 131072, maxOutput: 16384 },
955
+ { id: "qwen-max", name: "Qwen Max", vision: false, context: 131072, maxOutput: 16384 },
956
+ { id: "qwen-turbo", name: "Qwen Turbo", vision: false, context: 131072, maxOutput: 8192 }
957
+ ],
958
+ apiBase: "https://dashscope.aliyuncs.com/compatible-mode/v1",
959
+ keyPrefix: "",
960
+ keyPlaceholder: "Enter DashScope API key..."
961
+ },
962
+ // ─── Zhipu AI (GLM) ──────────────────────────────────────────
963
+ zhipu: {
964
+ name: "Zhipu AI (GLM)",
965
+ models: [
966
+ { id: "glm-5", name: "GLM-5", vision: true, context: 131072, maxOutput: 16384 },
967
+ { id: "glm-4.7", name: "GLM-4.7", vision: true, context: 131072, maxOutput: 16384 },
968
+ { id: "glm-4.6", name: "GLM-4.6", vision: true, context: 131072, maxOutput: 16384 },
969
+ { id: "glm-4.5", name: "GLM-4.5", vision: true, context: 131072, maxOutput: 16384 }
970
+ ],
971
+ apiBase: "https://open.bigmodel.cn/api/paas/v4",
972
+ keyPrefix: "",
973
+ keyPlaceholder: "Enter Zhipu API key..."
974
+ },
975
+ // ─── ByteDance Doubao ─────────────────────────────────────────
976
+ doubao: {
977
+ name: "Doubao (ByteDance)",
978
+ models: [
979
+ { id: "doubao-seed-2-0-pro", name: "Doubao Seed 2.0 Pro", vision: false, context: 131072, maxOutput: 16384 },
980
+ { id: "doubao-seed-2-0-lite", name: "Doubao Seed 2.0 Lite", vision: false, context: 131072, maxOutput: 8192 },
981
+ { id: "doubao-seed-2-0-code", name: "Doubao Seed 2.0 Code", vision: false, context: 131072, maxOutput: 16384 }
982
+ ],
983
+ apiBase: "https://ark.cn-beijing.volces.com/api/v3",
984
+ keyPrefix: "",
985
+ keyPlaceholder: "Enter Volcano Engine API key..."
986
+ },
899
987
  // ─── Ollama (Local) ───────────────────────────────────────────
900
988
  ollama: {
901
989
  name: "Ollama (Local)",
@@ -1362,7 +1450,12 @@ var OPENAI_COMPATIBLE_PROVIDERS = /* @__PURE__ */ new Set([
1362
1450
  "mistral",
1363
1451
  "xai",
1364
1452
  "ollama",
1365
- "openrouter"
1453
+ "openrouter",
1454
+ "minimax",
1455
+ "moonshot",
1456
+ "qwen",
1457
+ "zhipu",
1458
+ "doubao"
1366
1459
  ]);
1367
1460
  async function handleLlmChat(params, onChunk, onDone, onError) {
1368
1461
  const { provider, model, apiKey, messages, context } = params;
@@ -1421,7 +1514,7 @@ function createOpenMagicServer(proxyPort, roots) {
1421
1514
  "Content-Type": "application/json",
1422
1515
  "Access-Control-Allow-Origin": "*"
1423
1516
  });
1424
- res.end(JSON.stringify({ status: "ok", version: "0.5.0" }));
1517
+ res.end(JSON.stringify({ status: "ok", version: "0.7.0" }));
1425
1518
  return;
1426
1519
  }
1427
1520
  res.writeHead(404);
@@ -1479,7 +1572,7 @@ async function handleMessage(ws, msg, state, roots, _proxyPort) {
1479
1572
  id: msg.id,
1480
1573
  type: "handshake.ok",
1481
1574
  payload: {
1482
- version: "0.5.0",
1575
+ version: "0.7.0",
1483
1576
  roots,
1484
1577
  config: {
1485
1578
  provider: config.provider,
@@ -1820,7 +1913,7 @@ process.on("uncaughtException", (err) => {
1820
1913
  process.exit(1);
1821
1914
  });
1822
1915
  var childProcesses = [];
1823
- var VERSION = "0.5.0";
1916
+ var VERSION = "0.7.0";
1824
1917
  function ask(question) {
1825
1918
  const rl = createInterface({ input: process.stdin, output: process.stdout });
1826
1919
  return new Promise((resolve3) => {