From fccb7328764d3a422a68195aa40adc8a48ccc447 Mon Sep 17 00:00:00 2001 From: Brendan Kellam Date: Thu, 9 Apr 2026 11:01:45 -0700 Subject: [PATCH 1/2] feat(web): add reasoningSummary support for OpenAI and Azure providers Adds a `reasoningSummary` configuration option that controls whether reasoning models return their reasoning process. Defaults to 'auto', can be set to 'detailed' for comprehensive reasoning or 'none' to disable. Co-Authored-By: Claude Opus 4.6 (1M context) --- .../language-model-providers.mdx | 10 ++++- docs/snippets/schemas/v3/index.schema.mdx | 40 +++++++++++++++++++ .../schemas/v3/languageModel.schema.mdx | 40 +++++++++++++++++++ packages/schemas/src/v3/index.schema.ts | 40 +++++++++++++++++++ packages/schemas/src/v3/index.type.ts | 8 ++++ .../schemas/src/v3/languageModel.schema.ts | 40 +++++++++++++++++++ packages/schemas/src/v3/languageModel.type.ts | 8 ++++ .../web/src/features/chat/utils.server.ts | 4 ++ schemas/v3/languageModel.json | 20 ++++++++++ 9 files changed, 208 insertions(+), 2 deletions(-) diff --git a/docs/docs/configuration/language-model-providers.mdx b/docs/docs/configuration/language-model-providers.mdx index d4830e26a..4fbcc1112 100644 --- a/docs/docs/configuration/language-model-providers.mdx +++ b/docs/docs/configuration/language-model-providers.mdx @@ -109,6 +109,8 @@ For a detailed description of all the providers, please refer to the [schema](ht The `model` field should be set to your Azure OpenAI deployment name. Either `resourceName` or `baseUrl` must be set. The `resourceName` is used to construct the URL `https://{resourceName}.openai.azure.com/openai/v1{path}`. If `baseUrl` is provided, `resourceName` is ignored. +The `reasoningSummary` field 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`. + ```json wrap icon="code" Example config with Azure AI provider { "$schema": "https://raw.githubusercontent.com/sourcebot-dev/sourcebot/main/schemas/v3/index.json", @@ -123,7 +125,8 @@ The `model` field should be set to your Azure OpenAI deployment name. Either `re "env": "AZURE_API_KEY" }, "baseUrl": "OPTIONAL_BASE_URL", // use instead of resourceName for custom endpoints - "reasoningEffort": "OPTIONAL_REASONING_EFFORT" // defaults to "medium" + "reasoningEffort": "OPTIONAL_REASONING_EFFORT", // defaults to "medium" + "reasoningSummary": "auto" // "auto" | "detailed" | "none". Defaults to "auto" } ] } @@ -248,6 +251,8 @@ The `model` field should be set to your Azure OpenAI deployment name. Either `re [Vercel AI SDK OpenAI Docs](https://ai-sdk.dev/providers/ai-sdk-providers/openai) +The `reasoningSummary` field 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`. + ```json wrap icon="code" Example config with OpenAI provider { "$schema": "https://raw.githubusercontent.com/sourcebot-dev/sourcebot/main/schemas/v3/index.json", @@ -260,7 +265,8 @@ The `model` field should be set to your Azure OpenAI deployment name. Either `re "env": "OPENAI_API_KEY" }, "baseUrl": "OPTIONAL_BASE_URL", - "reasoningEffort": "OPTIONAL_REASONING_EFFORT" // defaults to "medium" + "reasoningEffort": "OPTIONAL_REASONING_EFFORT", // defaults to "medium" + "reasoningSummary": "auto" // "auto" | "detailed" | "none". Defaults to "auto" } ] } diff --git a/docs/snippets/schemas/v3/index.schema.mdx b/docs/snippets/schemas/v3/index.schema.mdx index 1c1706e4c..d66c6ef17 100644 --- a/docs/snippets/schemas/v3/index.schema.mdx +++ b/docs/snippets/schemas/v3/index.schema.mdx @@ -2062,12 +2062,22 @@ "type": "string", "description": "The reasoning effort to use with the model. Defaults to `medium`. See https://platform.openai.com/docs/guides/reasoning#get-started-with-reasonings", "examples": [ + "none", "minimal", "low", "medium", "high" ] }, + "reasoningSummary": { + "type": "string", + "description": "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'.", + "examples": [ + "none", + "auto", + "detailed" + ] + }, "headers": { "type": "object", "description": "Optional headers to use with the model.", @@ -2730,12 +2740,22 @@ "type": "string", "description": "The reasoning effort to use with the model. Defaults to `medium`. See https://platform.openai.com/docs/guides/reasoning#get-started-with-reasonings", "examples": [ + "none", "minimal", "low", "medium", "high" ] }, + "reasoningSummary": { + "type": "string", + "description": "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'.", + "examples": [ + "none", + "auto", + "detailed" + ] + }, "headers": { "type": "object", "description": "Optional headers to use with the model.", @@ -3532,12 +3552,22 @@ "type": "string", "description": "The reasoning effort to use with the model. Defaults to `medium`. See https://platform.openai.com/docs/guides/reasoning#get-started-with-reasonings", "examples": [ + "none", "minimal", "low", "medium", "high" ] }, + "reasoningSummary": { + "type": "string", + "description": "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'.", + "examples": [ + "none", + "auto", + "detailed" + ] + }, "headers": { "type": "object", "description": "Optional headers to use with the model.", @@ -4200,12 +4230,22 @@ "type": "string", "description": "The reasoning effort to use with the model. Defaults to `medium`. See https://platform.openai.com/docs/guides/reasoning#get-started-with-reasonings", "examples": [ + "none", "minimal", "low", "medium", "high" ] }, + "reasoningSummary": { + "type": "string", + "description": "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'.", + "examples": [ + "none", + "auto", + "detailed" + ] + }, "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 50250147d..4e6a38b13 100644 --- a/docs/snippets/schemas/v3/languageModel.schema.mdx +++ b/docs/snippets/schemas/v3/languageModel.schema.mdx @@ -376,12 +376,22 @@ "type": "string", "description": "The reasoning effort to use with the model. Defaults to `medium`. See https://platform.openai.com/docs/guides/reasoning#get-started-with-reasonings", "examples": [ + "none", "minimal", "low", "medium", "high" ] }, + "reasoningSummary": { + "type": "string", + "description": "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'.", + "examples": [ + "none", + "auto", + "detailed" + ] + }, "headers": { "type": "object", "description": "Optional headers to use with the model.", @@ -1044,12 +1054,22 @@ "type": "string", "description": "The reasoning effort to use with the model. Defaults to `medium`. See https://platform.openai.com/docs/guides/reasoning#get-started-with-reasonings", "examples": [ + "none", "minimal", "low", "medium", "high" ] }, + "reasoningSummary": { + "type": "string", + "description": "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'.", + "examples": [ + "none", + "auto", + "detailed" + ] + }, "headers": { "type": "object", "description": "Optional headers to use with the model.", @@ -1846,12 +1866,22 @@ "type": "string", "description": "The reasoning effort to use with the model. Defaults to `medium`. See https://platform.openai.com/docs/guides/reasoning#get-started-with-reasonings", "examples": [ + "none", "minimal", "low", "medium", "high" ] }, + "reasoningSummary": { + "type": "string", + "description": "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'.", + "examples": [ + "none", + "auto", + "detailed" + ] + }, "headers": { "type": "object", "description": "Optional headers to use with the model.", @@ -2514,12 +2544,22 @@ "type": "string", "description": "The reasoning effort to use with the model. Defaults to `medium`. See https://platform.openai.com/docs/guides/reasoning#get-started-with-reasonings", "examples": [ + "none", "minimal", "low", "medium", "high" ] }, + "reasoningSummary": { + "type": "string", + "description": "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'.", + "examples": [ + "none", + "auto", + "detailed" + ] + }, "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 3ab02b0ef..b3423a29c 100644 --- a/packages/schemas/src/v3/index.schema.ts +++ b/packages/schemas/src/v3/index.schema.ts @@ -2061,12 +2061,22 @@ const schema = { "type": "string", "description": "The reasoning effort to use with the model. Defaults to `medium`. See https://platform.openai.com/docs/guides/reasoning#get-started-with-reasonings", "examples": [ + "none", "minimal", "low", "medium", "high" ] }, + "reasoningSummary": { + "type": "string", + "description": "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'.", + "examples": [ + "none", + "auto", + "detailed" + ] + }, "headers": { "type": "object", "description": "Optional headers to use with the model.", @@ -2729,12 +2739,22 @@ const schema = { "type": "string", "description": "The reasoning effort to use with the model. Defaults to `medium`. See https://platform.openai.com/docs/guides/reasoning#get-started-with-reasonings", "examples": [ + "none", "minimal", "low", "medium", "high" ] }, + "reasoningSummary": { + "type": "string", + "description": "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'.", + "examples": [ + "none", + "auto", + "detailed" + ] + }, "headers": { "type": "object", "description": "Optional headers to use with the model.", @@ -3531,12 +3551,22 @@ const schema = { "type": "string", "description": "The reasoning effort to use with the model. Defaults to `medium`. See https://platform.openai.com/docs/guides/reasoning#get-started-with-reasonings", "examples": [ + "none", "minimal", "low", "medium", "high" ] }, + "reasoningSummary": { + "type": "string", + "description": "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'.", + "examples": [ + "none", + "auto", + "detailed" + ] + }, "headers": { "type": "object", "description": "Optional headers to use with the model.", @@ -4199,12 +4229,22 @@ const schema = { "type": "string", "description": "The reasoning effort to use with the model. Defaults to `medium`. See https://platform.openai.com/docs/guides/reasoning#get-started-with-reasonings", "examples": [ + "none", "minimal", "low", "medium", "high" ] }, + "reasoningSummary": { + "type": "string", + "description": "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'.", + "examples": [ + "none", + "auto", + "detailed" + ] + }, "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 caff06e62..4ef945be9 100644 --- a/packages/schemas/src/v3/index.type.ts +++ b/packages/schemas/src/v3/index.type.ts @@ -872,6 +872,10 @@ export interface AzureLanguageModel { * The reasoning effort to use with the model. Defaults to `medium`. See https://platform.openai.com/docs/guides/reasoning#get-started-with-reasonings */ reasoningEffort?: string; + /** + * 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; headers?: LanguageModelHeaders; } export interface DeepSeekLanguageModel { @@ -1102,6 +1106,10 @@ export interface OpenAILanguageModel { * The reasoning effort to use with the model. Defaults to `medium`. See https://platform.openai.com/docs/guides/reasoning#get-started-with-reasonings */ reasoningEffort?: string; + /** + * 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; headers?: LanguageModelHeaders; } export interface OpenAICompatibleLanguageModel { diff --git a/packages/schemas/src/v3/languageModel.schema.ts b/packages/schemas/src/v3/languageModel.schema.ts index 65c2e5df3..e8eecc147 100644 --- a/packages/schemas/src/v3/languageModel.schema.ts +++ b/packages/schemas/src/v3/languageModel.schema.ts @@ -375,12 +375,22 @@ const schema = { "type": "string", "description": "The reasoning effort to use with the model. Defaults to `medium`. See https://platform.openai.com/docs/guides/reasoning#get-started-with-reasonings", "examples": [ + "none", "minimal", "low", "medium", "high" ] }, + "reasoningSummary": { + "type": "string", + "description": "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'.", + "examples": [ + "none", + "auto", + "detailed" + ] + }, "headers": { "type": "object", "description": "Optional headers to use with the model.", @@ -1043,12 +1053,22 @@ const schema = { "type": "string", "description": "The reasoning effort to use with the model. Defaults to `medium`. See https://platform.openai.com/docs/guides/reasoning#get-started-with-reasonings", "examples": [ + "none", "minimal", "low", "medium", "high" ] }, + "reasoningSummary": { + "type": "string", + "description": "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'.", + "examples": [ + "none", + "auto", + "detailed" + ] + }, "headers": { "type": "object", "description": "Optional headers to use with the model.", @@ -1845,12 +1865,22 @@ const schema = { "type": "string", "description": "The reasoning effort to use with the model. Defaults to `medium`. See https://platform.openai.com/docs/guides/reasoning#get-started-with-reasonings", "examples": [ + "none", "minimal", "low", "medium", "high" ] }, + "reasoningSummary": { + "type": "string", + "description": "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'.", + "examples": [ + "none", + "auto", + "detailed" + ] + }, "headers": { "type": "object", "description": "Optional headers to use with the model.", @@ -2513,12 +2543,22 @@ const schema = { "type": "string", "description": "The reasoning effort to use with the model. Defaults to `medium`. See https://platform.openai.com/docs/guides/reasoning#get-started-with-reasonings", "examples": [ + "none", "minimal", "low", "medium", "high" ] }, + "reasoningSummary": { + "type": "string", + "description": "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'.", + "examples": [ + "none", + "auto", + "detailed" + ] + }, "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 5741925be..6233d2a53 100644 --- a/packages/schemas/src/v3/languageModel.type.ts +++ b/packages/schemas/src/v3/languageModel.type.ts @@ -206,6 +206,10 @@ export interface AzureLanguageModel { * The reasoning effort to use with the model. Defaults to `medium`. See https://platform.openai.com/docs/guides/reasoning#get-started-with-reasonings */ reasoningEffort?: string; + /** + * 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; headers?: LanguageModelHeaders; } export interface DeepSeekLanguageModel { @@ -436,6 +440,10 @@ export interface OpenAILanguageModel { * The reasoning effort to use with the model. Defaults to `medium`. See https://platform.openai.com/docs/guides/reasoning#get-started-with-reasonings */ reasoningEffort?: string; + /** + * 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; headers?: LanguageModelHeaders; } export interface OpenAICompatibleLanguageModel { diff --git a/packages/web/src/features/chat/utils.server.ts b/packages/web/src/features/chat/utils.server.ts index 21af2e99d..3d554f8ab 100644 --- a/packages/web/src/features/chat/utils.server.ts +++ b/packages/web/src/features/chat/utils.server.ts @@ -232,11 +232,13 @@ export const getAISDKLanguageModelAndOptions = async (config: LanguageModel): Pr : undefined, }); + const reasoningSummary = config.reasoningSummary ?? 'auto'; return { model: azure(modelId), providerOptions: { openai: { reasoningEffort: config.reasoningEffort ?? 'medium', + ...(reasoningSummary !== 'none' && { reasoningSummary }), } satisfies OpenAIResponsesProviderOptions, } }; @@ -339,11 +341,13 @@ export const getAISDKLanguageModelAndOptions = async (config: LanguageModel): Pr : undefined, }); + const reasoningSummary = config.reasoningSummary ?? 'auto'; return { model: openai(modelId), providerOptions: { openai: { reasoningEffort: config.reasoningEffort ?? 'medium', + ...(reasoningSummary !== 'none' && { reasoningSummary }), } satisfies OpenAIResponsesProviderOptions, }, }; diff --git a/schemas/v3/languageModel.json b/schemas/v3/languageModel.json index f9557b556..79161a852 100644 --- a/schemas/v3/languageModel.json +++ b/schemas/v3/languageModel.json @@ -130,12 +130,22 @@ "type": "string", "description": "The reasoning effort to use with the model. Defaults to `medium`. See https://platform.openai.com/docs/guides/reasoning#get-started-with-reasonings", "examples": [ + "none", "minimal", "low", "medium", "high" ] }, + "reasoningSummary": { + "type": "string", + "description": "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'.", + "examples": [ + "none", + "auto", + "detailed" + ] + }, "headers": { "$ref": "./shared.json#/definitions/LanguageModelHeaders" } @@ -390,12 +400,22 @@ "type": "string", "description": "The reasoning effort to use with the model. Defaults to `medium`. See https://platform.openai.com/docs/guides/reasoning#get-started-with-reasonings", "examples": [ + "none", "minimal", "low", "medium", "high" ] }, + "reasoningSummary": { + "type": "string", + "description": "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'.", + "examples": [ + "none", + "auto", + "detailed" + ] + }, "headers": { "$ref": "./shared.json#/definitions/LanguageModelHeaders" } From c0ebc1da0ac1858edddf0ebc2f13073da1302f69 Mon Sep 17 00:00:00 2001 From: Brendan Kellam Date: Thu, 9 Apr 2026 11:02:08 -0700 Subject: [PATCH 2/2] docs: add CHANGELOG entry for reasoningSummary 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 041d18134..70ddcb9e2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - 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) ### 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)