mmx-cli 1.0.26 → 1.0.28
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/README.md +11 -3
- package/dist/index.d.ts +1 -1
- package/dist/mmx.mjs +316 -311
- package/dist/sdk.mjs +6 -3
- package/package.json +1 -1
package/dist/sdk.mjs
CHANGED
|
@@ -4,7 +4,7 @@ import { copyFileSync, existsSync, readFileSync, renameSync, unlinkSync, writeFi
|
|
|
4
4
|
// src/config/schema.ts
|
|
5
5
|
var REGIONS = {
|
|
6
6
|
global: "https://api.minimax.io",
|
|
7
|
-
cn: "https://api.
|
|
7
|
+
cn: "https://api.minimax.cn"
|
|
8
8
|
};
|
|
9
9
|
var OAUTH_HOSTS = {
|
|
10
10
|
global: "https://account.minimax.io",
|
|
@@ -415,7 +415,7 @@ Video models (Hailuo-2.3 / 2.3-Fast) require the Max plan or above.`;
|
|
|
415
415
|
return "";
|
|
416
416
|
}
|
|
417
417
|
function upgradeUrl(url) {
|
|
418
|
-
const host = url?.includes("minimaxi.com") ? "https://platform.
|
|
418
|
+
const host = url?.includes("api.minimax.cn") || url?.includes("api.minimaxi.com") ? "https://platform.minimax.cn" : "https://platform.minimax.io";
|
|
419
419
|
return `${host}/subscribe/token-plan`;
|
|
420
420
|
}
|
|
421
421
|
function mapApiError(status, body, url) {
|
|
@@ -876,6 +876,9 @@ function fileDeleteEndpoint(baseUrl) {
|
|
|
876
876
|
return `${baseUrl}/v1/files/delete`;
|
|
877
877
|
}
|
|
878
878
|
|
|
879
|
+
// src/config/models.ts
|
|
880
|
+
var DEFAULT_TEXT_MODEL = "MiniMax-M3.1-Flash-Preview";
|
|
881
|
+
|
|
879
882
|
// src/sdk/text/index.ts
|
|
880
883
|
class TextSDK extends Client {
|
|
881
884
|
async* chatStream(body) {
|
|
@@ -912,7 +915,7 @@ class TextSDK extends Client {
|
|
|
912
915
|
}
|
|
913
916
|
return {
|
|
914
917
|
...params,
|
|
915
|
-
model: params.model ??
|
|
918
|
+
model: params.model ?? DEFAULT_TEXT_MODEL,
|
|
916
919
|
max_tokens: params.max_tokens ?? 4096
|
|
917
920
|
};
|
|
918
921
|
}
|