Add Gemini CLI v1internal quota support

This commit is contained in:
Mas0nShi
2026-05-22 16:58:04 +08:00
parent 9533bd7043
commit ce02f1ae8c
17 changed files with 985 additions and 52 deletions
@@ -23,6 +23,11 @@ export function getDefaultEndpointPath(params: {
}): string {
const providerType = (params.providerType || '').toLowerCase()
const normalizedApiFormat = normalizeEndpointApiFormat(params.apiFormat)
if (providerType === 'gemini_cli') {
if (normalizedApiFormat === 'gemini:generate_content') {
return '/v1internal:{action}'
}
}
if (providerType === 'vertex_ai') {
if (normalizedApiFormat === 'gemini:generate_content') {
return '/v1/projects/{project_id}/locations/{region}/publishers/google/models/{model}:{action}'