@prestyj/ai 5.0.0 → 5.1.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/index.cjs CHANGED
@@ -3158,11 +3158,17 @@ providerRegistry.register("anthropic", {
3158
3158
  stream: (options) => streamAnthropic(options)
3159
3159
  });
3160
3160
  providerRegistry.register("xiaomi", {
3161
- stream: (options) => streamOpenAI({
3162
- ...options,
3163
- baseUrl: options.baseUrl ?? "https://token-plan-sgp.xiaomimimo.com/v1",
3164
- webSearch: false
3165
- })
3161
+ stream: (options) => {
3162
+ const TOKEN_PLAN_URL = "https://token-plan-sgp.xiaomimimo.com/v1";
3163
+ const PLATFORM_URL = "https://api.xiaomimimo.com/v1";
3164
+ let baseUrl;
3165
+ if (options.model === "mimo-v2.5-pro-ultraspeed") {
3166
+ baseUrl = options.baseUrl && options.baseUrl !== TOKEN_PLAN_URL ? options.baseUrl : PLATFORM_URL;
3167
+ } else {
3168
+ baseUrl = options.baseUrl ?? TOKEN_PLAN_URL;
3169
+ }
3170
+ return streamOpenAI({ ...options, baseUrl, webSearch: false });
3171
+ }
3166
3172
  });
3167
3173
  providerRegistry.register("openai", {
3168
3174
  stream: (options) => {