Conversation
…ken-plan xiaomi-mimo and xiaomi-mimo-token-plan carry a real registry baseUrl and a live OpenAI-compatible /v1/models catalog (8 models on the token-plan host, including mimo-v2.6-pro / mimo-v2.6-flash and the ASR/TTS variants), but were not classified by any live-fetch branch of the model-import route. Import never probed the upstream /models and served the 2-entry hardcoded registry seed with "API unavailable — using local catalog", while inference kept working through DefaultExecutor. Same class as diegosouzapw#4249 (vercel-ai-gateway), diegosouzapw#4202 (zenmux) and diegosouzapw#3976 (llm7/byteplus): add both providers to NAMED_OPENAI_STYLE_PROVIDERS so import fetches the live <baseUrl>/models list, with the registry seed as the offline fallback. Closes diegosouzapw#15307
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
xiaomi-mimoandxiaomi-mimo-token-planare keyed OpenAI-style providers with a real registrybaseUrland a live OpenAI-compatible/v1/modelsendpoint, but they are not classified by any live-fetch branch of the model-import route (src/app/api/providers/[id]/models/route.ts): they are notopenai-compatible-*, not self-hosted, and not inNAMED_OPENAI_STYLE_PROVIDERS. Import therefore never probes the upstream/modelsand falls through to the hardcoded registry seed (CHAT_OPENAI_COMPAT_MODELS["xiaomi-mimo"]= 2 entries:mimo-v2.5-pro,mimo-v2.5) with the warningAPI unavailable — using local catalog.The upstream API itself is healthy — verified from inside an OmniRoute container against the same key:
GET https://token-plan-sgp.xiaomimimo.com/v1/models→ 200 in ~690 ms with 8 models (mimo-v2.5-pro,mimo-v2.5,mimo-v2.6-pro,mimo-v2.6-flash,mimo-v2.5-asr,mimo-v2.5-tts,mimo-v2.5-tts-voiceclone,mimo-v2.5-tts-voicedesign)POST /v1/chat/completions→ 200 in ~1.1 sInference works (DefaultExecutor reads
baseUrlfrom the connection); only model discovery is affected. Syncing consequently imports 2 of 8 models, and newer models (mimo-v2.6-pro,mimo-v2.6-flash) are undiscoverable — they must be added by hand as custom models.Closes #15307. Same class as #4249 (vercel-ai-gateway), #4202 (zenmux), #3976 (llm7/byteplus) and the provider-model-sweep — each fixed the same way.
Fix
Add
"xiaomi-mimo"and"xiaomi-mimo-token-plan"toNAMED_OPENAI_STYLE_PROVIDERSinsrc/app/api/providers/[id]/models/discovery/providerSets.ts. Live fetch keeps the catalog fresh; the registry seed remains the offline fallback (import never breaks when the upstream is down — covered by the third test).Testing
New regression test
tests/unit/xiaomi-mimo-models-fetch-15307.test.ts(mirrorsvercel-gateway-models-fetch-4249.test.ts):isNamedOpenAIStyleProviderxiaomi-mimoimport probeshttps://api.xiaomimimo.com/v1/modelsand serves the live catalog (source: "api"), includingmimo-v2.6-proxiaomi-mimo-token-planimport probeshttps://token-plan-sgp.xiaomimimo.com/v1/modelsand serves the live catalogsource: "local_catalog") instead of erroringAll 6 tests in the new file +
vercel-gateway-models-fetch-4249.test.tspass locally (node --test, tsx).