feat: add custom Gemini endpoint support

- Add GEMINI_BASE_URL configuration option in .env.example
- Implement custom endpoint support in GeminiModelProvider using HttpOptions
- Update registry to pass base_url parameter to Gemini provider
- Maintain backward compatibility - uses default Google endpoint when not configured
This commit is contained in:
dragonfsky
2025-08-22 18:01:00 +08:00
parent 4c87afd479
commit 462bce002e
3 changed files with 25 additions and 2 deletions

View File

@@ -12,6 +12,7 @@
# Option 1: Use native APIs (recommended for direct access)
# Get your Gemini API key from: https://makersuite.google.com/app/apikey
GEMINI_API_KEY=your_gemini_api_key_here
# GEMINI_BASE_URL= # Optional: Custom Gemini endpoint (defaults to Google's API)
# Get your OpenAI API key from: https://platform.openai.com/api-keys
OPENAI_API_KEY=your_openai_api_key_here