mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-07-26 06:24:32 +08:00
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:
@@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user