fix(no-think): normalize provider prefix to canonical in no-think variants (#4531)

Adds pure normalizeProviderPrefix helper + opt-in aliasToCanonical map so no-think variant ids use canonical provider prefixes in canonical catalog mode. Tested. Rebuilt onto release/v3.8.33.

Integrated into release/v3.8.33.
This commit is contained in:
Rahul sharma
2026-06-22 00:11:59 +05:30
committed by GitHub
parent 9cf96d0e9f
commit 9ade3e5f52
3 changed files with 86 additions and 17 deletions

View File

@@ -1397,7 +1397,10 @@ export async function getUnifiedModelsResponse(
// Advertise no-thinking gateway variants (Fase 8.1). Derived from the already
// key-filtered list, so a variant only appears when its real model is permitted.
finalModels = appendNoThinkingVariants(finalModels);
finalModels = appendNoThinkingVariants(
finalModels,
prefixMode === "canonical" ? aliasToProviderId : undefined
);
// #4424 follow-up — drop exact-duplicate ids that slip through the per-source push
// guards (e.g. `codex/gpt-5.5`, `veo-free/seedance` listed twice). Keyed by listing