History

docs: Gemini thinking budget configuration (#32002)

Release Notes: - N/A

Oleksiy Syvokon committed 1 year ago

Commit 1bc052d1 parent 29cb95a1 file · +10 −4Browse files

Unified · Split

docs/src/ai/configuration.md+10−4
@@ -226,7 +226,9 @@ Zed will also use the `GOOGLE_AI_API_KEY` environment variable if it's defined. · 225 unmodified lines
226226
227227 #### Custom Models {#google-ai-custom-models}
228228
229−By default, Zed will use `stable` versions of models, but you can use specific versions of models, including [experimental models](https://ai.google.dev/gemini-api/docs/models/experimental-models), with the Google AI provider by adding the following to your Zed `settings.json`:
229+By default, Zed will use `stable` versions of models, but you can use specific versions of models, including [experimental models](https://ai.google.dev/gemini-api/docs/models/experimental-models). You can configure a model to use [thinking mode](https://ai.google.dev/gemini-api/docs/thinking) (if it supports it) by adding a `mode` configuration to your model. This is useful for controlling reasoning token usage and response speed. If not specified, Gemini will automatically choose the thinking budget.
230+
231+Here is an example of a custom Google AI model you could add to your Zed `settings.json`:
230232
231233 ```json
232234 {
@@ -234,9 +236,13 @@ By default, Zed will use `stable` versions of models, but you can use specific v · 1 unmodified line
234236 "google": {
235237 "available_models": [
236238 {
237− "name": "gemini-1.5-flash-latest",
238− "display_name": "Gemini 1.5 Flash (Latest)",
239− "max_tokens": 1000000
239+ "name": "gemini-2.5-flash-preview-05-20",
240+ "display_name": "Gemini 2.5 Flash (Thinking)",
241+ "max_tokens": 1000000,
242+ "mode": {
243+ "type": "thinking",
244+ "budget_tokens": 24000
245+ }
240246 }
241247 ]
242248 }