mirror of
https://github.com/Nezumi-2711/9router.git
synced 2026-09-22 20:00:47 +00:00
Add gemini-3.6-flash tiered (high/medium/low) for Antigravity routing via upstreamModelId "gemini-3.6-flash-tiered(level)" + thinkingLevel, plus gemini-3.6-flash and gemini-3.5-flash-lite direct API models. - getModelUpstreamId: split (level) suffix before lookup, re-append after - Antigravity executor: preserve transformed body.model - MITM extractModel: parse thinkingLevel for tiered model (default medium) - Isolate Cloud Code endpoints: discovery (loadCodeAssist/onboardUser/ quota) on PROD cloudcode-pa, chat transport on daily-cloudcode-pa to bypass prod 429
87 lines
3.4 KiB
JavaScript
87 lines
3.4 KiB
JavaScript
import { ANTIGRAVITY_IDE_BASE_URL, ANTIGRAVITY_IDE_USER_AGENT, ANTIGRAVITY_OAUTH_CLIENT } from "../shared.js";
|
|
|
|
export default {
|
|
id: "antigravity",
|
|
priority: 20,
|
|
alias: "ag",
|
|
uiAlias: "ag",
|
|
display: {
|
|
name: "Antigravity",
|
|
icon: "rocket_launch",
|
|
color: "#F59E0B",
|
|
website: "https://antigravity.google",
|
|
notice: {
|
|
signupUrl: "https://antigravity.google",
|
|
},
|
|
deprecated: true,
|
|
deprecationNotice: "RISK_NOTICE",
|
|
},
|
|
category: "oauth",
|
|
serviceKinds: ["llm", "image"],
|
|
transport: {
|
|
baseUrls: [ANTIGRAVITY_IDE_BASE_URL],
|
|
format: "antigravity",
|
|
headers: {
|
|
"User-Agent": ANTIGRAVITY_IDE_USER_AGENT,
|
|
},
|
|
retry: {
|
|
"429": {
|
|
attempts: 3,
|
|
},
|
|
"500": {
|
|
attempts: 3,
|
|
},
|
|
"503": {
|
|
attempts: 3,
|
|
},
|
|
},
|
|
usage: {
|
|
// Discovery (quota/project) on PROD; daily host rejects these.
|
|
quotaApiUrl: "https://cloudcode-pa.googleapis.com/v1internal:fetchAvailableModels",
|
|
loadProjectApiUrl: "https://cloudcode-pa.googleapis.com/v1internal:loadCodeAssist",
|
|
tokenUrl: "https://oauth2.googleapis.com/token",
|
|
},
|
|
clientId: "1071006060591-tmhssin2h21lcre235vtolojh4g403ep.apps.googleusercontent.com",
|
|
clientSecret: "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",
|
|
},
|
|
models: [
|
|
{ id: "gemini-3.6-flash-high", name: "Gemini 3.6 Flash (High)", upstreamModelId: "gemini-3.6-flash-tiered(high)" },
|
|
{ id: "gemini-3.6-flash-medium", name: "Gemini 3.6 Flash (Medium)", upstreamModelId: "gemini-3.6-flash-tiered(medium)" },
|
|
{ id: "gemini-3.6-flash-low", name: "Gemini 3.6 Flash (Low)", upstreamModelId: "gemini-3.6-flash-tiered(low)" },
|
|
{ id: "gemini-3.5-flash-high", name: "Gemini 3.5 Flash (High)" },
|
|
{ id: "gemini-3-flash-agent", name: "Gemini 3.5 Flash (High)" },
|
|
{ id: "gemini-3.5-flash-low", name: "Gemini 3.5 Flash (Medium)" },
|
|
{ id: "gemini-3.5-flash-extra-low", name: "Gemini 3.5 Flash (Low)" },
|
|
{ id: "gemini-pro-agent", name: "Gemini 3.1 Pro (High)" },
|
|
{ id: "gemini-3.1-pro-low", name: "Gemini 3.1 Pro (Low)" },
|
|
{ id: "claude-sonnet-4-6", name: "Claude Sonnet 4.6 (Thinking)" },
|
|
{ id: "claude-opus-4-6-thinking", name: "Claude Opus 4.6 (Thinking)" },
|
|
{ id: "gpt-oss-120b-medium", name: "GPT-OSS 120B (Medium)" },
|
|
{ id: "gemini-3-flash", name: "Gemini 3 Flash", thinking: false },
|
|
// Image generation models
|
|
{ id: "gemini-3.1-flash-image", name: "Gemini 3.1 Flash (Image)", kind: "image", imageGen: true, capabilities: ["textToImage"] },
|
|
],
|
|
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",
|
|
"https://www.googleapis.com/auth/cclog",
|
|
"https://www.googleapis.com/auth/experimentsandconfigs",
|
|
],
|
|
apiEndpoint: "https://daily-cloudcode-pa.googleapis.com",
|
|
apiVersion: "v1internal",
|
|
loadCodeAssistEndpoint: "https://cloudcode-pa.googleapis.com/v1internal:loadCodeAssist",
|
|
onboardUserEndpoint: "https://cloudcode-pa.googleapis.com/v1internal:onboardUser",
|
|
loadCodeAssistUserAgent: "google-api-nodejs-client/9.15.1",
|
|
loadCodeAssistApiClient: "google-cloud-sdk vscode_cloudshelleditor/0.1",
|
|
refreshLeadMs: 300000,
|
|
},
|
|
features: {
|
|
usage: true,
|
|
},
|
|
};
|