feat: 添加gemini协议适配 (#125)

* feat: 添加gemini协议适配

* Remove unrelated local files from Gemini PR
This commit is contained in:
SaltedFish555
2026-04-06 09:55:20 +08:00
committed by GitHub
parent 27825293bb
commit 0da5ec09e8
24 changed files with 2257 additions and 38 deletions

View File

@@ -339,8 +339,8 @@ export function buildAPIProviderProperties(): Property[] {
bedrock: 'AWS Bedrock',
vertex: 'Google Vertex AI',
foundry: 'Microsoft Foundry',
gemini: 'Gemini API'
}[apiProvider]
properties.push({
label: 'API provider',
value: providerLabel,
@@ -423,6 +423,13 @@ export function buildAPIProviderProperties(): Property[] {
value: 'Microsoft Foundry auth skipped',
})
}
} else if (apiProvider === 'gemini') {
const geminiBaseUrl =
process.env.GEMINI_BASE_URL || 'https://generativelanguage.googleapis.com/v1beta'
properties.push({
label: 'Gemini base URL',
value: geminiBaseUrl,
})
}
const proxyUrl = getProxyUrl()