fix: update google provider to handle gemma 4 thinking levels and route between MINIMAL and HIGH (#2903)

resolves #2812

Co-authored-by: Mario Zechner <badlogicgames@gmail.com>
This commit is contained in:
Aadish Verma
2026-04-08 18:08:00 -07:00
committed by GitHub
parent b48d802930
commit ee2483cd34
3 changed files with 51 additions and 6 deletions

View File

@@ -90,6 +90,33 @@ Override defaults when you need specific values:
The file reloads each time you open `/model`. Edit during session; no restart needed.
## Google AI Studio Example
Use `google-generative-ai` with a `baseUrl` to add models from Google AI Studio, including custom Gemma 4 entries:
```json
{
"providers": {
"my-google": {
"baseUrl": "https://generativelanguage.googleapis.com/v1beta",
"api": "google-generative-ai",
"apiKey": "GEMINI_API_KEY",
"models": [
{
"id": "gemma-4-31b-it",
"name": "Gemma 4 31B",
"input": ["text", "image"],
"contextWindow": 262144,
"reasoning": true
}
]
}
}
}
```
The `baseUrl` is required when adding custom models to the `google-generative-ai` API type.
## Supported APIs
| API | Description |