This commit is contained in:
fawney19
2026-05-19 03:16:35 +08:00
77 changed files with 4051 additions and 333 deletions
@@ -104,6 +104,17 @@ pub(super) fn classify_ai_public_route(
"gemini:video",
true,
))
} else if normalized_path.ends_with(":embedContent")
|| normalized_path.ends_with(":batchEmbedContents")
{
Some(classified_with_request_auth_channel(
"ai_public",
"gemini",
"embedding",
"api_key",
"gemini:embedding",
true,
))
} else if is_gemini_cli_request(headers) {
Some(classified_with_request_auth_channel(
"ai_public",
@@ -229,6 +229,8 @@ pub(super) fn is_gemini_models_route(path: &str) -> bool {
(path.starts_with("/v1/models/") || path.starts_with("/v1beta/models/"))
&& (path.contains(":generateContent")
|| path.contains(":streamGenerateContent")
|| path.contains(":embedContent")
|| path.contains(":batchEmbedContents")
|| path.contains(":predictLongRunning"))
}