@prestyj/ai 5.0.0 → 5.0.1
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/index.cjs +11 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +11 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3103,11 +3103,17 @@ providerRegistry.register("anthropic", {
|
|
|
3103
3103
|
stream: (options) => streamAnthropic(options)
|
|
3104
3104
|
});
|
|
3105
3105
|
providerRegistry.register("xiaomi", {
|
|
3106
|
-
stream: (options) =>
|
|
3107
|
-
|
|
3108
|
-
|
|
3109
|
-
|
|
3110
|
-
|
|
3106
|
+
stream: (options) => {
|
|
3107
|
+
const TOKEN_PLAN_URL = "https://token-plan-sgp.xiaomimimo.com/v1";
|
|
3108
|
+
const PLATFORM_URL = "https://api.xiaomimimo.com/v1";
|
|
3109
|
+
let baseUrl;
|
|
3110
|
+
if (options.model === "mimo-v2.5-pro-ultraspeed") {
|
|
3111
|
+
baseUrl = options.baseUrl && options.baseUrl !== TOKEN_PLAN_URL ? options.baseUrl : PLATFORM_URL;
|
|
3112
|
+
} else {
|
|
3113
|
+
baseUrl = options.baseUrl ?? TOKEN_PLAN_URL;
|
|
3114
|
+
}
|
|
3115
|
+
return streamOpenAI({ ...options, baseUrl, webSearch: false });
|
|
3116
|
+
}
|
|
3111
3117
|
});
|
|
3112
3118
|
providerRegistry.register("openai", {
|
|
3113
3119
|
stream: (options) => {
|