From 2b689f918616c1af66d4fb00f897c82898771854 Mon Sep 17 00:00:00 2001 From: Brendan Kellam Date: Thu, 9 Apr 2026 11:28:47 -0700 Subject: [PATCH 1/3] feat(web): add per-model temperature configuration Adds an optional `temperature` field to all language model provider schemas, allowing temperature to be configured per model instead of globally via environment variable. The per-model setting takes precedence, with the env var as a fallback. Also deprecates SOURCEBOT_CHAT_MODEL_TEMPERATURE (now defaults to undefined instead of 0.3) in favor of the per-model config. Co-Authored-By: Claude Opus 4.6 (1M context) --- docs/snippets/schemas/v3/index.schema.mdx | 96 +++++++++++++++++++ .../schemas/v3/languageModel.schema.mdx | 96 +++++++++++++++++++ packages/schemas/src/v3/index.schema.ts | 96 +++++++++++++++++++ packages/schemas/src/v3/index.type.ts | 48 ++++++++++ .../schemas/src/v3/languageModel.schema.ts | 96 +++++++++++++++++++ packages/schemas/src/v3/languageModel.type.ts | 48 ++++++++++ packages/shared/src/env.server.ts | 5 +- .../web/src/app/api/(server)/chat/route.ts | 3 +- packages/web/src/features/chat/agent.ts | 7 +- .../web/src/features/chat/utils.server.ts | 2 + packages/web/src/features/mcp/askCodebase.ts | 3 +- schemas/v3/languageModel.json | 48 ++++++++++ 12 files changed, 544 insertions(+), 4 deletions(-) diff --git a/docs/snippets/schemas/v3/index.schema.mdx b/docs/snippets/schemas/v3/index.schema.mdx index d66c6ef17..b6276bf0a 100644 --- a/docs/snippets/schemas/v3/index.schema.mdx +++ b/docs/snippets/schemas/v3/index.schema.mdx @@ -1813,6 +1813,10 @@ "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", "description": "Optional base URL." }, + "temperature": { + "type": "number", + "description": "Optional temperature setting to use with the model." + }, "headers": { "type": "object", "description": "Optional headers to use with the model.", @@ -1947,6 +1951,10 @@ "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", "description": "Optional base URL." }, + "temperature": { + "type": "number", + "description": "Optional temperature setting to use with the model." + }, "headers": { "type": "object", "description": "Optional headers to use with the model.", @@ -2078,6 +2086,10 @@ "detailed" ] }, + "temperature": { + "type": "number", + "description": "Optional temperature setting to use with the model." + }, "headers": { "type": "object", "description": "Optional headers to use with the model.", @@ -2181,6 +2193,10 @@ "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", "description": "Optional base URL." }, + "temperature": { + "type": "number", + "description": "Optional temperature setting to use with the model." + }, "headers": { "type": "object", "description": "Optional headers to use with the model.", @@ -2284,6 +2300,10 @@ "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", "description": "Optional base URL." }, + "temperature": { + "type": "number", + "description": "Optional temperature setting to use with the model." + }, "headers": { "type": "object", "description": "Optional headers to use with the model.", @@ -2403,6 +2423,10 @@ "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", "description": "Optional base URL." }, + "temperature": { + "type": "number", + "description": "Optional temperature setting to use with the model." + }, "headers": { "type": "object", "description": "Optional headers to use with the model.", @@ -2524,6 +2548,10 @@ "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", "description": "Optional base URL." }, + "temperature": { + "type": "number", + "description": "Optional temperature setting to use with the model." + }, "headers": { "type": "object", "description": "Optional headers to use with the model.", @@ -2627,6 +2655,10 @@ "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", "description": "Optional base URL." }, + "temperature": { + "type": "number", + "description": "Optional temperature setting to use with the model." + }, "headers": { "type": "object", "description": "Optional headers to use with the model.", @@ -2756,6 +2788,10 @@ "detailed" ] }, + "temperature": { + "type": "number", + "description": "Optional temperature setting to use with the model." + }, "headers": { "type": "object", "description": "Optional headers to use with the model.", @@ -2959,6 +2995,10 @@ "thinking", "reasoning" ] + }, + "temperature": { + "type": "number", + "description": "Optional temperature setting to use with the model." } }, "required": [ @@ -3020,6 +3060,10 @@ "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", "description": "Optional base URL." }, + "temperature": { + "type": "number", + "description": "Optional temperature setting to use with the model." + }, "headers": { "type": "object", "description": "Optional headers to use with the model.", @@ -3127,6 +3171,10 @@ "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", "description": "Optional base URL." }, + "temperature": { + "type": "number", + "description": "Optional temperature setting to use with the model." + }, "headers": { "type": "object", "description": "Optional headers to use with the model.", @@ -3303,6 +3351,10 @@ "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", "description": "Optional base URL." }, + "temperature": { + "type": "number", + "description": "Optional temperature setting to use with the model." + }, "headers": { "type": "object", "description": "Optional headers to use with the model.", @@ -3437,6 +3489,10 @@ "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", "description": "Optional base URL." }, + "temperature": { + "type": "number", + "description": "Optional temperature setting to use with the model." + }, "headers": { "type": "object", "description": "Optional headers to use with the model.", @@ -3568,6 +3624,10 @@ "detailed" ] }, + "temperature": { + "type": "number", + "description": "Optional temperature setting to use with the model." + }, "headers": { "type": "object", "description": "Optional headers to use with the model.", @@ -3671,6 +3731,10 @@ "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", "description": "Optional base URL." }, + "temperature": { + "type": "number", + "description": "Optional temperature setting to use with the model." + }, "headers": { "type": "object", "description": "Optional headers to use with the model.", @@ -3774,6 +3838,10 @@ "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", "description": "Optional base URL." }, + "temperature": { + "type": "number", + "description": "Optional temperature setting to use with the model." + }, "headers": { "type": "object", "description": "Optional headers to use with the model.", @@ -3893,6 +3961,10 @@ "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", "description": "Optional base URL." }, + "temperature": { + "type": "number", + "description": "Optional temperature setting to use with the model." + }, "headers": { "type": "object", "description": "Optional headers to use with the model.", @@ -4014,6 +4086,10 @@ "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", "description": "Optional base URL." }, + "temperature": { + "type": "number", + "description": "Optional temperature setting to use with the model." + }, "headers": { "type": "object", "description": "Optional headers to use with the model.", @@ -4117,6 +4193,10 @@ "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", "description": "Optional base URL." }, + "temperature": { + "type": "number", + "description": "Optional temperature setting to use with the model." + }, "headers": { "type": "object", "description": "Optional headers to use with the model.", @@ -4246,6 +4326,10 @@ "detailed" ] }, + "temperature": { + "type": "number", + "description": "Optional temperature setting to use with the model." + }, "headers": { "type": "object", "description": "Optional headers to use with the model.", @@ -4449,6 +4533,10 @@ "thinking", "reasoning" ] + }, + "temperature": { + "type": "number", + "description": "Optional temperature setting to use with the model." } }, "required": [ @@ -4510,6 +4598,10 @@ "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", "description": "Optional base URL." }, + "temperature": { + "type": "number", + "description": "Optional temperature setting to use with the model." + }, "headers": { "type": "object", "description": "Optional headers to use with the model.", @@ -4617,6 +4709,10 @@ "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", "description": "Optional base URL." }, + "temperature": { + "type": "number", + "description": "Optional temperature setting to use with the model." + }, "headers": { "type": "object", "description": "Optional headers to use with the model.", diff --git a/docs/snippets/schemas/v3/languageModel.schema.mdx b/docs/snippets/schemas/v3/languageModel.schema.mdx index 4e6a38b13..ae9c33e70 100644 --- a/docs/snippets/schemas/v3/languageModel.schema.mdx +++ b/docs/snippets/schemas/v3/languageModel.schema.mdx @@ -127,6 +127,10 @@ "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", "description": "Optional base URL." }, + "temperature": { + "type": "number", + "description": "Optional temperature setting to use with the model." + }, "headers": { "type": "object", "description": "Optional headers to use with the model.", @@ -261,6 +265,10 @@ "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", "description": "Optional base URL." }, + "temperature": { + "type": "number", + "description": "Optional temperature setting to use with the model." + }, "headers": { "type": "object", "description": "Optional headers to use with the model.", @@ -392,6 +400,10 @@ "detailed" ] }, + "temperature": { + "type": "number", + "description": "Optional temperature setting to use with the model." + }, "headers": { "type": "object", "description": "Optional headers to use with the model.", @@ -495,6 +507,10 @@ "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", "description": "Optional base URL." }, + "temperature": { + "type": "number", + "description": "Optional temperature setting to use with the model." + }, "headers": { "type": "object", "description": "Optional headers to use with the model.", @@ -598,6 +614,10 @@ "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", "description": "Optional base URL." }, + "temperature": { + "type": "number", + "description": "Optional temperature setting to use with the model." + }, "headers": { "type": "object", "description": "Optional headers to use with the model.", @@ -717,6 +737,10 @@ "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", "description": "Optional base URL." }, + "temperature": { + "type": "number", + "description": "Optional temperature setting to use with the model." + }, "headers": { "type": "object", "description": "Optional headers to use with the model.", @@ -838,6 +862,10 @@ "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", "description": "Optional base URL." }, + "temperature": { + "type": "number", + "description": "Optional temperature setting to use with the model." + }, "headers": { "type": "object", "description": "Optional headers to use with the model.", @@ -941,6 +969,10 @@ "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", "description": "Optional base URL." }, + "temperature": { + "type": "number", + "description": "Optional temperature setting to use with the model." + }, "headers": { "type": "object", "description": "Optional headers to use with the model.", @@ -1070,6 +1102,10 @@ "detailed" ] }, + "temperature": { + "type": "number", + "description": "Optional temperature setting to use with the model." + }, "headers": { "type": "object", "description": "Optional headers to use with the model.", @@ -1273,6 +1309,10 @@ "thinking", "reasoning" ] + }, + "temperature": { + "type": "number", + "description": "Optional temperature setting to use with the model." } }, "required": [ @@ -1334,6 +1374,10 @@ "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", "description": "Optional base URL." }, + "temperature": { + "type": "number", + "description": "Optional temperature setting to use with the model." + }, "headers": { "type": "object", "description": "Optional headers to use with the model.", @@ -1441,6 +1485,10 @@ "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", "description": "Optional base URL." }, + "temperature": { + "type": "number", + "description": "Optional temperature setting to use with the model." + }, "headers": { "type": "object", "description": "Optional headers to use with the model.", @@ -1617,6 +1665,10 @@ "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", "description": "Optional base URL." }, + "temperature": { + "type": "number", + "description": "Optional temperature setting to use with the model." + }, "headers": { "type": "object", "description": "Optional headers to use with the model.", @@ -1751,6 +1803,10 @@ "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", "description": "Optional base URL." }, + "temperature": { + "type": "number", + "description": "Optional temperature setting to use with the model." + }, "headers": { "type": "object", "description": "Optional headers to use with the model.", @@ -1882,6 +1938,10 @@ "detailed" ] }, + "temperature": { + "type": "number", + "description": "Optional temperature setting to use with the model." + }, "headers": { "type": "object", "description": "Optional headers to use with the model.", @@ -1985,6 +2045,10 @@ "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", "description": "Optional base URL." }, + "temperature": { + "type": "number", + "description": "Optional temperature setting to use with the model." + }, "headers": { "type": "object", "description": "Optional headers to use with the model.", @@ -2088,6 +2152,10 @@ "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", "description": "Optional base URL." }, + "temperature": { + "type": "number", + "description": "Optional temperature setting to use with the model." + }, "headers": { "type": "object", "description": "Optional headers to use with the model.", @@ -2207,6 +2275,10 @@ "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", "description": "Optional base URL." }, + "temperature": { + "type": "number", + "description": "Optional temperature setting to use with the model." + }, "headers": { "type": "object", "description": "Optional headers to use with the model.", @@ -2328,6 +2400,10 @@ "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", "description": "Optional base URL." }, + "temperature": { + "type": "number", + "description": "Optional temperature setting to use with the model." + }, "headers": { "type": "object", "description": "Optional headers to use with the model.", @@ -2431,6 +2507,10 @@ "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", "description": "Optional base URL." }, + "temperature": { + "type": "number", + "description": "Optional temperature setting to use with the model." + }, "headers": { "type": "object", "description": "Optional headers to use with the model.", @@ -2560,6 +2640,10 @@ "detailed" ] }, + "temperature": { + "type": "number", + "description": "Optional temperature setting to use with the model." + }, "headers": { "type": "object", "description": "Optional headers to use with the model.", @@ -2763,6 +2847,10 @@ "thinking", "reasoning" ] + }, + "temperature": { + "type": "number", + "description": "Optional temperature setting to use with the model." } }, "required": [ @@ -2824,6 +2912,10 @@ "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", "description": "Optional base URL." }, + "temperature": { + "type": "number", + "description": "Optional temperature setting to use with the model." + }, "headers": { "type": "object", "description": "Optional headers to use with the model.", @@ -2931,6 +3023,10 @@ "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", "description": "Optional base URL." }, + "temperature": { + "type": "number", + "description": "Optional temperature setting to use with the model." + }, "headers": { "type": "object", "description": "Optional headers to use with the model.", diff --git a/packages/schemas/src/v3/index.schema.ts b/packages/schemas/src/v3/index.schema.ts index b3423a29c..610dbb956 100644 --- a/packages/schemas/src/v3/index.schema.ts +++ b/packages/schemas/src/v3/index.schema.ts @@ -1812,6 +1812,10 @@ const schema = { "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", "description": "Optional base URL." }, + "temperature": { + "type": "number", + "description": "Optional temperature setting to use with the model." + }, "headers": { "type": "object", "description": "Optional headers to use with the model.", @@ -1946,6 +1950,10 @@ const schema = { "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", "description": "Optional base URL." }, + "temperature": { + "type": "number", + "description": "Optional temperature setting to use with the model." + }, "headers": { "type": "object", "description": "Optional headers to use with the model.", @@ -2077,6 +2085,10 @@ const schema = { "detailed" ] }, + "temperature": { + "type": "number", + "description": "Optional temperature setting to use with the model." + }, "headers": { "type": "object", "description": "Optional headers to use with the model.", @@ -2180,6 +2192,10 @@ const schema = { "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", "description": "Optional base URL." }, + "temperature": { + "type": "number", + "description": "Optional temperature setting to use with the model." + }, "headers": { "type": "object", "description": "Optional headers to use with the model.", @@ -2283,6 +2299,10 @@ const schema = { "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", "description": "Optional base URL." }, + "temperature": { + "type": "number", + "description": "Optional temperature setting to use with the model." + }, "headers": { "type": "object", "description": "Optional headers to use with the model.", @@ -2402,6 +2422,10 @@ const schema = { "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", "description": "Optional base URL." }, + "temperature": { + "type": "number", + "description": "Optional temperature setting to use with the model." + }, "headers": { "type": "object", "description": "Optional headers to use with the model.", @@ -2523,6 +2547,10 @@ const schema = { "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", "description": "Optional base URL." }, + "temperature": { + "type": "number", + "description": "Optional temperature setting to use with the model." + }, "headers": { "type": "object", "description": "Optional headers to use with the model.", @@ -2626,6 +2654,10 @@ const schema = { "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", "description": "Optional base URL." }, + "temperature": { + "type": "number", + "description": "Optional temperature setting to use with the model." + }, "headers": { "type": "object", "description": "Optional headers to use with the model.", @@ -2755,6 +2787,10 @@ const schema = { "detailed" ] }, + "temperature": { + "type": "number", + "description": "Optional temperature setting to use with the model." + }, "headers": { "type": "object", "description": "Optional headers to use with the model.", @@ -2958,6 +2994,10 @@ const schema = { "thinking", "reasoning" ] + }, + "temperature": { + "type": "number", + "description": "Optional temperature setting to use with the model." } }, "required": [ @@ -3019,6 +3059,10 @@ const schema = { "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", "description": "Optional base URL." }, + "temperature": { + "type": "number", + "description": "Optional temperature setting to use with the model." + }, "headers": { "type": "object", "description": "Optional headers to use with the model.", @@ -3126,6 +3170,10 @@ const schema = { "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", "description": "Optional base URL." }, + "temperature": { + "type": "number", + "description": "Optional temperature setting to use with the model." + }, "headers": { "type": "object", "description": "Optional headers to use with the model.", @@ -3302,6 +3350,10 @@ const schema = { "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", "description": "Optional base URL." }, + "temperature": { + "type": "number", + "description": "Optional temperature setting to use with the model." + }, "headers": { "type": "object", "description": "Optional headers to use with the model.", @@ -3436,6 +3488,10 @@ const schema = { "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", "description": "Optional base URL." }, + "temperature": { + "type": "number", + "description": "Optional temperature setting to use with the model." + }, "headers": { "type": "object", "description": "Optional headers to use with the model.", @@ -3567,6 +3623,10 @@ const schema = { "detailed" ] }, + "temperature": { + "type": "number", + "description": "Optional temperature setting to use with the model." + }, "headers": { "type": "object", "description": "Optional headers to use with the model.", @@ -3670,6 +3730,10 @@ const schema = { "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", "description": "Optional base URL." }, + "temperature": { + "type": "number", + "description": "Optional temperature setting to use with the model." + }, "headers": { "type": "object", "description": "Optional headers to use with the model.", @@ -3773,6 +3837,10 @@ const schema = { "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", "description": "Optional base URL." }, + "temperature": { + "type": "number", + "description": "Optional temperature setting to use with the model." + }, "headers": { "type": "object", "description": "Optional headers to use with the model.", @@ -3892,6 +3960,10 @@ const schema = { "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", "description": "Optional base URL." }, + "temperature": { + "type": "number", + "description": "Optional temperature setting to use with the model." + }, "headers": { "type": "object", "description": "Optional headers to use with the model.", @@ -4013,6 +4085,10 @@ const schema = { "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", "description": "Optional base URL." }, + "temperature": { + "type": "number", + "description": "Optional temperature setting to use with the model." + }, "headers": { "type": "object", "description": "Optional headers to use with the model.", @@ -4116,6 +4192,10 @@ const schema = { "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", "description": "Optional base URL." }, + "temperature": { + "type": "number", + "description": "Optional temperature setting to use with the model." + }, "headers": { "type": "object", "description": "Optional headers to use with the model.", @@ -4245,6 +4325,10 @@ const schema = { "detailed" ] }, + "temperature": { + "type": "number", + "description": "Optional temperature setting to use with the model." + }, "headers": { "type": "object", "description": "Optional headers to use with the model.", @@ -4448,6 +4532,10 @@ const schema = { "thinking", "reasoning" ] + }, + "temperature": { + "type": "number", + "description": "Optional temperature setting to use with the model." } }, "required": [ @@ -4509,6 +4597,10 @@ const schema = { "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", "description": "Optional base URL." }, + "temperature": { + "type": "number", + "description": "Optional temperature setting to use with the model." + }, "headers": { "type": "object", "description": "Optional headers to use with the model.", @@ -4616,6 +4708,10 @@ const schema = { "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", "description": "Optional base URL." }, + "temperature": { + "type": "number", + "description": "Optional temperature setting to use with the model." + }, "headers": { "type": "object", "description": "Optional headers to use with the model.", diff --git a/packages/schemas/src/v3/index.type.ts b/packages/schemas/src/v3/index.type.ts index 4ef945be9..bec32887f 100644 --- a/packages/schemas/src/v3/index.type.ts +++ b/packages/schemas/src/v3/index.type.ts @@ -749,6 +749,10 @@ export interface AmazonBedrockLanguageModel { * Optional base URL. */ baseUrl?: string; + /** + * Optional temperature setting to use with the model. + */ + temperature?: number; headers?: LanguageModelHeaders; } /** @@ -825,6 +829,10 @@ export interface AnthropicLanguageModel { * Optional base URL. */ baseUrl?: string; + /** + * Optional temperature setting to use with the model. + */ + temperature?: number; headers?: LanguageModelHeaders; } export interface AzureLanguageModel { @@ -876,6 +884,10 @@ export interface AzureLanguageModel { * Controls whether the model returns its reasoning process. Set to 'auto' for a condensed summary, 'detailed' for more comprehensive reasoning, or 'none' to disable. Defaults to 'auto'. */ reasoningSummary?: string; + /** + * Optional temperature setting to use with the model. + */ + temperature?: number; headers?: LanguageModelHeaders; } export interface DeepSeekLanguageModel { @@ -911,6 +923,10 @@ export interface DeepSeekLanguageModel { * Optional base URL. */ baseUrl?: string; + /** + * Optional temperature setting to use with the model. + */ + temperature?: number; headers?: LanguageModelHeaders; } export interface GoogleGenerativeAILanguageModel { @@ -946,6 +962,10 @@ export interface GoogleGenerativeAILanguageModel { * Optional base URL. */ baseUrl?: string; + /** + * Optional temperature setting to use with the model. + */ + temperature?: number; headers?: LanguageModelHeaders; } export interface GoogleVertexAnthropicLanguageModel { @@ -989,6 +1009,10 @@ export interface GoogleVertexAnthropicLanguageModel { * Optional base URL. */ baseUrl?: string; + /** + * Optional temperature setting to use with the model. + */ + temperature?: number; headers?: LanguageModelHeaders; } export interface GoogleVertexLanguageModel { @@ -1032,6 +1056,10 @@ export interface GoogleVertexLanguageModel { * Optional base URL. */ baseUrl?: string; + /** + * Optional temperature setting to use with the model. + */ + temperature?: number; headers?: LanguageModelHeaders; } export interface MistralLanguageModel { @@ -1067,6 +1095,10 @@ export interface MistralLanguageModel { * Optional base URL. */ baseUrl?: string; + /** + * Optional temperature setting to use with the model. + */ + temperature?: number; headers?: LanguageModelHeaders; } export interface OpenAILanguageModel { @@ -1110,6 +1142,10 @@ export interface OpenAILanguageModel { * Controls whether the model returns its reasoning process. Set to 'auto' for a condensed summary, 'detailed' for more comprehensive reasoning, or 'none' to disable. Defaults to 'auto'. */ reasoningSummary?: string; + /** + * Optional temperature setting to use with the model. + */ + temperature?: number; headers?: LanguageModelHeaders; } export interface OpenAICompatibleLanguageModel { @@ -1151,6 +1187,10 @@ export interface OpenAICompatibleLanguageModel { * The name of the XML tag to extract reasoning from (without angle brackets). Defaults to `think`. */ reasoningTag?: string; + /** + * Optional temperature setting to use with the model. + */ + temperature?: number; } /** * Optional query parameters to include in the request url. @@ -1210,6 +1250,10 @@ export interface OpenRouterLanguageModel { * Optional base URL. */ baseUrl?: string; + /** + * Optional temperature setting to use with the model. + */ + temperature?: number; headers?: LanguageModelHeaders; } export interface XaiLanguageModel { @@ -1245,6 +1289,10 @@ export interface XaiLanguageModel { * Optional base URL. */ baseUrl?: string; + /** + * Optional temperature setting to use with the model. + */ + temperature?: number; headers?: LanguageModelHeaders; } export interface GitHubAppConfig { diff --git a/packages/schemas/src/v3/languageModel.schema.ts b/packages/schemas/src/v3/languageModel.schema.ts index e8eecc147..ce298e45a 100644 --- a/packages/schemas/src/v3/languageModel.schema.ts +++ b/packages/schemas/src/v3/languageModel.schema.ts @@ -126,6 +126,10 @@ const schema = { "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", "description": "Optional base URL." }, + "temperature": { + "type": "number", + "description": "Optional temperature setting to use with the model." + }, "headers": { "type": "object", "description": "Optional headers to use with the model.", @@ -260,6 +264,10 @@ const schema = { "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", "description": "Optional base URL." }, + "temperature": { + "type": "number", + "description": "Optional temperature setting to use with the model." + }, "headers": { "type": "object", "description": "Optional headers to use with the model.", @@ -391,6 +399,10 @@ const schema = { "detailed" ] }, + "temperature": { + "type": "number", + "description": "Optional temperature setting to use with the model." + }, "headers": { "type": "object", "description": "Optional headers to use with the model.", @@ -494,6 +506,10 @@ const schema = { "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", "description": "Optional base URL." }, + "temperature": { + "type": "number", + "description": "Optional temperature setting to use with the model." + }, "headers": { "type": "object", "description": "Optional headers to use with the model.", @@ -597,6 +613,10 @@ const schema = { "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", "description": "Optional base URL." }, + "temperature": { + "type": "number", + "description": "Optional temperature setting to use with the model." + }, "headers": { "type": "object", "description": "Optional headers to use with the model.", @@ -716,6 +736,10 @@ const schema = { "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", "description": "Optional base URL." }, + "temperature": { + "type": "number", + "description": "Optional temperature setting to use with the model." + }, "headers": { "type": "object", "description": "Optional headers to use with the model.", @@ -837,6 +861,10 @@ const schema = { "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", "description": "Optional base URL." }, + "temperature": { + "type": "number", + "description": "Optional temperature setting to use with the model." + }, "headers": { "type": "object", "description": "Optional headers to use with the model.", @@ -940,6 +968,10 @@ const schema = { "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", "description": "Optional base URL." }, + "temperature": { + "type": "number", + "description": "Optional temperature setting to use with the model." + }, "headers": { "type": "object", "description": "Optional headers to use with the model.", @@ -1069,6 +1101,10 @@ const schema = { "detailed" ] }, + "temperature": { + "type": "number", + "description": "Optional temperature setting to use with the model." + }, "headers": { "type": "object", "description": "Optional headers to use with the model.", @@ -1272,6 +1308,10 @@ const schema = { "thinking", "reasoning" ] + }, + "temperature": { + "type": "number", + "description": "Optional temperature setting to use with the model." } }, "required": [ @@ -1333,6 +1373,10 @@ const schema = { "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", "description": "Optional base URL." }, + "temperature": { + "type": "number", + "description": "Optional temperature setting to use with the model." + }, "headers": { "type": "object", "description": "Optional headers to use with the model.", @@ -1440,6 +1484,10 @@ const schema = { "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", "description": "Optional base URL." }, + "temperature": { + "type": "number", + "description": "Optional temperature setting to use with the model." + }, "headers": { "type": "object", "description": "Optional headers to use with the model.", @@ -1616,6 +1664,10 @@ const schema = { "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", "description": "Optional base URL." }, + "temperature": { + "type": "number", + "description": "Optional temperature setting to use with the model." + }, "headers": { "type": "object", "description": "Optional headers to use with the model.", @@ -1750,6 +1802,10 @@ const schema = { "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", "description": "Optional base URL." }, + "temperature": { + "type": "number", + "description": "Optional temperature setting to use with the model." + }, "headers": { "type": "object", "description": "Optional headers to use with the model.", @@ -1881,6 +1937,10 @@ const schema = { "detailed" ] }, + "temperature": { + "type": "number", + "description": "Optional temperature setting to use with the model." + }, "headers": { "type": "object", "description": "Optional headers to use with the model.", @@ -1984,6 +2044,10 @@ const schema = { "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", "description": "Optional base URL." }, + "temperature": { + "type": "number", + "description": "Optional temperature setting to use with the model." + }, "headers": { "type": "object", "description": "Optional headers to use with the model.", @@ -2087,6 +2151,10 @@ const schema = { "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", "description": "Optional base URL." }, + "temperature": { + "type": "number", + "description": "Optional temperature setting to use with the model." + }, "headers": { "type": "object", "description": "Optional headers to use with the model.", @@ -2206,6 +2274,10 @@ const schema = { "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", "description": "Optional base URL." }, + "temperature": { + "type": "number", + "description": "Optional temperature setting to use with the model." + }, "headers": { "type": "object", "description": "Optional headers to use with the model.", @@ -2327,6 +2399,10 @@ const schema = { "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", "description": "Optional base URL." }, + "temperature": { + "type": "number", + "description": "Optional temperature setting to use with the model." + }, "headers": { "type": "object", "description": "Optional headers to use with the model.", @@ -2430,6 +2506,10 @@ const schema = { "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", "description": "Optional base URL." }, + "temperature": { + "type": "number", + "description": "Optional temperature setting to use with the model." + }, "headers": { "type": "object", "description": "Optional headers to use with the model.", @@ -2559,6 +2639,10 @@ const schema = { "detailed" ] }, + "temperature": { + "type": "number", + "description": "Optional temperature setting to use with the model." + }, "headers": { "type": "object", "description": "Optional headers to use with the model.", @@ -2762,6 +2846,10 @@ const schema = { "thinking", "reasoning" ] + }, + "temperature": { + "type": "number", + "description": "Optional temperature setting to use with the model." } }, "required": [ @@ -2823,6 +2911,10 @@ const schema = { "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", "description": "Optional base URL." }, + "temperature": { + "type": "number", + "description": "Optional temperature setting to use with the model." + }, "headers": { "type": "object", "description": "Optional headers to use with the model.", @@ -2930,6 +3022,10 @@ const schema = { "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", "description": "Optional base URL." }, + "temperature": { + "type": "number", + "description": "Optional temperature setting to use with the model." + }, "headers": { "type": "object", "description": "Optional headers to use with the model.", diff --git a/packages/schemas/src/v3/languageModel.type.ts b/packages/schemas/src/v3/languageModel.type.ts index 6233d2a53..098af298b 100644 --- a/packages/schemas/src/v3/languageModel.type.ts +++ b/packages/schemas/src/v3/languageModel.type.ts @@ -83,6 +83,10 @@ export interface AmazonBedrockLanguageModel { * Optional base URL. */ baseUrl?: string; + /** + * Optional temperature setting to use with the model. + */ + temperature?: number; headers?: LanguageModelHeaders; } /** @@ -159,6 +163,10 @@ export interface AnthropicLanguageModel { * Optional base URL. */ baseUrl?: string; + /** + * Optional temperature setting to use with the model. + */ + temperature?: number; headers?: LanguageModelHeaders; } export interface AzureLanguageModel { @@ -210,6 +218,10 @@ export interface AzureLanguageModel { * Controls whether the model returns its reasoning process. Set to 'auto' for a condensed summary, 'detailed' for more comprehensive reasoning, or 'none' to disable. Defaults to 'auto'. */ reasoningSummary?: string; + /** + * Optional temperature setting to use with the model. + */ + temperature?: number; headers?: LanguageModelHeaders; } export interface DeepSeekLanguageModel { @@ -245,6 +257,10 @@ export interface DeepSeekLanguageModel { * Optional base URL. */ baseUrl?: string; + /** + * Optional temperature setting to use with the model. + */ + temperature?: number; headers?: LanguageModelHeaders; } export interface GoogleGenerativeAILanguageModel { @@ -280,6 +296,10 @@ export interface GoogleGenerativeAILanguageModel { * Optional base URL. */ baseUrl?: string; + /** + * Optional temperature setting to use with the model. + */ + temperature?: number; headers?: LanguageModelHeaders; } export interface GoogleVertexAnthropicLanguageModel { @@ -323,6 +343,10 @@ export interface GoogleVertexAnthropicLanguageModel { * Optional base URL. */ baseUrl?: string; + /** + * Optional temperature setting to use with the model. + */ + temperature?: number; headers?: LanguageModelHeaders; } export interface GoogleVertexLanguageModel { @@ -366,6 +390,10 @@ export interface GoogleVertexLanguageModel { * Optional base URL. */ baseUrl?: string; + /** + * Optional temperature setting to use with the model. + */ + temperature?: number; headers?: LanguageModelHeaders; } export interface MistralLanguageModel { @@ -401,6 +429,10 @@ export interface MistralLanguageModel { * Optional base URL. */ baseUrl?: string; + /** + * Optional temperature setting to use with the model. + */ + temperature?: number; headers?: LanguageModelHeaders; } export interface OpenAILanguageModel { @@ -444,6 +476,10 @@ export interface OpenAILanguageModel { * Controls whether the model returns its reasoning process. Set to 'auto' for a condensed summary, 'detailed' for more comprehensive reasoning, or 'none' to disable. Defaults to 'auto'. */ reasoningSummary?: string; + /** + * Optional temperature setting to use with the model. + */ + temperature?: number; headers?: LanguageModelHeaders; } export interface OpenAICompatibleLanguageModel { @@ -485,6 +521,10 @@ export interface OpenAICompatibleLanguageModel { * The name of the XML tag to extract reasoning from (without angle brackets). Defaults to `think`. */ reasoningTag?: string; + /** + * Optional temperature setting to use with the model. + */ + temperature?: number; } /** * Optional query parameters to include in the request url. @@ -544,6 +584,10 @@ export interface OpenRouterLanguageModel { * Optional base URL. */ baseUrl?: string; + /** + * Optional temperature setting to use with the model. + */ + temperature?: number; headers?: LanguageModelHeaders; } export interface XaiLanguageModel { @@ -579,5 +623,9 @@ export interface XaiLanguageModel { * Optional base URL. */ baseUrl?: string; + /** + * Optional temperature setting to use with the model. + */ + temperature?: number; headers?: LanguageModelHeaders; } diff --git a/packages/shared/src/env.server.ts b/packages/shared/src/env.server.ts index 62b447638..46e74fcf0 100644 --- a/packages/shared/src/env.server.ts +++ b/packages/shared/src/env.server.ts @@ -229,7 +229,10 @@ const options = { AWS_SESSION_TOKEN: z.string().optional(), AWS_REGION: z.string().optional(), - SOURCEBOT_CHAT_MODEL_TEMPERATURE: numberSchema.default(0.3), + /** + * @deprecated Use per-model `temperature` in the language model config instead. + */ + SOURCEBOT_CHAT_MODEL_TEMPERATURE: numberSchema.optional(), SOURCEBOT_CHAT_MAX_STEP_COUNT: numberSchema.default(100), DEBUG_WRITE_CHAT_MESSAGES_TO_FILE: booleanSchema.default('false'), diff --git a/packages/web/src/app/api/(server)/chat/route.ts b/packages/web/src/app/api/(server)/chat/route.ts index bf4a5488f..2ae2f9700 100644 --- a/packages/web/src/app/api/(server)/chat/route.ts +++ b/packages/web/src/app/api/(server)/chat/route.ts @@ -77,7 +77,7 @@ export const POST = apiHandler(async (req: NextRequest) => { } satisfies ServiceError; } - const { model, providerOptions } = await getAISDKLanguageModelAndOptions(languageModelConfig); + const { model, providerOptions, temperature } = await getAISDKLanguageModelAndOptions(languageModelConfig); const expandedRepos = (await Promise.all(selectedSearchScopes.map(async (scope) => { if (scope.type === 'repo') return [scope.value]; @@ -108,6 +108,7 @@ export const POST = apiHandler(async (req: NextRequest) => { model, modelName: languageModelConfig.displayName ?? languageModelConfig.model, modelProviderOptions: providerOptions, + modelTemperature: temperature, onFinish: async ({ messages }) => { await updateChatMessages({ chatId: id, messages, prisma }); }, diff --git a/packages/web/src/features/chat/agent.ts b/packages/web/src/features/chat/agent.ts index 50fff96a2..2e2676299 100644 --- a/packages/web/src/features/chat/agent.ts +++ b/packages/web/src/features/chat/agent.ts @@ -42,6 +42,7 @@ interface CreateMessageStreamResponseProps { onFinish: UIMessageStreamOnFinishCallback; onError: (error: unknown) => string; modelProviderOptions?: Record>; + modelTemperature?: number; metadata?: Partial; } @@ -53,6 +54,7 @@ export const createMessageStream = async ({ model, modelName, modelProviderOptions, + modelTemperature, onFinish, onError, }: CreateMessageStreamResponseProps) => { @@ -96,6 +98,7 @@ export const createMessageStream = async ({ const researchStream = await createAgentStream({ model, providerOptions: modelProviderOptions, + temperature: modelTemperature, inputMessages: messageHistory, inputSources: sources, selectedRepos, @@ -145,6 +148,7 @@ export const createMessageStream = async ({ interface AgentOptions { model: LanguageModel; providerOptions?: ProviderOptions; + temperature?: number; selectedRepos: string[]; inputMessages: ModelMessage[]; inputSources: Source[]; @@ -156,6 +160,7 @@ interface AgentOptions { const createAgentStream = async ({ model, providerOptions, + temperature, inputMessages, inputSources, selectedRepos, @@ -199,7 +204,7 @@ const createAgentStream = async ({ messages: inputMessages, system: systemPrompt, tools: createTools({ source: 'sourcebot-ask-agent', selectedRepos }), - temperature: env.SOURCEBOT_CHAT_MODEL_TEMPERATURE, + temperature: temperature ?? env.SOURCEBOT_CHAT_MODEL_TEMPERATURE, stopWhen: [ stepCountIsGTE(env.SOURCEBOT_CHAT_MAX_STEP_COUNT), ], diff --git a/packages/web/src/features/chat/utils.server.ts b/packages/web/src/features/chat/utils.server.ts index 3d554f8ab..929d501ed 100644 --- a/packages/web/src/features/chat/utils.server.ts +++ b/packages/web/src/features/chat/utils.server.ts @@ -160,6 +160,7 @@ User question: ${message}`; export const getAISDKLanguageModelAndOptions = async (config: LanguageModel): Promise<{ model: AISDKLanguageModelV3, providerOptions?: Record>, + temperature?: number, }> => { const { provider, model: modelId } = config; @@ -426,6 +427,7 @@ export const getAISDKLanguageModelAndOptions = async (config: LanguageModel): Pr return { model, providerOptions, + temperature: config.temperature, }; } diff --git a/packages/web/src/features/mcp/askCodebase.ts b/packages/web/src/features/mcp/askCodebase.ts index 229727747..6ca9c26a2 100644 --- a/packages/web/src/features/mcp/askCodebase.ts +++ b/packages/web/src/features/mcp/askCodebase.ts @@ -70,7 +70,7 @@ export const askCodebase = (params: AskCodebaseParams): Promise { finalMessages = messages; }, diff --git a/schemas/v3/languageModel.json b/schemas/v3/languageModel.json index 79161a852..ac8cc271e 100644 --- a/schemas/v3/languageModel.json +++ b/schemas/v3/languageModel.json @@ -44,6 +44,10 @@ "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", "description": "Optional base URL." }, + "temperature": { + "type": "number", + "description": "Optional temperature setting to use with the model." + }, "headers": { "$ref": "./shared.json#/definitions/LanguageModelHeaders" } @@ -83,6 +87,10 @@ "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", "description": "Optional base URL." }, + "temperature": { + "type": "number", + "description": "Optional temperature setting to use with the model." + }, "headers": { "$ref": "./shared.json#/definitions/LanguageModelHeaders" } @@ -146,6 +154,10 @@ "detailed" ] }, + "temperature": { + "type": "number", + "description": "Optional temperature setting to use with the model." + }, "headers": { "$ref": "./shared.json#/definitions/LanguageModelHeaders" } @@ -181,6 +193,10 @@ "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", "description": "Optional base URL." }, + "temperature": { + "type": "number", + "description": "Optional temperature setting to use with the model." + }, "headers": { "$ref": "./shared.json#/definitions/LanguageModelHeaders" } @@ -216,6 +232,10 @@ "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", "description": "Optional base URL." }, + "temperature": { + "type": "number", + "description": "Optional temperature setting to use with the model." + }, "headers": { "$ref": "./shared.json#/definitions/LanguageModelHeaders" } @@ -267,6 +287,10 @@ "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", "description": "Optional base URL." }, + "temperature": { + "type": "number", + "description": "Optional temperature setting to use with the model." + }, "headers": { "$ref": "./shared.json#/definitions/LanguageModelHeaders" } @@ -320,6 +344,10 @@ "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", "description": "Optional base URL." }, + "temperature": { + "type": "number", + "description": "Optional temperature setting to use with the model." + }, "headers": { "$ref": "./shared.json#/definitions/LanguageModelHeaders" } @@ -355,6 +383,10 @@ "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", "description": "Optional base URL." }, + "temperature": { + "type": "number", + "description": "Optional temperature setting to use with the model." + }, "headers": { "$ref": "./shared.json#/definitions/LanguageModelHeaders" } @@ -416,6 +448,10 @@ "detailed" ] }, + "temperature": { + "type": "number", + "description": "Optional temperature setting to use with the model." + }, "headers": { "$ref": "./shared.json#/definitions/LanguageModelHeaders" } @@ -469,6 +505,10 @@ "thinking", "reasoning" ] + }, + "temperature": { + "type": "number", + "description": "Optional temperature setting to use with the model." } }, "required": [ @@ -503,6 +543,10 @@ "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", "description": "Optional base URL." }, + "temperature": { + "type": "number", + "description": "Optional temperature setting to use with the model." + }, "headers": { "$ref": "./shared.json#/definitions/LanguageModelHeaders" } @@ -542,6 +586,10 @@ "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", "description": "Optional base URL." }, + "temperature": { + "type": "number", + "description": "Optional temperature setting to use with the model." + }, "headers": { "$ref": "./shared.json#/definitions/LanguageModelHeaders" } From f1c87113b986b63cfa9ca8e609ce52f3c89ec6fe Mon Sep 17 00:00:00 2001 From: Brendan Kellam Date: Thu, 9 Apr 2026 11:29:14 -0700 Subject: [PATCH 2/3] docs: add CHANGELOG entry for per-model temperature Co-Authored-By: Claude Opus 4.6 (1M context) --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 70ddcb9e2..698014047 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Linear issue links in chat responses now render as a rich card-style UI showing the Linear logo, issue identifier, and title instead of plain hyperlinks. [#1060](https://github.com/sourcebot-dev/sourcebot/pull/1060) - Added `reasoningEffort` configuration option for the Azure OpenAI provider. [#1101](https://github.com/sourcebot-dev/sourcebot/pull/1101) - Added `reasoningSummary` configuration option for the OpenAI and Azure OpenAI providers. [#1102](https://github.com/sourcebot-dev/sourcebot/pull/1102) +- Added per-model `temperature` configuration option for all language model providers. [#1103](https://github.com/sourcebot-dev/sourcebot/pull/1103) ### Changed - Links in Ask Sourcebot chat responses now open in a new tab with a subtle external link icon indicator. [#1059](https://github.com/sourcebot-dev/sourcebot/pull/1059) From 9a8de448e25861ed1fd7c8cb8723f10ccb2e79cb Mon Sep 17 00:00:00 2001 From: Brendan Kellam Date: Thu, 9 Apr 2026 11:31:19 -0700 Subject: [PATCH 3/3] docs: add CHANGELOG entry for SOURCEBOT_CHAT_MODEL_TEMPERATURE deprecation Co-Authored-By: Claude Opus 4.6 (1M context) --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 698014047..2d4d18558 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed - Links in Ask Sourcebot chat responses now open in a new tab with a subtle external link icon indicator. [#1059](https://github.com/sourcebot-dev/sourcebot/pull/1059) - Removed `/~` from the root of most app URLs. [#1076](https://github.com/sourcebot-dev/sourcebot/pull/1076) +- Deprecated `SOURCEBOT_CHAT_MODEL_TEMPERATURE` environment variable in favor of per-model `temperature` config. It no longer defaults to `0.3`; if unset and no per-model temperature is configured, temperature is not sent to the API. [#1103](https://github.com/sourcebot-dev/sourcebot/pull/1103) ## [4.16.7] - 2026-04-03