Skip to content

Commit ec51a77

Browse files
Update request.ts with other Gemini 2.0 and 2.5 model names.
1 parent e7c9843 commit ec51a77

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/requests/request.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ async function handleResponseNotOk(
223223
let isUnsupportedModelError = false;
224224
const newSdkUrl = "https://github.com/googleapis/js-genai";
225225
// Patterns for newer models likely requiring the new SDK
226-
const unsupportedModelPatterns = [/gemini-2/, /gemini-pro-2.0/, /gemini-ultra-2.0/, /gemini-flash-2.5/, /gemini-pro-2.5/];
226+
const unsupportedModelPatterns = [/gemini-2/, /gemini-pro-2.0/, /gemini-ultra-2.0/, /gemini-flash-2.5/, /gemini-pro-2.5/, /gemini-2.5-pro/, /gemini-2.5-pro-exp/, /gemini-2.0-flash/];
227227

228228
// Extract model name from the URL
229229
let requestedModel = "unknown";
@@ -268,4 +268,4 @@ async function handleResponseNotOk(
268268
response.status,
269269
response.statusText,
270270
);
271-
}
271+
}

0 commit comments

Comments
 (0)