diff --git a/apps/desktop/src-tauri/src/infrastructure/gemini_service.rs b/apps/desktop/src-tauri/src/infrastructure/gemini_service.rs index e4d0a6d..f2d2264 100644 --- a/apps/desktop/src-tauri/src/infrastructure/gemini_service.rs +++ b/apps/desktop/src-tauri/src/infrastructure/gemini_service.rs @@ -210,7 +210,7 @@ impl GeminiService { headers.insert("Content-Type".to_string(), "application/json".to_string()); ClientConfig { - gateway_url: format!("{}/google/vertex-ai", self.config.base_url), + gateway_url: self.config.base_url.clone(), headers, } } @@ -332,7 +332,7 @@ impl GeminiService { println!("📦 请求数据: {}", serde_json::to_string_pretty(&request_data).unwrap_or_default()); // 发送请求到Cloudflare Gateway,参考demo.py - let generate_url = format!("{}:generateContent", client_config.gateway_url); + let generate_url = format!("{}/{}:generateContent", client_config.gateway_url, self.config.model_name); println!("📡 生成URL: {}", generate_url); // 重试机制