feat: add Google AI Studio API support with platform-based detection (#502)

* feat: add Google AI Studio API support with platform-based detection

* chore: update configuration_guide.md

* fix the uv.lock formate error

---------

Co-authored-by: Willem Jiang <willem.jiang@gmail.com>
This commit is contained in:
HagonChan
2025-09-13 08:49:05 +08:00
committed by GitHub
parent dd9af1eb50
commit bbc49a04a6
5 changed files with 215 additions and 3 deletions

View File

@@ -97,7 +97,30 @@ AGENT_LLM_MAP: dict[str, LLMType] = {
"prompt_enhancer": "basic",
}
### How to use Google AI Studio models?
DeerFlow supports native integration with Google AI Studio (formerly Google Generative AI) API. This provides direct access to Google's Gemini models with their full feature set and optimized performance.
To use Google AI Studio models, you need to:
1. Get your API key from [Google AI Studio](https://aistudio.google.com/app/apikey)
2. Set the `platform` field to `"google_aistudio"` in your configuration
3. Configure your model and API key
The following is a configuration example for using Google AI Studio models:
```yaml
# Google AI Studio native API (recommended for Google models)
BASIC_MODEL:
platform: "google_aistudio"
model: "gemini-2.5-flash" # or "gemini-1.5-pro" ,...
api_key: YOUR_GOOGLE_API_KEY # Get from https://aistudio.google.com/app/apikey
```
**Note:** The `platform: "google_aistudio"` field is required to distinguish from other providers that may offer Gemini models through OpenAI-compatible APIs.
```
### How to use models with self-signed SSL certificates?
If your LLM server uses self-signed SSL certificates, you can disable SSL certificate verification by adding the `verify_ssl: false` parameter to your model configuration: