Drop Xiaomi ASR models from catalog

This commit is contained in:
oldschoola
2026-06-15 05:35:19 -07:00
parent 7bbe2d89b1
commit 1c4bda29ff
4 changed files with 44 additions and 20 deletions
@@ -307,6 +307,19 @@ function dropFireworksWireIds(models: readonly ModelSpec[]): ModelSpec[] {
);
}
/**
* Xiaomi's `/v1/models` can advertise ASR/TTS ids alongside chat/completions
* models. Runtime discovery filters them, but previous bundled snapshots can
* still resurrect those stale ids via the fallback merge. Drop them here so the
* committed catalog matches the runtime surface.
*/
function dropXiaomiAudioOnlyIds(models: readonly ModelSpec[]): ModelSpec[] {
return models.filter(model => {
const isXiaomiProvider = model.provider === "xiaomi" || model.provider.startsWith("xiaomi-token-plan-");
return !isXiaomiProvider || (!model.id.includes("-tts") && !model.id.includes("-asr"));
});
}
const ANTIGRAVITY_ENDPOINT = "https://daily-cloudcode-pa.sandbox.googleapis.com";
async function getOAuthAccessFromStorage(provider: OAuthProvider): Promise<OAuthAccess | null> {
@@ -496,6 +509,7 @@ async function generateModels() {
allModels = applyFireworksDeepSeekReasoningShape(allModels);
allModels = dropFireworksWireIds(allModels);
allModels = dropUnusableZaiContextTierIds(allModels);
allModels = dropXiaomiAudioOnlyIds(allModels);
// Normalize display names: gateway author prefixes ("OpenAI: …"), alias
// markers ("(latest)"), provider attribution ("(Antigravity)"), and
// price/promo tags are model-extrinsic — strip them from the bundle.