Files
9router/open-sse/providers/registry/gemini-cli.js
T
decoluaandCursor aba4c45da6 fix(translator): ESM-safe registry + tool-id pairing + responses max_tokens; add real-creds tests
- translator/index.js: replace require() with static side-effect imports (ESM-safe),
  lazy-init registry maps to survive circular import order
- openai-responses->openai: map max_output_tokens -> max_tokens (avoid leaking field upstream)
- gemini/antigravity -> openai: derive deterministic tool_call id from name so
  functionCall/functionResponse pair correctly (fixes provider tool-pairing 400s)
- add offline unit tests (finish-reason, usage, session-manager, ollama malformed args, const guard)
- add real-creds integration tests (provider-cases + all-formats matrix: 6 inbound formats x 4 scenarios)

Includes co-located provider registry refactor (pricing/capabilities/media providers) and sessionManager updates.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-15 11:38:43 +07:00

54 lines
1.6 KiB
JavaScript

import { GOOGLE_OAUTH_CLIENT } from "../shared.js";
export default {
id: "gemini-cli",
priority: 20,
hasFree: true,
alias: "gc",
uiAlias: "gc",
display: {
name: "Gemini CLI",
icon: "terminal",
color: "#4285F4",
website: "https://github.com/google-gemini/gemini-cli",
notice: {
signupUrl: "https://github.com/google-gemini/gemini-cli",
},
deprecated: true,
deprecationNotice: "RISK_NOTICE",
},
category: "free",
transport: {
baseUrl: "https://cloudcode-pa.googleapis.com/v1internal",
format: "gemini-cli",
cliVersion: "0.34.0",
apiClient: "google-genai-sdk/1.41.0 gl-node/v22.19.0",
usage: {
quotaUrl: "https://cloudcode-pa.googleapis.com/v1internal:retrieveUserQuota",
loadCodeAssistUrl: "https://cloudcode-pa.googleapis.com/v1internal:loadCodeAssist",
},
clientId: "681255809395-oo8ft2oprdrnp9e3aqf6av3hmdib135j.apps.googleusercontent.com",
clientSecret: "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",
},
models: [
{ id: "gemini-3-flash-preview", name: "Gemini 3 Flash Preview" },
{ id: "gemini-3-pro-preview", name: "Gemini 3 Pro Preview" },
],
oauth: {
authorizeUrl: "https://accounts.google.com/o/oauth2/v2/auth",
tokenUrl: "https://oauth2.googleapis.com/token",
userInfoUrl: "https://www.googleapis.com/oauth2/v1/userinfo",
scopes: [
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/userinfo.email",
"https://www.googleapis.com/auth/userinfo.profile",
],
refresh: {
encoding: "form",
},
},
features: {
usage: true,
},
};