Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Added
- Added `thinkingLevel` and `thinkingBudget` configuration options for Google Generative AI and Google Vertex providers. [#1110](https://github.com/sourcebot-dev/sourcebot/pull/1110)

### Changed
- Deprecated `GOOGLE_VERTEX_THINKING_BUDGET_TOKENS` environment variable in favor of per-model `thinkingBudget` config. [#1110](https://github.com/sourcebot-dev/sourcebot/pull/1110)
- Removed `GOOGLE_VERTEX_INCLUDE_THOUGHTS` environment variable. Thoughts are now always included. [#1110](https://github.com/sourcebot-dev/sourcebot/pull/1110)

## [4.16.8] - 2026-04-09

### Added
Expand Down
16 changes: 14 additions & 2 deletions docs/docs/configuration/language-model-providers.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,10 @@ The `reasoningSummary` field controls whether the model returns its reasoning pr

[Vercel AI SDK Google Generative AI Docs](https://ai-sdk.dev/providers/ai-sdk-providers/google-generative-ai)

The `thinkingLevel` field controls the depth of reasoning for Gemini 3 models. Valid values are `minimal`, `low`, `medium`, and `high`. See [thinking levels](https://ai.google.dev/gemini-api/docs/thinking#thinking-levels).

The `thinkingBudget` field sets the number of thinking tokens for Gemini 2.5 models. Set to `-1` for dynamic thinking. See [thinking budget](https://ai.google.dev/gemini-api/docs/thinking#set-budget).

```json wrap icon="code" Example config with Google Generative AI provider
{
"$schema": "https://raw.githubusercontent.com/sourcebot-dev/sourcebot/main/schemas/v3/index.json",
Expand All @@ -168,7 +172,9 @@ The `reasoningSummary` field controls whether the model returns its reasoning pr
"token": {
"env": "GOOGLE_GENERATIVE_AI_API_KEY"
},
"baseUrl": "OPTIONAL_BASE_URL"
"baseUrl": "OPTIONAL_BASE_URL",
"thinkingLevel": "high", // "minimal" | "low" | "medium" | "high" (Gemini 3 models)
"thinkingBudget": -1 // number of thinking tokens, -1 for dynamic (Gemini 2.5 models)
}
]
}
Expand All @@ -181,6 +187,10 @@ The `reasoningSummary` field controls whether the model returns its reasoning pr

[Vercel AI SDK Google Vertex AI Docs](https://ai-sdk.dev/providers/ai-sdk-providers/google-vertex)

The `thinkingLevel` field controls the depth of reasoning for Gemini 3 models. Valid values are `minimal`, `low`, `medium`, and `high`. See [thinking levels](https://ai.google.dev/gemini-api/docs/thinking#thinking-levels).

The `thinkingBudget` field sets the number of thinking tokens for Gemini 2.5 models. Set to `-1` for dynamic thinking. See [thinking budget](https://ai.google.dev/gemini-api/docs/thinking#set-budget).

```json wrap icon="code" Example config with Google Vertex provider
{
"$schema": "https://raw.githubusercontent.com/sourcebot-dev/sourcebot/main/schemas/v3/index.json",
Expand All @@ -194,7 +204,9 @@ The `reasoningSummary` field controls whether the model returns its reasoning pr
"credentials": {
"env": "GOOGLE_APPLICATION_CREDENTIALS"
},
"baseUrl": "OPTIONAL_BASE_URL"
"baseUrl": "OPTIONAL_BASE_URL",
"thinkingLevel": "high", // "minimal" | "low" | "medium" | "high" (Gemini 3 models)
"thinkingBudget": -1 // number of thinking tokens, -1 for dynamic (Gemini 2.5 models)
}
]
}
Expand Down
56 changes: 56 additions & 0 deletions docs/snippets/schemas/v3/index.schema.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2300,6 +2300,20 @@
"pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$",
"description": "Optional base URL."
},
"thinkingLevel": {
"type": "string",
"description": "Optional thinking level for Gemini 3 models. Controls the depth of reasoning the model performs. See https://ai.google.dev/gemini-api/docs/thinking#thinking-levels",
"enum": [
"minimal",
"low",
"medium",
"high"
]
},
"thinkingBudget": {
"type": "integer",
"description": "Optional thinking budget for Gemini 2.5 models. Sets the number of thinking tokens the model can use when generating a response. Set to -1 for dynamic thinking. See https://ai.google.dev/gemini-api/docs/thinking#set-budget"
},
"temperature": {
"type": "number",
"description": "Optional temperature setting to use with the model."
Expand Down Expand Up @@ -2548,6 +2562,20 @@
"pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$",
"description": "Optional base URL."
},
"thinkingLevel": {
"type": "string",
"description": "Optional thinking level for Gemini 3 models. Controls the depth of reasoning the model performs. See https://ai.google.dev/gemini-api/docs/thinking#thinking-levels",
"enum": [
"minimal",
"low",
"medium",
"high"
]
},
"thinkingBudget": {
"type": "integer",
"description": "Optional thinking budget for Gemini 2.5 models. Sets the number of thinking tokens the model can use when generating a response. Set to -1 for dynamic thinking. See https://ai.google.dev/gemini-api/docs/thinking#set-budget"
},
"temperature": {
"type": "number",
"description": "Optional temperature setting to use with the model."
Expand Down Expand Up @@ -3838,6 +3866,20 @@
"pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$",
"description": "Optional base URL."
},
"thinkingLevel": {
"type": "string",
"description": "Optional thinking level for Gemini 3 models. Controls the depth of reasoning the model performs. See https://ai.google.dev/gemini-api/docs/thinking#thinking-levels",
"enum": [
"minimal",
"low",
"medium",
"high"
]
},
"thinkingBudget": {
"type": "integer",
"description": "Optional thinking budget for Gemini 2.5 models. Sets the number of thinking tokens the model can use when generating a response. Set to -1 for dynamic thinking. See https://ai.google.dev/gemini-api/docs/thinking#set-budget"
},
"temperature": {
"type": "number",
"description": "Optional temperature setting to use with the model."
Expand Down Expand Up @@ -4086,6 +4128,20 @@
"pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$",
"description": "Optional base URL."
},
"thinkingLevel": {
"type": "string",
"description": "Optional thinking level for Gemini 3 models. Controls the depth of reasoning the model performs. See https://ai.google.dev/gemini-api/docs/thinking#thinking-levels",
"enum": [
"minimal",
"low",
"medium",
"high"
]
},
"thinkingBudget": {
"type": "integer",
"description": "Optional thinking budget for Gemini 2.5 models. Sets the number of thinking tokens the model can use when generating a response. Set to -1 for dynamic thinking. See https://ai.google.dev/gemini-api/docs/thinking#set-budget"
},
"temperature": {
"type": "number",
"description": "Optional temperature setting to use with the model."
Expand Down
56 changes: 56 additions & 0 deletions docs/snippets/schemas/v3/languageModel.schema.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -614,6 +614,20 @@
"pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$",
"description": "Optional base URL."
},
"thinkingLevel": {
"type": "string",
"description": "Optional thinking level for Gemini 3 models. Controls the depth of reasoning the model performs. See https://ai.google.dev/gemini-api/docs/thinking#thinking-levels",
"enum": [
"minimal",
"low",
"medium",
"high"
]
},
"thinkingBudget": {
"type": "integer",
"description": "Optional thinking budget for Gemini 2.5 models. Sets the number of thinking tokens the model can use when generating a response. Set to -1 for dynamic thinking. See https://ai.google.dev/gemini-api/docs/thinking#set-budget"
},
"temperature": {
"type": "number",
"description": "Optional temperature setting to use with the model."
Expand Down Expand Up @@ -862,6 +876,20 @@
"pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$",
"description": "Optional base URL."
},
"thinkingLevel": {
"type": "string",
"description": "Optional thinking level for Gemini 3 models. Controls the depth of reasoning the model performs. See https://ai.google.dev/gemini-api/docs/thinking#thinking-levels",
"enum": [
"minimal",
"low",
"medium",
"high"
]
},
"thinkingBudget": {
"type": "integer",
"description": "Optional thinking budget for Gemini 2.5 models. Sets the number of thinking tokens the model can use when generating a response. Set to -1 for dynamic thinking. See https://ai.google.dev/gemini-api/docs/thinking#set-budget"
},
"temperature": {
"type": "number",
"description": "Optional temperature setting to use with the model."
Expand Down Expand Up @@ -2152,6 +2180,20 @@
"pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$",
"description": "Optional base URL."
},
"thinkingLevel": {
"type": "string",
"description": "Optional thinking level for Gemini 3 models. Controls the depth of reasoning the model performs. See https://ai.google.dev/gemini-api/docs/thinking#thinking-levels",
"enum": [
"minimal",
"low",
"medium",
"high"
]
},
"thinkingBudget": {
"type": "integer",
"description": "Optional thinking budget for Gemini 2.5 models. Sets the number of thinking tokens the model can use when generating a response. Set to -1 for dynamic thinking. See https://ai.google.dev/gemini-api/docs/thinking#set-budget"
},
"temperature": {
"type": "number",
"description": "Optional temperature setting to use with the model."
Expand Down Expand Up @@ -2400,6 +2442,20 @@
"pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$",
"description": "Optional base URL."
},
"thinkingLevel": {
"type": "string",
"description": "Optional thinking level for Gemini 3 models. Controls the depth of reasoning the model performs. See https://ai.google.dev/gemini-api/docs/thinking#thinking-levels",
"enum": [
"minimal",
"low",
"medium",
"high"
]
},
"thinkingBudget": {
"type": "integer",
"description": "Optional thinking budget for Gemini 2.5 models. Sets the number of thinking tokens the model can use when generating a response. Set to -1 for dynamic thinking. See https://ai.google.dev/gemini-api/docs/thinking#set-budget"
},
"temperature": {
"type": "number",
"description": "Optional temperature setting to use with the model."
Expand Down
56 changes: 56 additions & 0 deletions packages/schemas/src/v3/index.schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2299,6 +2299,20 @@ const schema = {
"pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$",
"description": "Optional base URL."
},
"thinkingLevel": {
"type": "string",
"description": "Optional thinking level for Gemini 3 models. Controls the depth of reasoning the model performs. See https://ai.google.dev/gemini-api/docs/thinking#thinking-levels",
"enum": [
"minimal",
"low",
"medium",
"high"
]
},
"thinkingBudget": {
"type": "integer",
"description": "Optional thinking budget for Gemini 2.5 models. Sets the number of thinking tokens the model can use when generating a response. Set to -1 for dynamic thinking. See https://ai.google.dev/gemini-api/docs/thinking#set-budget"
},
"temperature": {
"type": "number",
"description": "Optional temperature setting to use with the model."
Expand Down Expand Up @@ -2547,6 +2561,20 @@ const schema = {
"pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$",
"description": "Optional base URL."
},
"thinkingLevel": {
"type": "string",
"description": "Optional thinking level for Gemini 3 models. Controls the depth of reasoning the model performs. See https://ai.google.dev/gemini-api/docs/thinking#thinking-levels",
"enum": [
"minimal",
"low",
"medium",
"high"
]
},
"thinkingBudget": {
"type": "integer",
"description": "Optional thinking budget for Gemini 2.5 models. Sets the number of thinking tokens the model can use when generating a response. Set to -1 for dynamic thinking. See https://ai.google.dev/gemini-api/docs/thinking#set-budget"
},
"temperature": {
"type": "number",
"description": "Optional temperature setting to use with the model."
Expand Down Expand Up @@ -3837,6 +3865,20 @@ const schema = {
"pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$",
"description": "Optional base URL."
},
"thinkingLevel": {
"type": "string",
"description": "Optional thinking level for Gemini 3 models. Controls the depth of reasoning the model performs. See https://ai.google.dev/gemini-api/docs/thinking#thinking-levels",
"enum": [
"minimal",
"low",
"medium",
"high"
]
},
"thinkingBudget": {
"type": "integer",
"description": "Optional thinking budget for Gemini 2.5 models. Sets the number of thinking tokens the model can use when generating a response. Set to -1 for dynamic thinking. See https://ai.google.dev/gemini-api/docs/thinking#set-budget"
},
"temperature": {
"type": "number",
"description": "Optional temperature setting to use with the model."
Expand Down Expand Up @@ -4085,6 +4127,20 @@ const schema = {
"pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$",
"description": "Optional base URL."
},
"thinkingLevel": {
"type": "string",
"description": "Optional thinking level for Gemini 3 models. Controls the depth of reasoning the model performs. See https://ai.google.dev/gemini-api/docs/thinking#thinking-levels",
"enum": [
"minimal",
"low",
"medium",
"high"
]
},
"thinkingBudget": {
"type": "integer",
"description": "Optional thinking budget for Gemini 2.5 models. Sets the number of thinking tokens the model can use when generating a response. Set to -1 for dynamic thinking. See https://ai.google.dev/gemini-api/docs/thinking#set-budget"
},
"temperature": {
"type": "number",
"description": "Optional temperature setting to use with the model."
Expand Down
16 changes: 16 additions & 0 deletions packages/schemas/src/v3/index.type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -962,6 +962,14 @@ export interface GoogleGenerativeAILanguageModel {
* Optional base URL.
*/
baseUrl?: string;
/**
* Optional thinking level for Gemini 3 models. Controls the depth of reasoning the model performs. See https://ai.google.dev/gemini-api/docs/thinking#thinking-levels
*/
thinkingLevel?: "minimal" | "low" | "medium" | "high";
/**
* Optional thinking budget for Gemini 2.5 models. Sets the number of thinking tokens the model can use when generating a response. Set to -1 for dynamic thinking. See https://ai.google.dev/gemini-api/docs/thinking#set-budget
*/
thinkingBudget?: number;
/**
* Optional temperature setting to use with the model.
*/
Expand Down Expand Up @@ -1056,6 +1064,14 @@ export interface GoogleVertexLanguageModel {
* Optional base URL.
*/
baseUrl?: string;
/**
* Optional thinking level for Gemini 3 models. Controls the depth of reasoning the model performs. See https://ai.google.dev/gemini-api/docs/thinking#thinking-levels
*/
thinkingLevel?: "minimal" | "low" | "medium" | "high";
/**
* Optional thinking budget for Gemini 2.5 models. Sets the number of thinking tokens the model can use when generating a response. Set to -1 for dynamic thinking. See https://ai.google.dev/gemini-api/docs/thinking#set-budget
*/
thinkingBudget?: number;
/**
* Optional temperature setting to use with the model.
*/
Expand Down
Loading
Loading