fix(gemini): strip native self prefixes before generateContent (#36141)

Strip `google/` and `gemini/` self-prefixes before native Gemini generateContent calls, and keep provider-normalization expectations aligned.
This commit is contained in:
Teknium 2026-06-13 13:47:08 -07:00 committed by GitHub
parent 7d11fa4e9e
commit c8e5f34f24
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 58 additions and 3 deletions

View file

@ -84,7 +84,6 @@ _STRIP_VENDOR_ONLY_PROVIDERS: frozenset[str] = frozenset({
# Providers whose native naming is authoritative -- pass through unchanged.
_AUTHORITATIVE_NATIVE_PROVIDERS: frozenset[str] = frozenset({
"gemini",
"huggingface",
})
@ -103,6 +102,8 @@ _MATCHING_PREFIX_STRIP_PROVIDERS: frozenset[str] = frozenset({
"arcee",
"ollama-cloud",
"custom",
"gemini",
"xai",
})
# Providers whose APIs require lowercase model IDs. Xiaomi's