fix(deeplink): prioritize GOOGLE_GEMINI_BASE_URL over GEMINI_BASE_URL

When merging Gemini config from local env file during deeplink import,
check GOOGLE_GEMINI_BASE_URL first (official variable name) before
falling back to GEMINI_BASE_URL.
This commit is contained in:
Jason
2026-01-11 23:24:06 +08:00
parent 4a8883ecc3
commit 6aef472fd2
+5 -1
View File
@@ -523,7 +523,11 @@ fn merge_gemini_config(
}
if request.endpoint.as_ref().is_none_or(|s| s.is_empty()) {
if let Some(base_url) = config.get("GEMINI_BASE_URL").and_then(|v| v.as_str()) {
if let Some(base_url) = config
.get("GOOGLE_GEMINI_BASE_URL")
.or_else(|| config.get("GEMINI_BASE_URL"))
.and_then(|v| v.as_str())
{
request.endpoint = Some(base_url.to_string());
}
}