Co-authored-by: Ansh7473 <Ansh7473@users.noreply.github.com>
This commit is contained in:
YourAnsh
2026-05-23 09:26:10 +07:00
committed by GitHub
co-authored by Ansh7473
parent d29b19bc27
commit 2604b46847
7 changed files with 47 additions and 32 deletions
+1 -1
View File
@@ -112,7 +112,7 @@ function getMappedModel(tool, model) {
// Prefix match fallback
const prefixKey = Object.keys(aliases).find(k => k && aliases[k] && (lookup.startsWith(k) || k.startsWith(lookup)));
if (prefixKey) return aliases[prefixKey];
// Pattern fallback: catches AG renamed variants (e.g. gemini-pro-agent → gemini-3.1-pro-high)
// Pattern fallback: catches AG renamed variants (e.g. deprecated pro IDs → gemini-pro-agent)
const patterns = MODEL_PATTERNS?.[tool] || [];
for (const { match, alias } of patterns) {
if (match.test(lookup) && aliases[alias]) return aliases[alias];