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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,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)

### 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)
Expand Down
9 changes: 6 additions & 3 deletions docs/docs/configuration/language-model-providers.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -107,20 +107,23 @@ For a detailed description of all the providers, please refer to the [schema](ht

[Vercel AI SDK Azure OpenAI Docs](https://ai-sdk.dev/providers/ai-sdk-providers/azure)

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.

```json wrap icon="code" Example config with Azure AI provider
{
"$schema": "https://raw.githubusercontent.com/sourcebot-dev/sourcebot/main/schemas/v3/index.json",
"models": [
{
"provider": "azure",
"model": "YOUR_MODEL_HERE",
"model": "YOUR_DEPLOYMENT_NAME",
"displayName": "OPTIONAL_DISPLAY_NAME",
"resourceName": "YOUR_RESOURCE_NAME", // defaults to the AZURE_RESOURCE_NAME env var if not set
"apiVersion": "OPTIONAL_API_VERSION", // defaults to 'preview' if not set
"apiVersion": "OPTIONAL_API_VERSION",
"token": {
"env": "AZURE_API_KEY"
},
"baseUrl": "OPTIONAL_BASE_URL"
"baseUrl": "OPTIONAL_BASE_URL", // use instead of resourceName for custom endpoints
"reasoningEffort": "OPTIONAL_REASONING_EFFORT" // defaults to "medium"
}
]
}
Expand Down
20 changes: 20 additions & 0 deletions docs/snippets/schemas/v3/index.schema.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2058,6 +2058,16 @@
"pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$",
"description": "Use a different URL prefix for API calls. Either this or `resourceName` can be used."
},
"reasoningEffort": {
"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": [
"minimal",
"low",
"medium",
"high"
]
},
"headers": {
"type": "object",
"description": "Optional headers to use with the model.",
Expand Down Expand Up @@ -3518,6 +3528,16 @@
"pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$",
"description": "Use a different URL prefix for API calls. Either this or `resourceName` can be used."
},
"reasoningEffort": {
"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": [
"minimal",
"low",
"medium",
"high"
]
},
"headers": {
"type": "object",
"description": "Optional headers to use with the model.",
Expand Down
20 changes: 20 additions & 0 deletions docs/snippets/schemas/v3/languageModel.schema.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,16 @@
"pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$",
"description": "Use a different URL prefix for API calls. Either this or `resourceName` can be used."
},
"reasoningEffort": {
"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": [
"minimal",
"low",
"medium",
"high"
]
},
"headers": {
"type": "object",
"description": "Optional headers to use with the model.",
Expand Down Expand Up @@ -1832,6 +1842,16 @@
"pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$",
"description": "Use a different URL prefix for API calls. Either this or `resourceName` can be used."
},
"reasoningEffort": {
"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": [
"minimal",
"low",
"medium",
"high"
]
},
"headers": {
"type": "object",
"description": "Optional headers to use with the model.",
Expand Down
20 changes: 20 additions & 0 deletions packages/schemas/src/v3/index.schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2057,6 +2057,16 @@ const schema = {
"pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$",
"description": "Use a different URL prefix for API calls. Either this or `resourceName` can be used."
},
"reasoningEffort": {
"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": [
"minimal",
"low",
"medium",
"high"
]
},
"headers": {
"type": "object",
"description": "Optional headers to use with the model.",
Expand Down Expand Up @@ -3517,6 +3527,16 @@ const schema = {
"pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$",
"description": "Use a different URL prefix for API calls. Either this or `resourceName` can be used."
},
"reasoningEffort": {
"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": [
"minimal",
"low",
"medium",
"high"
]
},
"headers": {
"type": "object",
"description": "Optional headers to use with the model.",
Expand Down
4 changes: 4 additions & 0 deletions packages/schemas/src/v3/index.type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -868,6 +868,10 @@ export interface AzureLanguageModel {
* Use a different URL prefix for API calls. Either this or `resourceName` can be used.
*/
baseUrl?: string;
/**
* 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;
headers?: LanguageModelHeaders;
}
export interface DeepSeekLanguageModel {
Expand Down
20 changes: 20 additions & 0 deletions packages/schemas/src/v3/languageModel.schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,16 @@ const schema = {
"pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$",
"description": "Use a different URL prefix for API calls. Either this or `resourceName` can be used."
},
"reasoningEffort": {
"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": [
"minimal",
"low",
"medium",
"high"
]
},
"headers": {
"type": "object",
"description": "Optional headers to use with the model.",
Expand Down Expand Up @@ -1831,6 +1841,16 @@ const schema = {
"pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$",
"description": "Use a different URL prefix for API calls. Either this or `resourceName` can be used."
},
"reasoningEffort": {
"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": [
"minimal",
"low",
"medium",
"high"
]
},
"headers": {
"type": "object",
"description": "Optional headers to use with the model.",
Expand Down
4 changes: 4 additions & 0 deletions packages/schemas/src/v3/languageModel.type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,10 @@ export interface AzureLanguageModel {
* Use a different URL prefix for API calls. Either this or `resourceName` can be used.
*/
baseUrl?: string;
/**
* 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;
headers?: LanguageModelHeaders;
}
export interface DeepSeekLanguageModel {
Expand Down
5 changes: 5 additions & 0 deletions packages/web/src/features/chat/utils.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,11 @@ export const getAISDKLanguageModelAndOptions = async (config: LanguageModel): Pr

return {
model: azure(modelId),
providerOptions: {
openai: {
reasoningEffort: config.reasoningEffort ?? 'medium',
} satisfies OpenAIResponsesProviderOptions,
}
};
}
case 'deepseek': {
Expand Down
10 changes: 10 additions & 0 deletions schemas/v3/languageModel.json
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,16 @@
"pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$",
"description": "Use a different URL prefix for API calls. Either this or `resourceName` can be used."
},
"reasoningEffort": {
"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": [
"minimal",
"low",
"medium",
"high"
]
},
"headers": {
"$ref": "./shared.json#/definitions/LanguageModelHeaders"
}
Expand Down
Loading