diff --git a/docs/docs/configuration/language-model-providers.mdx b/docs/docs/configuration/language-model-providers.mdx index 8c7e8237..d372c83d 100644 --- a/docs/docs/configuration/language-model-providers.mdx +++ b/docs/docs/configuration/language-model-providers.mdx @@ -45,7 +45,7 @@ For a detailed description of all the providers, please refer to the [schema](ht ### Amazon Bedrock -[Vercel AI SDK Amazon Bedrock Docs](https://ai-sdk.dev/providers/ai-sdk-providers/amazon-bedrock) +[Vercel AI SDK Amazon Bedrock Docs](https://v5.ai-sdk.dev/providers/ai-sdk-providers/amazon-bedrock) ```json wrap icon="code" Example config with Amazon Bedrock provider { @@ -70,7 +70,7 @@ For a detailed description of all the providers, please refer to the [schema](ht ### Anthropic -[Vercel AI SDK Anthropic Docs](https://ai-sdk.dev/providers/ai-sdk-providers/anthropic) +[Vercel AI SDK Anthropic Docs](https://v5.ai-sdk.dev/providers/ai-sdk-providers/anthropic) ```json wrap icon="code" Example config with Anthropic provider { @@ -89,9 +89,53 @@ For a detailed description of all the providers, please refer to the [schema](ht } ``` +### Azure OpenAI + +[Vercel AI SDK Azure OpenAI Docs](https://v5.ai-sdk.dev/providers/ai-sdk-providers/azure) + +```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", + "displayName": "OPTIONAL_DISPLAY_NAME", + "resourceName": "YOUR_RESOURCE_NAME", // defaults to the AZURE_RESOURCE_NAME env var if not set + "apiVersion": "OPTIONAL_API_VERSION", // defailts to 'preview' if not set + "token": { + "env": "AZURE_API_KEY" + }, + "baseUrl": "OPTIONAL_BASE_URL" + } + ] +} +``` + +### Deepseek + +[Vercel AI SDK Deepseek Docs](https://v5.ai-sdk.dev/providers/ai-sdk-providers/deepseek) + +```json wrap icon="code" Example config with Deepseek provider +{ + "$schema": "https://raw.githubusercontent.com/sourcebot-dev/sourcebot/main/schemas/v3/index.json", + "models": [ + { + "provider": "deepseek", + "model": "YOUR_MODEL_HERE", + "displayName": "OPTIONAL_DISPLAY_NAME", + "token": { + "env": "DEEPSEEK_API_KEY" + }, + "baseUrl": "OPTIONAL_BASE_URL" + } + ] +} +``` + ### Google Generative AI -[Vercel AI SDK Google Generative AI Docs](https://ai-sdk.dev/providers/ai-sdk-providers/google-generative-ai) +[Vercel AI SDK Google Generative AI Docs](https://v5.ai-sdk.dev/providers/ai-sdk-providers/google-generative-ai) ```json wrap icon="code" Example config with Google Generative AI provider { @@ -115,7 +159,7 @@ For a detailed description of all the providers, please refer to the [schema](ht If you're using an Anthropic model on Google Vertex, you must define a [Google Vertex Anthropic](#google-vertex-anthropic) provider instead The `credentials` paramater here expects a **path** to a [credentials](https://console.cloud.google.com/apis/credentials) file. This file **must be in a volume mounted by Sourcebot** for it to be readable. -[Vercel AI SDK Google Vertex AI Docs](https://ai-sdk.dev/providers/ai-sdk-providers/google-vertex) +[Vercel AI SDK Google Vertex AI Docs](https://v5.ai-sdk.dev/providers/ai-sdk-providers/google-vertex) ```json wrap icon="code" Example config with Google Vertex provider { @@ -123,10 +167,10 @@ For a detailed description of all the providers, please refer to the [schema](ht "models": [ { "provider": "google-vertex", - "model": "YOUR_MODEL_HERE", // e.g., "gemini-2.0-flash-exp", "gemini-1.5-pro", "gemini-1.5-flash" + "model": "YOUR_MODEL_HERE", "displayName": "OPTIONAL_DISPLAY_NAME", "project": "YOUR_PROJECT_ID", // defaults to the GOOGLE_VERTEX_PROJECT env var if not set - "region": "YOUR_REGION_HERE", // defaults to the GOOGLE_VERTEX_REGION env var if not set, e.g., "us-central1", "us-east1", "europe-west1" + "region": "YOUR_REGION_HERE", // defaults to the GOOGLE_VERTEX_REGION env var if not set "credentials": { "env": "GOOGLE_APPLICATION_CREDENTIALS" }, @@ -141,7 +185,7 @@ For a detailed description of all the providers, please refer to the [schema](ht The `credentials` paramater here expects a **path** to a [credentials](https://console.cloud.google.com/apis/credentials) file. This file **must be in a volume mounted by Sourcebot** for it to be readable. -[Vercel AI SDK Google Vertex Anthropic Docs](https://ai-sdk.dev/providers/ai-sdk-providers/google-vertex#google-vertex-anthropic-provider-usage) +[Vercel AI SDK Google Vertex Anthropic Docs](https://v5.ai-sdk.dev/providers/ai-sdk-providers/google-vertex#google-vertex-anthropic-provider-usage) ```json wrap icon="code" Example config with Google Vertex Anthropic provider { @@ -149,10 +193,10 @@ For a detailed description of all the providers, please refer to the [schema](ht "models": [ { "provider": "google-vertex-anthropic", - "model": "YOUR_MODEL_HERE", // e.g., "claude-sonnet-4" + "model": "YOUR_MODEL_HERE", "displayName": "OPTIONAL_DISPLAY_NAME", "project": "YOUR_PROJECT_ID", // defaults to the GOOGLE_VERTEX_PROJECT env var if not set - "region": "YOUR_REGION_HERE", // defaults to the GOOGLE_VERTEX_REGION env var if not set, e.g., "us-central1", "us-east1", "europe-west1" + "region": "YOUR_REGION_HERE", // defaults to the GOOGLE_VERTEX_REGION env var if not set "credentials": { "env": "GOOGLE_APPLICATION_CREDENTIALS" }, @@ -162,9 +206,30 @@ For a detailed description of all the providers, please refer to the [schema](ht } ``` +### Mistral + +[Vercel AI SDK Mistral Docs](https://v5.ai-sdk.dev/providers/ai-sdk-providers/mistral) + +```json wrap icon="code" Example config with Mistral provider +{ + "$schema": "https://raw.githubusercontent.com/sourcebot-dev/sourcebot/main/schemas/v3/index.json", + "models": [ + { + "provider": "mistral", + "model": "YOUR_MODEL_HERE", + "displayName": "OPTIONAL_DISPLAY_NAME", + "token": { + "env": "MISTRAL_API_KEY" + }, + "baseUrl": "OPTIONAL_BASE_URL" + } + ] +} +``` + ### OpenAI -[Vercel AI SDK OpenAI Docs](https://ai-sdk.dev/providers/ai-sdk-providers/openai) +[Vercel AI SDK OpenAI Docs](https://v5.ai-sdk.dev/providers/ai-sdk-providers/openai) ```json wrap icon="code" Example config with OpenAI provider { @@ -172,7 +237,7 @@ For a detailed description of all the providers, please refer to the [schema](ht "models": [ { "provider": "openai", - "model": "YOUR_MODEL_HERE", // e.g., "gpt-4.1", "o4-mini", "o3", "o3-deep-research" + "model": "YOUR_MODEL_HERE", "displayName": "OPTIONAL_DISPLAY_NAME", "token": { "env": "OPENAI_API_KEY" @@ -181,4 +246,46 @@ For a detailed description of all the providers, please refer to the [schema](ht } ] } +``` + +### OpenRouter + +[Vercel AI SDK OpenRouter Docs](https://v5.ai-sdk.dev/providers/community-providers/openrouter) + +```json wrap icon="code" Example config with OpenRouter provider +{ + "$schema": "https://raw.githubusercontent.com/sourcebot-dev/sourcebot/main/schemas/v3/index.json", + "models": [ + { + "provider": "openai", + "model": "YOUR_MODEL_HERE", + "displayName": "OPTIONAL_DISPLAY_NAME", + "token": { + "env": "OPENROUTER_API_KEY" + }, + "baseUrl": "OPTIONAL_BASE_URL" + } + ] +} +``` + +### xAI + +[Vercel AI SDK xAI Docs](https://v5.ai-sdk.dev/providers/ai-sdk-providers/xai) + +```json wrap icon="code" Example config with xAI provider +{ + "$schema": "https://raw.githubusercontent.com/sourcebot-dev/sourcebot/main/schemas/v3/index.json", + "models": [ + { + "provider": "xai", + "model": "YOUR_MODEL_HERE", + "displayName": "OPTIONAL_DISPLAY_NAME", + "token": { + "env": "XAI_API_KEY" + }, + "baseUrl": "OPTIONAL_BASE_URL" + } + ] +} ``` \ No newline at end of file diff --git a/docs/snippets/schemas/v3/index.schema.mdx b/docs/snippets/schemas/v3/index.schema.mdx index 7e059ac6..51f483af 100644 --- a/docs/snippets/schemas/v3/index.schema.mdx +++ b/docs/snippets/schemas/v3/index.schema.mdx @@ -1144,71 +1144,6 @@ "type": "object", "title": "LanguageModel", "definitions": { - "OpenAILanguageModel": { - "type": "object", - "properties": { - "provider": { - "const": "openai", - "description": "OpenAI Configuration" - }, - "model": { - "type": "string", - "description": "The name of the language model.", - "examples": [ - "gpt-4.1", - "o4-mini", - "o3", - "o3-deep-research" - ] - }, - "displayName": { - "type": "string", - "description": "Optional display name." - }, - "token": { - "description": "Optional API key to use with the model. Defaults to the `OPENAI_API_KEY` environment variable.", - "anyOf": [ - { - "type": "object", - "properties": { - "secret": { - "type": "string", - "description": "The name of the secret that contains the token." - } - }, - "required": [ - "secret" - ], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "env": { - "type": "string", - "description": "The name of the environment variable that contains the token. Only supported in declarative connection configs." - } - }, - "required": [ - "env" - ], - "additionalProperties": false - } - ] - }, - "baseUrl": { - "type": "string", - "format": "url", - "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", - "description": "Optional base URL." - } - }, - "required": [ - "provider", - "model" - ], - "additionalProperties": false - }, "AmazonBedrockLanguageModel": { "type": "object", "properties": { @@ -1367,6 +1302,132 @@ ], "additionalProperties": false }, + "AzureLanguageModel": { + "type": "object", + "properties": { + "provider": { + "const": "azure", + "description": "Azure Configuration" + }, + "model": { + "type": "string", + "description": "The deployment name of the Azure model." + }, + "displayName": { + "type": "string", + "description": "Optional display name." + }, + "resourceName": { + "type": "string", + "description": "Azure resource name. Defaults to the `AZURE_RESOURCE_NAME` environment variable." + }, + "token": { + "description": "Optional API key to use with the model. Defaults to the `AZURE_API_KEY` environment variable.", + "anyOf": [ + { + "type": "object", + "properties": { + "secret": { + "type": "string", + "description": "The name of the secret that contains the token." + } + }, + "required": [ + "secret" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "env": { + "type": "string", + "description": "The name of the environment variable that contains the token. Only supported in declarative connection configs." + } + }, + "required": [ + "env" + ], + "additionalProperties": false + } + ] + }, + "apiVersion": { + "type": "string", + "description": "Sets a custom api version. Defaults to `preview`." + }, + "baseUrl": { + "type": "string", + "format": "url", + "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", + "description": "Use a different URL prefix for API calls. Either this or `resourceName` can be used." + } + }, + "required": [ + "provider", + "model" + ], + "additionalProperties": false + }, + "DeepSeekLanguageModel": { + "type": "object", + "properties": { + "provider": { + "const": "deepseek", + "description": "DeepSeek Configuration" + }, + "model": { + "type": "string", + "description": "The name of the language model." + }, + "displayName": { + "type": "string", + "description": "Optional display name." + }, + "token": { + "description": "Optional API key to use with the model. Defaults to the `DEEPSEEK_API_KEY` environment variable.", + "anyOf": [ + { + "type": "object", + "properties": { + "secret": { + "type": "string", + "description": "The name of the secret that contains the token." + } + }, + "required": [ + "secret" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "env": { + "type": "string", + "description": "The name of the environment variable that contains the token. Only supported in declarative connection configs." + } + }, + "required": [ + "env" + ], + "additionalProperties": false + } + ] + }, + "baseUrl": { + "type": "string", + "format": "url", + "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", + "description": "Optional base URL." + } + }, + "required": [ + "provider", + "model" + ], + "additionalProperties": false + }, "GoogleGenerativeAILanguageModel": { "type": "object", "properties": { @@ -1426,6 +1487,81 @@ ], "additionalProperties": false }, + "GoogleVertexAnthropicLanguageModel": { + "type": "object", + "properties": { + "provider": { + "const": "google-vertex-anthropic", + "description": "Google Vertex AI Anthropic Configuration" + }, + "model": { + "type": "string", + "description": "The name of the Anthropic language model running on Google Vertex.", + "examples": [ + "claude-sonnet-4" + ] + }, + "displayName": { + "type": "string", + "description": "Optional display name." + }, + "project": { + "type": "string", + "description": "The Google Cloud project ID. Defaults to the `GOOGLE_VERTEX_PROJECT` environment variable." + }, + "region": { + "type": "string", + "description": "The Google Cloud region. Defaults to the `GOOGLE_VERTEX_REGION` environment variable.", + "examples": [ + "us-central1", + "us-east1", + "europe-west1" + ] + }, + "credentials": { + "description": "Optional file path to service account credentials JSON. Defaults to the `GOOGLE_APPLICATION_CREDENTIALS` environment variable or application default credentials.", + "anyOf": [ + { + "type": "object", + "properties": { + "secret": { + "type": "string", + "description": "The name of the secret that contains the token." + } + }, + "required": [ + "secret" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "env": { + "type": "string", + "description": "The name of the environment variable that contains the token. Only supported in declarative connection configs." + } + }, + "required": [ + "env" + ], + "additionalProperties": false + } + ] + }, + "baseUrl": { + "type": "string", + "format": "url", + "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", + "description": "Optional base URL." + } + }, + "required": [ + "provider", + "model" + ], + "additionalProperties": false + }, "GoogleVertexLanguageModel": { "type": "object", "properties": { @@ -1503,39 +1639,23 @@ ], "additionalProperties": false }, - "GoogleVertexAnthropicLanguageModel": { + "MistralLanguageModel": { "type": "object", "properties": { "provider": { - "const": "google-vertex-anthropic", - "description": "Google Vertex AI Anthropic Configuration" + "const": "mistral", + "description": "Mistral AI Configuration" }, "model": { "type": "string", - "description": "The name of the Anthropic language model running on Google Vertex.", - "examples": [ - "claude-sonnet-4" - ] + "description": "The name of the language model." }, "displayName": { "type": "string", "description": "Optional display name." }, - "project": { - "type": "string", - "description": "The Google Cloud project ID. Defaults to the `GOOGLE_VERTEX_PROJECT` environment variable." - }, - "region": { - "type": "string", - "description": "The Google Cloud region. Defaults to the `GOOGLE_VERTEX_REGION` environment variable.", - "examples": [ - "us-central1", - "us-east1", - "europe-west1" - ] - }, - "credentials": { - "description": "Optional file path to service account credentials JSON. Defaults to the `GOOGLE_APPLICATION_CREDENTIALS` environment variable or application default credentials.", + "token": { + "description": "Optional API key to use with the model. Defaults to the `MISTRAL_API_KEY` environment variable.", "anyOf": [ { "type": "object", @@ -1577,10 +1697,8 @@ "model" ], "additionalProperties": false - } - }, - "oneOf": [ - { + }, + "OpenAILanguageModel": { "type": "object", "properties": { "provider": { @@ -1645,6 +1763,130 @@ ], "additionalProperties": false }, + "OpenRouterLanguageModel": { + "type": "object", + "properties": { + "provider": { + "const": "openrouter", + "description": "OpenRouter Configuration" + }, + "model": { + "type": "string", + "description": "The name of the language model." + }, + "displayName": { + "type": "string", + "description": "Optional display name." + }, + "token": { + "description": "Optional API key to use with the model. Defaults to the `OPENROUTER_API_KEY` environment variable.", + "anyOf": [ + { + "type": "object", + "properties": { + "secret": { + "type": "string", + "description": "The name of the secret that contains the token." + } + }, + "required": [ + "secret" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "env": { + "type": "string", + "description": "The name of the environment variable that contains the token. Only supported in declarative connection configs." + } + }, + "required": [ + "env" + ], + "additionalProperties": false + } + ] + }, + "baseUrl": { + "type": "string", + "format": "url", + "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", + "description": "Optional base URL." + } + }, + "required": [ + "provider", + "model" + ], + "additionalProperties": false + }, + "XaiLanguageModel": { + "type": "object", + "properties": { + "provider": { + "const": "xai", + "description": "xAI Configuration" + }, + "model": { + "type": "string", + "description": "The name of the language model.", + "examples": [ + "grok-beta", + "grok-vision-beta" + ] + }, + "displayName": { + "type": "string", + "description": "Optional display name." + }, + "token": { + "description": "Optional API key to use with the model. Defaults to the `XAI_API_KEY` environment variable.", + "anyOf": [ + { + "type": "object", + "properties": { + "secret": { + "type": "string", + "description": "The name of the secret that contains the token." + } + }, + "required": [ + "secret" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "env": { + "type": "string", + "description": "The name of the environment variable that contains the token. Only supported in declarative connection configs." + } + }, + "required": [ + "env" + ], + "additionalProperties": false + } + ] + }, + "baseUrl": { + "type": "string", + "format": "url", + "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", + "description": "Optional base URL." + } + }, + "required": [ + "provider", + "model" + ], + "additionalProperties": false + } + }, + "oneOf": [ { "type": "object", "properties": { @@ -1803,6 +2045,132 @@ ], "additionalProperties": false }, + { + "type": "object", + "properties": { + "provider": { + "const": "azure", + "description": "Azure Configuration" + }, + "model": { + "type": "string", + "description": "The deployment name of the Azure model." + }, + "displayName": { + "type": "string", + "description": "Optional display name." + }, + "resourceName": { + "type": "string", + "description": "Azure resource name. Defaults to the `AZURE_RESOURCE_NAME` environment variable." + }, + "token": { + "description": "Optional API key to use with the model. Defaults to the `AZURE_API_KEY` environment variable.", + "anyOf": [ + { + "type": "object", + "properties": { + "secret": { + "type": "string", + "description": "The name of the secret that contains the token." + } + }, + "required": [ + "secret" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "env": { + "type": "string", + "description": "The name of the environment variable that contains the token. Only supported in declarative connection configs." + } + }, + "required": [ + "env" + ], + "additionalProperties": false + } + ] + }, + "apiVersion": { + "type": "string", + "description": "Sets a custom api version. Defaults to `preview`." + }, + "baseUrl": { + "type": "string", + "format": "url", + "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", + "description": "Use a different URL prefix for API calls. Either this or `resourceName` can be used." + } + }, + "required": [ + "provider", + "model" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "provider": { + "const": "deepseek", + "description": "DeepSeek Configuration" + }, + "model": { + "type": "string", + "description": "The name of the language model." + }, + "displayName": { + "type": "string", + "description": "Optional display name." + }, + "token": { + "description": "Optional API key to use with the model. Defaults to the `DEEPSEEK_API_KEY` environment variable.", + "anyOf": [ + { + "type": "object", + "properties": { + "secret": { + "type": "string", + "description": "The name of the secret that contains the token." + } + }, + "required": [ + "secret" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "env": { + "type": "string", + "description": "The name of the environment variable that contains the token. Only supported in declarative connection configs." + } + }, + "required": [ + "env" + ], + "additionalProperties": false + } + ] + }, + "baseUrl": { + "type": "string", + "format": "url", + "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", + "description": "Optional base URL." + } + }, + "required": [ + "provider", + "model" + ], + "additionalProperties": false + }, { "type": "object", "properties": { @@ -1862,6 +2230,81 @@ ], "additionalProperties": false }, + { + "type": "object", + "properties": { + "provider": { + "const": "google-vertex-anthropic", + "description": "Google Vertex AI Anthropic Configuration" + }, + "model": { + "type": "string", + "description": "The name of the Anthropic language model running on Google Vertex.", + "examples": [ + "claude-sonnet-4" + ] + }, + "displayName": { + "type": "string", + "description": "Optional display name." + }, + "project": { + "type": "string", + "description": "The Google Cloud project ID. Defaults to the `GOOGLE_VERTEX_PROJECT` environment variable." + }, + "region": { + "type": "string", + "description": "The Google Cloud region. Defaults to the `GOOGLE_VERTEX_REGION` environment variable.", + "examples": [ + "us-central1", + "us-east1", + "europe-west1" + ] + }, + "credentials": { + "description": "Optional file path to service account credentials JSON. Defaults to the `GOOGLE_APPLICATION_CREDENTIALS` environment variable or application default credentials.", + "anyOf": [ + { + "type": "object", + "properties": { + "secret": { + "type": "string", + "description": "The name of the secret that contains the token." + } + }, + "required": [ + "secret" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "env": { + "type": "string", + "description": "The name of the environment variable that contains the token. Only supported in declarative connection configs." + } + }, + "required": [ + "env" + ], + "additionalProperties": false + } + ] + }, + "baseUrl": { + "type": "string", + "format": "url", + "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", + "description": "Optional base URL." + } + }, + "required": [ + "provider", + "model" + ], + "additionalProperties": false + }, { "type": "object", "properties": { @@ -1943,35 +2386,206 @@ "type": "object", "properties": { "provider": { - "const": "google-vertex-anthropic", - "description": "Google Vertex AI Anthropic Configuration" + "const": "mistral", + "description": "Mistral AI Configuration" }, "model": { "type": "string", - "description": "The name of the Anthropic language model running on Google Vertex.", + "description": "The name of the language model." + }, + "displayName": { + "type": "string", + "description": "Optional display name." + }, + "token": { + "description": "Optional API key to use with the model. Defaults to the `MISTRAL_API_KEY` environment variable.", + "anyOf": [ + { + "type": "object", + "properties": { + "secret": { + "type": "string", + "description": "The name of the secret that contains the token." + } + }, + "required": [ + "secret" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "env": { + "type": "string", + "description": "The name of the environment variable that contains the token. Only supported in declarative connection configs." + } + }, + "required": [ + "env" + ], + "additionalProperties": false + } + ] + }, + "baseUrl": { + "type": "string", + "format": "url", + "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", + "description": "Optional base URL." + } + }, + "required": [ + "provider", + "model" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "provider": { + "const": "openai", + "description": "OpenAI Configuration" + }, + "model": { + "type": "string", + "description": "The name of the language model.", "examples": [ - "claude-sonnet-4" + "gpt-4.1", + "o4-mini", + "o3", + "o3-deep-research" ] }, "displayName": { "type": "string", "description": "Optional display name." }, - "project": { - "type": "string", - "description": "The Google Cloud project ID. Defaults to the `GOOGLE_VERTEX_PROJECT` environment variable." - }, - "region": { - "type": "string", - "description": "The Google Cloud region. Defaults to the `GOOGLE_VERTEX_REGION` environment variable.", - "examples": [ - "us-central1", - "us-east1", - "europe-west1" + "token": { + "description": "Optional API key to use with the model. Defaults to the `OPENAI_API_KEY` environment variable.", + "anyOf": [ + { + "type": "object", + "properties": { + "secret": { + "type": "string", + "description": "The name of the secret that contains the token." + } + }, + "required": [ + "secret" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "env": { + "type": "string", + "description": "The name of the environment variable that contains the token. Only supported in declarative connection configs." + } + }, + "required": [ + "env" + ], + "additionalProperties": false + } ] }, - "credentials": { - "description": "Optional file path to service account credentials JSON. Defaults to the `GOOGLE_APPLICATION_CREDENTIALS` environment variable or application default credentials.", + "baseUrl": { + "type": "string", + "format": "url", + "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", + "description": "Optional base URL." + } + }, + "required": [ + "provider", + "model" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "provider": { + "const": "openrouter", + "description": "OpenRouter Configuration" + }, + "model": { + "type": "string", + "description": "The name of the language model." + }, + "displayName": { + "type": "string", + "description": "Optional display name." + }, + "token": { + "description": "Optional API key to use with the model. Defaults to the `OPENROUTER_API_KEY` environment variable.", + "anyOf": [ + { + "type": "object", + "properties": { + "secret": { + "type": "string", + "description": "The name of the secret that contains the token." + } + }, + "required": [ + "secret" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "env": { + "type": "string", + "description": "The name of the environment variable that contains the token. Only supported in declarative connection configs." + } + }, + "required": [ + "env" + ], + "additionalProperties": false + } + ] + }, + "baseUrl": { + "type": "string", + "format": "url", + "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", + "description": "Optional base URL." + } + }, + "required": [ + "provider", + "model" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "provider": { + "const": "xai", + "description": "xAI Configuration" + }, + "model": { + "type": "string", + "description": "The name of the language model.", + "examples": [ + "grok-beta", + "grok-vision-beta" + ] + }, + "displayName": { + "type": "string", + "description": "Optional display name." + }, + "token": { + "description": "Optional API key to use with the model. Defaults to the `XAI_API_KEY` environment variable.", "anyOf": [ { "type": "object", diff --git a/docs/snippets/schemas/v3/languageModel.schema.mdx b/docs/snippets/schemas/v3/languageModel.schema.mdx index bca6b477..2df94d6f 100644 --- a/docs/snippets/schemas/v3/languageModel.schema.mdx +++ b/docs/snippets/schemas/v3/languageModel.schema.mdx @@ -4,71 +4,6 @@ "type": "object", "title": "LanguageModel", "definitions": { - "OpenAILanguageModel": { - "type": "object", - "properties": { - "provider": { - "const": "openai", - "description": "OpenAI Configuration" - }, - "model": { - "type": "string", - "description": "The name of the language model.", - "examples": [ - "gpt-4.1", - "o4-mini", - "o3", - "o3-deep-research" - ] - }, - "displayName": { - "type": "string", - "description": "Optional display name." - }, - "token": { - "description": "Optional API key to use with the model. Defaults to the `OPENAI_API_KEY` environment variable.", - "anyOf": [ - { - "type": "object", - "properties": { - "secret": { - "type": "string", - "description": "The name of the secret that contains the token." - } - }, - "required": [ - "secret" - ], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "env": { - "type": "string", - "description": "The name of the environment variable that contains the token. Only supported in declarative connection configs." - } - }, - "required": [ - "env" - ], - "additionalProperties": false - } - ] - }, - "baseUrl": { - "type": "string", - "format": "url", - "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", - "description": "Optional base URL." - } - }, - "required": [ - "provider", - "model" - ], - "additionalProperties": false - }, "AmazonBedrockLanguageModel": { "type": "object", "properties": { @@ -227,6 +162,132 @@ ], "additionalProperties": false }, + "AzureLanguageModel": { + "type": "object", + "properties": { + "provider": { + "const": "azure", + "description": "Azure Configuration" + }, + "model": { + "type": "string", + "description": "The deployment name of the Azure model." + }, + "displayName": { + "type": "string", + "description": "Optional display name." + }, + "resourceName": { + "type": "string", + "description": "Azure resource name. Defaults to the `AZURE_RESOURCE_NAME` environment variable." + }, + "token": { + "description": "Optional API key to use with the model. Defaults to the `AZURE_API_KEY` environment variable.", + "anyOf": [ + { + "type": "object", + "properties": { + "secret": { + "type": "string", + "description": "The name of the secret that contains the token." + } + }, + "required": [ + "secret" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "env": { + "type": "string", + "description": "The name of the environment variable that contains the token. Only supported in declarative connection configs." + } + }, + "required": [ + "env" + ], + "additionalProperties": false + } + ] + }, + "apiVersion": { + "type": "string", + "description": "Sets a custom api version. Defaults to `preview`." + }, + "baseUrl": { + "type": "string", + "format": "url", + "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", + "description": "Use a different URL prefix for API calls. Either this or `resourceName` can be used." + } + }, + "required": [ + "provider", + "model" + ], + "additionalProperties": false + }, + "DeepSeekLanguageModel": { + "type": "object", + "properties": { + "provider": { + "const": "deepseek", + "description": "DeepSeek Configuration" + }, + "model": { + "type": "string", + "description": "The name of the language model." + }, + "displayName": { + "type": "string", + "description": "Optional display name." + }, + "token": { + "description": "Optional API key to use with the model. Defaults to the `DEEPSEEK_API_KEY` environment variable.", + "anyOf": [ + { + "type": "object", + "properties": { + "secret": { + "type": "string", + "description": "The name of the secret that contains the token." + } + }, + "required": [ + "secret" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "env": { + "type": "string", + "description": "The name of the environment variable that contains the token. Only supported in declarative connection configs." + } + }, + "required": [ + "env" + ], + "additionalProperties": false + } + ] + }, + "baseUrl": { + "type": "string", + "format": "url", + "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", + "description": "Optional base URL." + } + }, + "required": [ + "provider", + "model" + ], + "additionalProperties": false + }, "GoogleGenerativeAILanguageModel": { "type": "object", "properties": { @@ -286,6 +347,81 @@ ], "additionalProperties": false }, + "GoogleVertexAnthropicLanguageModel": { + "type": "object", + "properties": { + "provider": { + "const": "google-vertex-anthropic", + "description": "Google Vertex AI Anthropic Configuration" + }, + "model": { + "type": "string", + "description": "The name of the Anthropic language model running on Google Vertex.", + "examples": [ + "claude-sonnet-4" + ] + }, + "displayName": { + "type": "string", + "description": "Optional display name." + }, + "project": { + "type": "string", + "description": "The Google Cloud project ID. Defaults to the `GOOGLE_VERTEX_PROJECT` environment variable." + }, + "region": { + "type": "string", + "description": "The Google Cloud region. Defaults to the `GOOGLE_VERTEX_REGION` environment variable.", + "examples": [ + "us-central1", + "us-east1", + "europe-west1" + ] + }, + "credentials": { + "description": "Optional file path to service account credentials JSON. Defaults to the `GOOGLE_APPLICATION_CREDENTIALS` environment variable or application default credentials.", + "anyOf": [ + { + "type": "object", + "properties": { + "secret": { + "type": "string", + "description": "The name of the secret that contains the token." + } + }, + "required": [ + "secret" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "env": { + "type": "string", + "description": "The name of the environment variable that contains the token. Only supported in declarative connection configs." + } + }, + "required": [ + "env" + ], + "additionalProperties": false + } + ] + }, + "baseUrl": { + "type": "string", + "format": "url", + "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", + "description": "Optional base URL." + } + }, + "required": [ + "provider", + "model" + ], + "additionalProperties": false + }, "GoogleVertexLanguageModel": { "type": "object", "properties": { @@ -363,39 +499,23 @@ ], "additionalProperties": false }, - "GoogleVertexAnthropicLanguageModel": { + "MistralLanguageModel": { "type": "object", "properties": { "provider": { - "const": "google-vertex-anthropic", - "description": "Google Vertex AI Anthropic Configuration" + "const": "mistral", + "description": "Mistral AI Configuration" }, "model": { "type": "string", - "description": "The name of the Anthropic language model running on Google Vertex.", - "examples": [ - "claude-sonnet-4" - ] + "description": "The name of the language model." }, "displayName": { "type": "string", "description": "Optional display name." }, - "project": { - "type": "string", - "description": "The Google Cloud project ID. Defaults to the `GOOGLE_VERTEX_PROJECT` environment variable." - }, - "region": { - "type": "string", - "description": "The Google Cloud region. Defaults to the `GOOGLE_VERTEX_REGION` environment variable.", - "examples": [ - "us-central1", - "us-east1", - "europe-west1" - ] - }, - "credentials": { - "description": "Optional file path to service account credentials JSON. Defaults to the `GOOGLE_APPLICATION_CREDENTIALS` environment variable or application default credentials.", + "token": { + "description": "Optional API key to use with the model. Defaults to the `MISTRAL_API_KEY` environment variable.", "anyOf": [ { "type": "object", @@ -437,10 +557,8 @@ "model" ], "additionalProperties": false - } - }, - "oneOf": [ - { + }, + "OpenAILanguageModel": { "type": "object", "properties": { "provider": { @@ -505,6 +623,130 @@ ], "additionalProperties": false }, + "OpenRouterLanguageModel": { + "type": "object", + "properties": { + "provider": { + "const": "openrouter", + "description": "OpenRouter Configuration" + }, + "model": { + "type": "string", + "description": "The name of the language model." + }, + "displayName": { + "type": "string", + "description": "Optional display name." + }, + "token": { + "description": "Optional API key to use with the model. Defaults to the `OPENROUTER_API_KEY` environment variable.", + "anyOf": [ + { + "type": "object", + "properties": { + "secret": { + "type": "string", + "description": "The name of the secret that contains the token." + } + }, + "required": [ + "secret" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "env": { + "type": "string", + "description": "The name of the environment variable that contains the token. Only supported in declarative connection configs." + } + }, + "required": [ + "env" + ], + "additionalProperties": false + } + ] + }, + "baseUrl": { + "type": "string", + "format": "url", + "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", + "description": "Optional base URL." + } + }, + "required": [ + "provider", + "model" + ], + "additionalProperties": false + }, + "XaiLanguageModel": { + "type": "object", + "properties": { + "provider": { + "const": "xai", + "description": "xAI Configuration" + }, + "model": { + "type": "string", + "description": "The name of the language model.", + "examples": [ + "grok-beta", + "grok-vision-beta" + ] + }, + "displayName": { + "type": "string", + "description": "Optional display name." + }, + "token": { + "description": "Optional API key to use with the model. Defaults to the `XAI_API_KEY` environment variable.", + "anyOf": [ + { + "type": "object", + "properties": { + "secret": { + "type": "string", + "description": "The name of the secret that contains the token." + } + }, + "required": [ + "secret" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "env": { + "type": "string", + "description": "The name of the environment variable that contains the token. Only supported in declarative connection configs." + } + }, + "required": [ + "env" + ], + "additionalProperties": false + } + ] + }, + "baseUrl": { + "type": "string", + "format": "url", + "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", + "description": "Optional base URL." + } + }, + "required": [ + "provider", + "model" + ], + "additionalProperties": false + } + }, + "oneOf": [ { "type": "object", "properties": { @@ -663,6 +905,132 @@ ], "additionalProperties": false }, + { + "type": "object", + "properties": { + "provider": { + "const": "azure", + "description": "Azure Configuration" + }, + "model": { + "type": "string", + "description": "The deployment name of the Azure model." + }, + "displayName": { + "type": "string", + "description": "Optional display name." + }, + "resourceName": { + "type": "string", + "description": "Azure resource name. Defaults to the `AZURE_RESOURCE_NAME` environment variable." + }, + "token": { + "description": "Optional API key to use with the model. Defaults to the `AZURE_API_KEY` environment variable.", + "anyOf": [ + { + "type": "object", + "properties": { + "secret": { + "type": "string", + "description": "The name of the secret that contains the token." + } + }, + "required": [ + "secret" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "env": { + "type": "string", + "description": "The name of the environment variable that contains the token. Only supported in declarative connection configs." + } + }, + "required": [ + "env" + ], + "additionalProperties": false + } + ] + }, + "apiVersion": { + "type": "string", + "description": "Sets a custom api version. Defaults to `preview`." + }, + "baseUrl": { + "type": "string", + "format": "url", + "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", + "description": "Use a different URL prefix for API calls. Either this or `resourceName` can be used." + } + }, + "required": [ + "provider", + "model" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "provider": { + "const": "deepseek", + "description": "DeepSeek Configuration" + }, + "model": { + "type": "string", + "description": "The name of the language model." + }, + "displayName": { + "type": "string", + "description": "Optional display name." + }, + "token": { + "description": "Optional API key to use with the model. Defaults to the `DEEPSEEK_API_KEY` environment variable.", + "anyOf": [ + { + "type": "object", + "properties": { + "secret": { + "type": "string", + "description": "The name of the secret that contains the token." + } + }, + "required": [ + "secret" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "env": { + "type": "string", + "description": "The name of the environment variable that contains the token. Only supported in declarative connection configs." + } + }, + "required": [ + "env" + ], + "additionalProperties": false + } + ] + }, + "baseUrl": { + "type": "string", + "format": "url", + "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", + "description": "Optional base URL." + } + }, + "required": [ + "provider", + "model" + ], + "additionalProperties": false + }, { "type": "object", "properties": { @@ -722,6 +1090,81 @@ ], "additionalProperties": false }, + { + "type": "object", + "properties": { + "provider": { + "const": "google-vertex-anthropic", + "description": "Google Vertex AI Anthropic Configuration" + }, + "model": { + "type": "string", + "description": "The name of the Anthropic language model running on Google Vertex.", + "examples": [ + "claude-sonnet-4" + ] + }, + "displayName": { + "type": "string", + "description": "Optional display name." + }, + "project": { + "type": "string", + "description": "The Google Cloud project ID. Defaults to the `GOOGLE_VERTEX_PROJECT` environment variable." + }, + "region": { + "type": "string", + "description": "The Google Cloud region. Defaults to the `GOOGLE_VERTEX_REGION` environment variable.", + "examples": [ + "us-central1", + "us-east1", + "europe-west1" + ] + }, + "credentials": { + "description": "Optional file path to service account credentials JSON. Defaults to the `GOOGLE_APPLICATION_CREDENTIALS` environment variable or application default credentials.", + "anyOf": [ + { + "type": "object", + "properties": { + "secret": { + "type": "string", + "description": "The name of the secret that contains the token." + } + }, + "required": [ + "secret" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "env": { + "type": "string", + "description": "The name of the environment variable that contains the token. Only supported in declarative connection configs." + } + }, + "required": [ + "env" + ], + "additionalProperties": false + } + ] + }, + "baseUrl": { + "type": "string", + "format": "url", + "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", + "description": "Optional base URL." + } + }, + "required": [ + "provider", + "model" + ], + "additionalProperties": false + }, { "type": "object", "properties": { @@ -803,35 +1246,206 @@ "type": "object", "properties": { "provider": { - "const": "google-vertex-anthropic", - "description": "Google Vertex AI Anthropic Configuration" + "const": "mistral", + "description": "Mistral AI Configuration" }, "model": { "type": "string", - "description": "The name of the Anthropic language model running on Google Vertex.", + "description": "The name of the language model." + }, + "displayName": { + "type": "string", + "description": "Optional display name." + }, + "token": { + "description": "Optional API key to use with the model. Defaults to the `MISTRAL_API_KEY` environment variable.", + "anyOf": [ + { + "type": "object", + "properties": { + "secret": { + "type": "string", + "description": "The name of the secret that contains the token." + } + }, + "required": [ + "secret" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "env": { + "type": "string", + "description": "The name of the environment variable that contains the token. Only supported in declarative connection configs." + } + }, + "required": [ + "env" + ], + "additionalProperties": false + } + ] + }, + "baseUrl": { + "type": "string", + "format": "url", + "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", + "description": "Optional base URL." + } + }, + "required": [ + "provider", + "model" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "provider": { + "const": "openai", + "description": "OpenAI Configuration" + }, + "model": { + "type": "string", + "description": "The name of the language model.", "examples": [ - "claude-sonnet-4" + "gpt-4.1", + "o4-mini", + "o3", + "o3-deep-research" ] }, "displayName": { "type": "string", "description": "Optional display name." }, - "project": { - "type": "string", - "description": "The Google Cloud project ID. Defaults to the `GOOGLE_VERTEX_PROJECT` environment variable." - }, - "region": { - "type": "string", - "description": "The Google Cloud region. Defaults to the `GOOGLE_VERTEX_REGION` environment variable.", - "examples": [ - "us-central1", - "us-east1", - "europe-west1" + "token": { + "description": "Optional API key to use with the model. Defaults to the `OPENAI_API_KEY` environment variable.", + "anyOf": [ + { + "type": "object", + "properties": { + "secret": { + "type": "string", + "description": "The name of the secret that contains the token." + } + }, + "required": [ + "secret" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "env": { + "type": "string", + "description": "The name of the environment variable that contains the token. Only supported in declarative connection configs." + } + }, + "required": [ + "env" + ], + "additionalProperties": false + } ] }, - "credentials": { - "description": "Optional file path to service account credentials JSON. Defaults to the `GOOGLE_APPLICATION_CREDENTIALS` environment variable or application default credentials.", + "baseUrl": { + "type": "string", + "format": "url", + "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", + "description": "Optional base URL." + } + }, + "required": [ + "provider", + "model" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "provider": { + "const": "openrouter", + "description": "OpenRouter Configuration" + }, + "model": { + "type": "string", + "description": "The name of the language model." + }, + "displayName": { + "type": "string", + "description": "Optional display name." + }, + "token": { + "description": "Optional API key to use with the model. Defaults to the `OPENROUTER_API_KEY` environment variable.", + "anyOf": [ + { + "type": "object", + "properties": { + "secret": { + "type": "string", + "description": "The name of the secret that contains the token." + } + }, + "required": [ + "secret" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "env": { + "type": "string", + "description": "The name of the environment variable that contains the token. Only supported in declarative connection configs." + } + }, + "required": [ + "env" + ], + "additionalProperties": false + } + ] + }, + "baseUrl": { + "type": "string", + "format": "url", + "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", + "description": "Optional base URL." + } + }, + "required": [ + "provider", + "model" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "provider": { + "const": "xai", + "description": "xAI Configuration" + }, + "model": { + "type": "string", + "description": "The name of the language model.", + "examples": [ + "grok-beta", + "grok-vision-beta" + ] + }, + "displayName": { + "type": "string", + "description": "Optional display name." + }, + "token": { + "description": "Optional API key to use with the model. Defaults to the `XAI_API_KEY` environment variable.", "anyOf": [ { "type": "object", diff --git a/packages/schemas/src/v3/index.schema.ts b/packages/schemas/src/v3/index.schema.ts index c44a6b52..e5bdbf1f 100644 --- a/packages/schemas/src/v3/index.schema.ts +++ b/packages/schemas/src/v3/index.schema.ts @@ -1143,71 +1143,6 @@ const schema = { "type": "object", "title": "LanguageModel", "definitions": { - "OpenAILanguageModel": { - "type": "object", - "properties": { - "provider": { - "const": "openai", - "description": "OpenAI Configuration" - }, - "model": { - "type": "string", - "description": "The name of the language model.", - "examples": [ - "gpt-4.1", - "o4-mini", - "o3", - "o3-deep-research" - ] - }, - "displayName": { - "type": "string", - "description": "Optional display name." - }, - "token": { - "description": "Optional API key to use with the model. Defaults to the `OPENAI_API_KEY` environment variable.", - "anyOf": [ - { - "type": "object", - "properties": { - "secret": { - "type": "string", - "description": "The name of the secret that contains the token." - } - }, - "required": [ - "secret" - ], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "env": { - "type": "string", - "description": "The name of the environment variable that contains the token. Only supported in declarative connection configs." - } - }, - "required": [ - "env" - ], - "additionalProperties": false - } - ] - }, - "baseUrl": { - "type": "string", - "format": "url", - "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", - "description": "Optional base URL." - } - }, - "required": [ - "provider", - "model" - ], - "additionalProperties": false - }, "AmazonBedrockLanguageModel": { "type": "object", "properties": { @@ -1366,6 +1301,132 @@ const schema = { ], "additionalProperties": false }, + "AzureLanguageModel": { + "type": "object", + "properties": { + "provider": { + "const": "azure", + "description": "Azure Configuration" + }, + "model": { + "type": "string", + "description": "The deployment name of the Azure model." + }, + "displayName": { + "type": "string", + "description": "Optional display name." + }, + "resourceName": { + "type": "string", + "description": "Azure resource name. Defaults to the `AZURE_RESOURCE_NAME` environment variable." + }, + "token": { + "description": "Optional API key to use with the model. Defaults to the `AZURE_API_KEY` environment variable.", + "anyOf": [ + { + "type": "object", + "properties": { + "secret": { + "type": "string", + "description": "The name of the secret that contains the token." + } + }, + "required": [ + "secret" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "env": { + "type": "string", + "description": "The name of the environment variable that contains the token. Only supported in declarative connection configs." + } + }, + "required": [ + "env" + ], + "additionalProperties": false + } + ] + }, + "apiVersion": { + "type": "string", + "description": "Sets a custom api version. Defaults to `preview`." + }, + "baseUrl": { + "type": "string", + "format": "url", + "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", + "description": "Use a different URL prefix for API calls. Either this or `resourceName` can be used." + } + }, + "required": [ + "provider", + "model" + ], + "additionalProperties": false + }, + "DeepSeekLanguageModel": { + "type": "object", + "properties": { + "provider": { + "const": "deepseek", + "description": "DeepSeek Configuration" + }, + "model": { + "type": "string", + "description": "The name of the language model." + }, + "displayName": { + "type": "string", + "description": "Optional display name." + }, + "token": { + "description": "Optional API key to use with the model. Defaults to the `DEEPSEEK_API_KEY` environment variable.", + "anyOf": [ + { + "type": "object", + "properties": { + "secret": { + "type": "string", + "description": "The name of the secret that contains the token." + } + }, + "required": [ + "secret" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "env": { + "type": "string", + "description": "The name of the environment variable that contains the token. Only supported in declarative connection configs." + } + }, + "required": [ + "env" + ], + "additionalProperties": false + } + ] + }, + "baseUrl": { + "type": "string", + "format": "url", + "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", + "description": "Optional base URL." + } + }, + "required": [ + "provider", + "model" + ], + "additionalProperties": false + }, "GoogleGenerativeAILanguageModel": { "type": "object", "properties": { @@ -1425,6 +1486,81 @@ const schema = { ], "additionalProperties": false }, + "GoogleVertexAnthropicLanguageModel": { + "type": "object", + "properties": { + "provider": { + "const": "google-vertex-anthropic", + "description": "Google Vertex AI Anthropic Configuration" + }, + "model": { + "type": "string", + "description": "The name of the Anthropic language model running on Google Vertex.", + "examples": [ + "claude-sonnet-4" + ] + }, + "displayName": { + "type": "string", + "description": "Optional display name." + }, + "project": { + "type": "string", + "description": "The Google Cloud project ID. Defaults to the `GOOGLE_VERTEX_PROJECT` environment variable." + }, + "region": { + "type": "string", + "description": "The Google Cloud region. Defaults to the `GOOGLE_VERTEX_REGION` environment variable.", + "examples": [ + "us-central1", + "us-east1", + "europe-west1" + ] + }, + "credentials": { + "description": "Optional file path to service account credentials JSON. Defaults to the `GOOGLE_APPLICATION_CREDENTIALS` environment variable or application default credentials.", + "anyOf": [ + { + "type": "object", + "properties": { + "secret": { + "type": "string", + "description": "The name of the secret that contains the token." + } + }, + "required": [ + "secret" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "env": { + "type": "string", + "description": "The name of the environment variable that contains the token. Only supported in declarative connection configs." + } + }, + "required": [ + "env" + ], + "additionalProperties": false + } + ] + }, + "baseUrl": { + "type": "string", + "format": "url", + "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", + "description": "Optional base URL." + } + }, + "required": [ + "provider", + "model" + ], + "additionalProperties": false + }, "GoogleVertexLanguageModel": { "type": "object", "properties": { @@ -1502,39 +1638,23 @@ const schema = { ], "additionalProperties": false }, - "GoogleVertexAnthropicLanguageModel": { + "MistralLanguageModel": { "type": "object", "properties": { "provider": { - "const": "google-vertex-anthropic", - "description": "Google Vertex AI Anthropic Configuration" + "const": "mistral", + "description": "Mistral AI Configuration" }, "model": { "type": "string", - "description": "The name of the Anthropic language model running on Google Vertex.", - "examples": [ - "claude-sonnet-4" - ] + "description": "The name of the language model." }, "displayName": { "type": "string", "description": "Optional display name." }, - "project": { - "type": "string", - "description": "The Google Cloud project ID. Defaults to the `GOOGLE_VERTEX_PROJECT` environment variable." - }, - "region": { - "type": "string", - "description": "The Google Cloud region. Defaults to the `GOOGLE_VERTEX_REGION` environment variable.", - "examples": [ - "us-central1", - "us-east1", - "europe-west1" - ] - }, - "credentials": { - "description": "Optional file path to service account credentials JSON. Defaults to the `GOOGLE_APPLICATION_CREDENTIALS` environment variable or application default credentials.", + "token": { + "description": "Optional API key to use with the model. Defaults to the `MISTRAL_API_KEY` environment variable.", "anyOf": [ { "type": "object", @@ -1576,10 +1696,8 @@ const schema = { "model" ], "additionalProperties": false - } - }, - "oneOf": [ - { + }, + "OpenAILanguageModel": { "type": "object", "properties": { "provider": { @@ -1644,6 +1762,130 @@ const schema = { ], "additionalProperties": false }, + "OpenRouterLanguageModel": { + "type": "object", + "properties": { + "provider": { + "const": "openrouter", + "description": "OpenRouter Configuration" + }, + "model": { + "type": "string", + "description": "The name of the language model." + }, + "displayName": { + "type": "string", + "description": "Optional display name." + }, + "token": { + "description": "Optional API key to use with the model. Defaults to the `OPENROUTER_API_KEY` environment variable.", + "anyOf": [ + { + "type": "object", + "properties": { + "secret": { + "type": "string", + "description": "The name of the secret that contains the token." + } + }, + "required": [ + "secret" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "env": { + "type": "string", + "description": "The name of the environment variable that contains the token. Only supported in declarative connection configs." + } + }, + "required": [ + "env" + ], + "additionalProperties": false + } + ] + }, + "baseUrl": { + "type": "string", + "format": "url", + "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", + "description": "Optional base URL." + } + }, + "required": [ + "provider", + "model" + ], + "additionalProperties": false + }, + "XaiLanguageModel": { + "type": "object", + "properties": { + "provider": { + "const": "xai", + "description": "xAI Configuration" + }, + "model": { + "type": "string", + "description": "The name of the language model.", + "examples": [ + "grok-beta", + "grok-vision-beta" + ] + }, + "displayName": { + "type": "string", + "description": "Optional display name." + }, + "token": { + "description": "Optional API key to use with the model. Defaults to the `XAI_API_KEY` environment variable.", + "anyOf": [ + { + "type": "object", + "properties": { + "secret": { + "type": "string", + "description": "The name of the secret that contains the token." + } + }, + "required": [ + "secret" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "env": { + "type": "string", + "description": "The name of the environment variable that contains the token. Only supported in declarative connection configs." + } + }, + "required": [ + "env" + ], + "additionalProperties": false + } + ] + }, + "baseUrl": { + "type": "string", + "format": "url", + "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", + "description": "Optional base URL." + } + }, + "required": [ + "provider", + "model" + ], + "additionalProperties": false + } + }, + "oneOf": [ { "type": "object", "properties": { @@ -1802,6 +2044,132 @@ const schema = { ], "additionalProperties": false }, + { + "type": "object", + "properties": { + "provider": { + "const": "azure", + "description": "Azure Configuration" + }, + "model": { + "type": "string", + "description": "The deployment name of the Azure model." + }, + "displayName": { + "type": "string", + "description": "Optional display name." + }, + "resourceName": { + "type": "string", + "description": "Azure resource name. Defaults to the `AZURE_RESOURCE_NAME` environment variable." + }, + "token": { + "description": "Optional API key to use with the model. Defaults to the `AZURE_API_KEY` environment variable.", + "anyOf": [ + { + "type": "object", + "properties": { + "secret": { + "type": "string", + "description": "The name of the secret that contains the token." + } + }, + "required": [ + "secret" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "env": { + "type": "string", + "description": "The name of the environment variable that contains the token. Only supported in declarative connection configs." + } + }, + "required": [ + "env" + ], + "additionalProperties": false + } + ] + }, + "apiVersion": { + "type": "string", + "description": "Sets a custom api version. Defaults to `preview`." + }, + "baseUrl": { + "type": "string", + "format": "url", + "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", + "description": "Use a different URL prefix for API calls. Either this or `resourceName` can be used." + } + }, + "required": [ + "provider", + "model" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "provider": { + "const": "deepseek", + "description": "DeepSeek Configuration" + }, + "model": { + "type": "string", + "description": "The name of the language model." + }, + "displayName": { + "type": "string", + "description": "Optional display name." + }, + "token": { + "description": "Optional API key to use with the model. Defaults to the `DEEPSEEK_API_KEY` environment variable.", + "anyOf": [ + { + "type": "object", + "properties": { + "secret": { + "type": "string", + "description": "The name of the secret that contains the token." + } + }, + "required": [ + "secret" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "env": { + "type": "string", + "description": "The name of the environment variable that contains the token. Only supported in declarative connection configs." + } + }, + "required": [ + "env" + ], + "additionalProperties": false + } + ] + }, + "baseUrl": { + "type": "string", + "format": "url", + "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", + "description": "Optional base URL." + } + }, + "required": [ + "provider", + "model" + ], + "additionalProperties": false + }, { "type": "object", "properties": { @@ -1861,6 +2229,81 @@ const schema = { ], "additionalProperties": false }, + { + "type": "object", + "properties": { + "provider": { + "const": "google-vertex-anthropic", + "description": "Google Vertex AI Anthropic Configuration" + }, + "model": { + "type": "string", + "description": "The name of the Anthropic language model running on Google Vertex.", + "examples": [ + "claude-sonnet-4" + ] + }, + "displayName": { + "type": "string", + "description": "Optional display name." + }, + "project": { + "type": "string", + "description": "The Google Cloud project ID. Defaults to the `GOOGLE_VERTEX_PROJECT` environment variable." + }, + "region": { + "type": "string", + "description": "The Google Cloud region. Defaults to the `GOOGLE_VERTEX_REGION` environment variable.", + "examples": [ + "us-central1", + "us-east1", + "europe-west1" + ] + }, + "credentials": { + "description": "Optional file path to service account credentials JSON. Defaults to the `GOOGLE_APPLICATION_CREDENTIALS` environment variable or application default credentials.", + "anyOf": [ + { + "type": "object", + "properties": { + "secret": { + "type": "string", + "description": "The name of the secret that contains the token." + } + }, + "required": [ + "secret" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "env": { + "type": "string", + "description": "The name of the environment variable that contains the token. Only supported in declarative connection configs." + } + }, + "required": [ + "env" + ], + "additionalProperties": false + } + ] + }, + "baseUrl": { + "type": "string", + "format": "url", + "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", + "description": "Optional base URL." + } + }, + "required": [ + "provider", + "model" + ], + "additionalProperties": false + }, { "type": "object", "properties": { @@ -1942,35 +2385,206 @@ const schema = { "type": "object", "properties": { "provider": { - "const": "google-vertex-anthropic", - "description": "Google Vertex AI Anthropic Configuration" + "const": "mistral", + "description": "Mistral AI Configuration" }, "model": { "type": "string", - "description": "The name of the Anthropic language model running on Google Vertex.", + "description": "The name of the language model." + }, + "displayName": { + "type": "string", + "description": "Optional display name." + }, + "token": { + "description": "Optional API key to use with the model. Defaults to the `MISTRAL_API_KEY` environment variable.", + "anyOf": [ + { + "type": "object", + "properties": { + "secret": { + "type": "string", + "description": "The name of the secret that contains the token." + } + }, + "required": [ + "secret" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "env": { + "type": "string", + "description": "The name of the environment variable that contains the token. Only supported in declarative connection configs." + } + }, + "required": [ + "env" + ], + "additionalProperties": false + } + ] + }, + "baseUrl": { + "type": "string", + "format": "url", + "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", + "description": "Optional base URL." + } + }, + "required": [ + "provider", + "model" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "provider": { + "const": "openai", + "description": "OpenAI Configuration" + }, + "model": { + "type": "string", + "description": "The name of the language model.", "examples": [ - "claude-sonnet-4" + "gpt-4.1", + "o4-mini", + "o3", + "o3-deep-research" ] }, "displayName": { "type": "string", "description": "Optional display name." }, - "project": { - "type": "string", - "description": "The Google Cloud project ID. Defaults to the `GOOGLE_VERTEX_PROJECT` environment variable." - }, - "region": { - "type": "string", - "description": "The Google Cloud region. Defaults to the `GOOGLE_VERTEX_REGION` environment variable.", - "examples": [ - "us-central1", - "us-east1", - "europe-west1" + "token": { + "description": "Optional API key to use with the model. Defaults to the `OPENAI_API_KEY` environment variable.", + "anyOf": [ + { + "type": "object", + "properties": { + "secret": { + "type": "string", + "description": "The name of the secret that contains the token." + } + }, + "required": [ + "secret" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "env": { + "type": "string", + "description": "The name of the environment variable that contains the token. Only supported in declarative connection configs." + } + }, + "required": [ + "env" + ], + "additionalProperties": false + } ] }, - "credentials": { - "description": "Optional file path to service account credentials JSON. Defaults to the `GOOGLE_APPLICATION_CREDENTIALS` environment variable or application default credentials.", + "baseUrl": { + "type": "string", + "format": "url", + "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", + "description": "Optional base URL." + } + }, + "required": [ + "provider", + "model" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "provider": { + "const": "openrouter", + "description": "OpenRouter Configuration" + }, + "model": { + "type": "string", + "description": "The name of the language model." + }, + "displayName": { + "type": "string", + "description": "Optional display name." + }, + "token": { + "description": "Optional API key to use with the model. Defaults to the `OPENROUTER_API_KEY` environment variable.", + "anyOf": [ + { + "type": "object", + "properties": { + "secret": { + "type": "string", + "description": "The name of the secret that contains the token." + } + }, + "required": [ + "secret" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "env": { + "type": "string", + "description": "The name of the environment variable that contains the token. Only supported in declarative connection configs." + } + }, + "required": [ + "env" + ], + "additionalProperties": false + } + ] + }, + "baseUrl": { + "type": "string", + "format": "url", + "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", + "description": "Optional base URL." + } + }, + "required": [ + "provider", + "model" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "provider": { + "const": "xai", + "description": "xAI Configuration" + }, + "model": { + "type": "string", + "description": "The name of the language model.", + "examples": [ + "grok-beta", + "grok-vision-beta" + ] + }, + "displayName": { + "type": "string", + "description": "Optional display name." + }, + "token": { + "description": "Optional API key to use with the model. Defaults to the `XAI_API_KEY` environment variable.", "anyOf": [ { "type": "object", diff --git a/packages/schemas/src/v3/index.type.ts b/packages/schemas/src/v3/index.type.ts index 65001d80..9f5fb870 100644 --- a/packages/schemas/src/v3/index.type.ts +++ b/packages/schemas/src/v3/index.type.ts @@ -12,12 +12,17 @@ export type ConnectionConfig = | BitbucketConnectionConfig | GenericGitHostConnectionConfig; export type LanguageModel = - | OpenAILanguageModel | AmazonBedrockLanguageModel | AnthropicLanguageModel + | AzureLanguageModel + | DeepSeekLanguageModel | GoogleGenerativeAILanguageModel + | GoogleVertexAnthropicLanguageModel | GoogleVertexLanguageModel - | GoogleVertexAnthropicLanguageModel; + | MistralLanguageModel + | OpenAILanguageModel + | OpenRouterLanguageModel + | XaiLanguageModel; export interface SourcebotConfig { $schema?: string; @@ -428,40 +433,6 @@ export interface GenericGitHostConnectionConfig { url: string; revisions?: GitRevisions; } -export interface OpenAILanguageModel { - /** - * OpenAI Configuration - */ - provider: "openai"; - /** - * The name of the language model. - */ - model: string; - /** - * Optional display name. - */ - displayName?: string; - /** - * Optional API key to use with the model. Defaults to the `OPENAI_API_KEY` environment variable. - */ - token?: - | { - /** - * The name of the secret that contains the token. - */ - secret: string; - } - | { - /** - * The name of the environment variable that contains the token. Only supported in declarative connection configs. - */ - env: string; - }; - /** - * Optional base URL. - */ - baseUrl?: string; -} export interface AmazonBedrockLanguageModel { /** * Amazon Bedrock Configuration @@ -550,11 +521,53 @@ export interface AnthropicLanguageModel { */ baseUrl?: string; } -export interface GoogleGenerativeAILanguageModel { +export interface AzureLanguageModel { /** - * Google Generative AI Configuration + * Azure Configuration */ - provider: "google-generative-ai"; + provider: "azure"; + /** + * The deployment name of the Azure model. + */ + model: string; + /** + * Optional display name. + */ + displayName?: string; + /** + * Azure resource name. Defaults to the `AZURE_RESOURCE_NAME` environment variable. + */ + resourceName?: string; + /** + * Optional API key to use with the model. Defaults to the `AZURE_API_KEY` environment variable. + */ + token?: + | { + /** + * The name of the secret that contains the token. + */ + secret: string; + } + | { + /** + * The name of the environment variable that contains the token. Only supported in declarative connection configs. + */ + env: string; + }; + /** + * Sets a custom api version. Defaults to `preview`. + */ + apiVersion?: string; + /** + * Use a different URL prefix for API calls. Either this or `resourceName` can be used. + */ + baseUrl?: string; +} +export interface DeepSeekLanguageModel { + /** + * DeepSeek Configuration + */ + provider: "deepseek"; /** * The name of the language model. */ @@ -564,7 +577,7 @@ export interface GoogleGenerativeAILanguageModel { */ displayName?: string; /** - * Optional API key to use with the model. Defaults to the `GOOGLE_GENERATIVE_AI_API_KEY` environment variable. + * Optional API key to use with the model. Defaults to the `DEEPSEEK_API_KEY` environment variable. */ token?: | { @@ -584,11 +597,11 @@ export interface GoogleGenerativeAILanguageModel { */ baseUrl?: string; } -export interface GoogleVertexLanguageModel { +export interface GoogleGenerativeAILanguageModel { /** - * Google Vertex AI Configuration + * Google Generative AI Configuration */ - provider: "google-vertex"; + provider: "google-generative-ai"; /** * The name of the language model. */ @@ -598,17 +611,9 @@ export interface GoogleVertexLanguageModel { */ displayName?: string; /** - * The Google Cloud project ID. Defaults to the `GOOGLE_VERTEX_PROJECT` environment variable. + * Optional API key to use with the model. Defaults to the `GOOGLE_GENERATIVE_AI_API_KEY` environment variable. */ - project?: string; - /** - * The Google Cloud region. Defaults to the `GOOGLE_VERTEX_REGION` environment variable. - */ - region?: string; - /** - * Optional file path to service account credentials JSON. Defaults to the `GOOGLE_APPLICATION_CREDENTIALS` environment variable or application default credentials. - */ - credentials?: + token?: | { /** * The name of the secret that contains the token. @@ -668,3 +673,181 @@ export interface GoogleVertexAnthropicLanguageModel { */ baseUrl?: string; } +export interface GoogleVertexLanguageModel { + /** + * Google Vertex AI Configuration + */ + provider: "google-vertex"; + /** + * The name of the language model. + */ + model: string; + /** + * Optional display name. + */ + displayName?: string; + /** + * The Google Cloud project ID. Defaults to the `GOOGLE_VERTEX_PROJECT` environment variable. + */ + project?: string; + /** + * The Google Cloud region. Defaults to the `GOOGLE_VERTEX_REGION` environment variable. + */ + region?: string; + /** + * Optional file path to service account credentials JSON. Defaults to the `GOOGLE_APPLICATION_CREDENTIALS` environment variable or application default credentials. + */ + credentials?: + | { + /** + * The name of the secret that contains the token. + */ + secret: string; + } + | { + /** + * The name of the environment variable that contains the token. Only supported in declarative connection configs. + */ + env: string; + }; + /** + * Optional base URL. + */ + baseUrl?: string; +} +export interface MistralLanguageModel { + /** + * Mistral AI Configuration + */ + provider: "mistral"; + /** + * The name of the language model. + */ + model: string; + /** + * Optional display name. + */ + displayName?: string; + /** + * Optional API key to use with the model. Defaults to the `MISTRAL_API_KEY` environment variable. + */ + token?: + | { + /** + * The name of the secret that contains the token. + */ + secret: string; + } + | { + /** + * The name of the environment variable that contains the token. Only supported in declarative connection configs. + */ + env: string; + }; + /** + * Optional base URL. + */ + baseUrl?: string; +} +export interface OpenAILanguageModel { + /** + * OpenAI Configuration + */ + provider: "openai"; + /** + * The name of the language model. + */ + model: string; + /** + * Optional display name. + */ + displayName?: string; + /** + * Optional API key to use with the model. Defaults to the `OPENAI_API_KEY` environment variable. + */ + token?: + | { + /** + * The name of the secret that contains the token. + */ + secret: string; + } + | { + /** + * The name of the environment variable that contains the token. Only supported in declarative connection configs. + */ + env: string; + }; + /** + * Optional base URL. + */ + baseUrl?: string; +} +export interface OpenRouterLanguageModel { + /** + * OpenRouter Configuration + */ + provider: "openrouter"; + /** + * The name of the language model. + */ + model: string; + /** + * Optional display name. + */ + displayName?: string; + /** + * Optional API key to use with the model. Defaults to the `OPENROUTER_API_KEY` environment variable. + */ + token?: + | { + /** + * The name of the secret that contains the token. + */ + secret: string; + } + | { + /** + * The name of the environment variable that contains the token. Only supported in declarative connection configs. + */ + env: string; + }; + /** + * Optional base URL. + */ + baseUrl?: string; +} +export interface XaiLanguageModel { + /** + * xAI Configuration + */ + provider: "xai"; + /** + * The name of the language model. + */ + model: string; + /** + * Optional display name. + */ + displayName?: string; + /** + * Optional API key to use with the model. Defaults to the `XAI_API_KEY` environment variable. + */ + token?: + | { + /** + * The name of the secret that contains the token. + */ + secret: string; + } + | { + /** + * The name of the environment variable that contains the token. Only supported in declarative connection configs. + */ + env: string; + }; + /** + * Optional base URL. + */ + baseUrl?: string; +} diff --git a/packages/schemas/src/v3/languageModel.schema.ts b/packages/schemas/src/v3/languageModel.schema.ts index c944567f..4bf2a82e 100644 --- a/packages/schemas/src/v3/languageModel.schema.ts +++ b/packages/schemas/src/v3/languageModel.schema.ts @@ -3,71 +3,6 @@ const schema = { "type": "object", "title": "LanguageModel", "definitions": { - "OpenAILanguageModel": { - "type": "object", - "properties": { - "provider": { - "const": "openai", - "description": "OpenAI Configuration" - }, - "model": { - "type": "string", - "description": "The name of the language model.", - "examples": [ - "gpt-4.1", - "o4-mini", - "o3", - "o3-deep-research" - ] - }, - "displayName": { - "type": "string", - "description": "Optional display name." - }, - "token": { - "description": "Optional API key to use with the model. Defaults to the `OPENAI_API_KEY` environment variable.", - "anyOf": [ - { - "type": "object", - "properties": { - "secret": { - "type": "string", - "description": "The name of the secret that contains the token." - } - }, - "required": [ - "secret" - ], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "env": { - "type": "string", - "description": "The name of the environment variable that contains the token. Only supported in declarative connection configs." - } - }, - "required": [ - "env" - ], - "additionalProperties": false - } - ] - }, - "baseUrl": { - "type": "string", - "format": "url", - "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", - "description": "Optional base URL." - } - }, - "required": [ - "provider", - "model" - ], - "additionalProperties": false - }, "AmazonBedrockLanguageModel": { "type": "object", "properties": { @@ -226,6 +161,132 @@ const schema = { ], "additionalProperties": false }, + "AzureLanguageModel": { + "type": "object", + "properties": { + "provider": { + "const": "azure", + "description": "Azure Configuration" + }, + "model": { + "type": "string", + "description": "The deployment name of the Azure model." + }, + "displayName": { + "type": "string", + "description": "Optional display name." + }, + "resourceName": { + "type": "string", + "description": "Azure resource name. Defaults to the `AZURE_RESOURCE_NAME` environment variable." + }, + "token": { + "description": "Optional API key to use with the model. Defaults to the `AZURE_API_KEY` environment variable.", + "anyOf": [ + { + "type": "object", + "properties": { + "secret": { + "type": "string", + "description": "The name of the secret that contains the token." + } + }, + "required": [ + "secret" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "env": { + "type": "string", + "description": "The name of the environment variable that contains the token. Only supported in declarative connection configs." + } + }, + "required": [ + "env" + ], + "additionalProperties": false + } + ] + }, + "apiVersion": { + "type": "string", + "description": "Sets a custom api version. Defaults to `preview`." + }, + "baseUrl": { + "type": "string", + "format": "url", + "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", + "description": "Use a different URL prefix for API calls. Either this or `resourceName` can be used." + } + }, + "required": [ + "provider", + "model" + ], + "additionalProperties": false + }, + "DeepSeekLanguageModel": { + "type": "object", + "properties": { + "provider": { + "const": "deepseek", + "description": "DeepSeek Configuration" + }, + "model": { + "type": "string", + "description": "The name of the language model." + }, + "displayName": { + "type": "string", + "description": "Optional display name." + }, + "token": { + "description": "Optional API key to use with the model. Defaults to the `DEEPSEEK_API_KEY` environment variable.", + "anyOf": [ + { + "type": "object", + "properties": { + "secret": { + "type": "string", + "description": "The name of the secret that contains the token." + } + }, + "required": [ + "secret" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "env": { + "type": "string", + "description": "The name of the environment variable that contains the token. Only supported in declarative connection configs." + } + }, + "required": [ + "env" + ], + "additionalProperties": false + } + ] + }, + "baseUrl": { + "type": "string", + "format": "url", + "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", + "description": "Optional base URL." + } + }, + "required": [ + "provider", + "model" + ], + "additionalProperties": false + }, "GoogleGenerativeAILanguageModel": { "type": "object", "properties": { @@ -285,6 +346,81 @@ const schema = { ], "additionalProperties": false }, + "GoogleVertexAnthropicLanguageModel": { + "type": "object", + "properties": { + "provider": { + "const": "google-vertex-anthropic", + "description": "Google Vertex AI Anthropic Configuration" + }, + "model": { + "type": "string", + "description": "The name of the Anthropic language model running on Google Vertex.", + "examples": [ + "claude-sonnet-4" + ] + }, + "displayName": { + "type": "string", + "description": "Optional display name." + }, + "project": { + "type": "string", + "description": "The Google Cloud project ID. Defaults to the `GOOGLE_VERTEX_PROJECT` environment variable." + }, + "region": { + "type": "string", + "description": "The Google Cloud region. Defaults to the `GOOGLE_VERTEX_REGION` environment variable.", + "examples": [ + "us-central1", + "us-east1", + "europe-west1" + ] + }, + "credentials": { + "description": "Optional file path to service account credentials JSON. Defaults to the `GOOGLE_APPLICATION_CREDENTIALS` environment variable or application default credentials.", + "anyOf": [ + { + "type": "object", + "properties": { + "secret": { + "type": "string", + "description": "The name of the secret that contains the token." + } + }, + "required": [ + "secret" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "env": { + "type": "string", + "description": "The name of the environment variable that contains the token. Only supported in declarative connection configs." + } + }, + "required": [ + "env" + ], + "additionalProperties": false + } + ] + }, + "baseUrl": { + "type": "string", + "format": "url", + "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", + "description": "Optional base URL." + } + }, + "required": [ + "provider", + "model" + ], + "additionalProperties": false + }, "GoogleVertexLanguageModel": { "type": "object", "properties": { @@ -362,39 +498,23 @@ const schema = { ], "additionalProperties": false }, - "GoogleVertexAnthropicLanguageModel": { + "MistralLanguageModel": { "type": "object", "properties": { "provider": { - "const": "google-vertex-anthropic", - "description": "Google Vertex AI Anthropic Configuration" + "const": "mistral", + "description": "Mistral AI Configuration" }, "model": { "type": "string", - "description": "The name of the Anthropic language model running on Google Vertex.", - "examples": [ - "claude-sonnet-4" - ] + "description": "The name of the language model." }, "displayName": { "type": "string", "description": "Optional display name." }, - "project": { - "type": "string", - "description": "The Google Cloud project ID. Defaults to the `GOOGLE_VERTEX_PROJECT` environment variable." - }, - "region": { - "type": "string", - "description": "The Google Cloud region. Defaults to the `GOOGLE_VERTEX_REGION` environment variable.", - "examples": [ - "us-central1", - "us-east1", - "europe-west1" - ] - }, - "credentials": { - "description": "Optional file path to service account credentials JSON. Defaults to the `GOOGLE_APPLICATION_CREDENTIALS` environment variable or application default credentials.", + "token": { + "description": "Optional API key to use with the model. Defaults to the `MISTRAL_API_KEY` environment variable.", "anyOf": [ { "type": "object", @@ -436,10 +556,8 @@ const schema = { "model" ], "additionalProperties": false - } - }, - "oneOf": [ - { + }, + "OpenAILanguageModel": { "type": "object", "properties": { "provider": { @@ -504,6 +622,130 @@ const schema = { ], "additionalProperties": false }, + "OpenRouterLanguageModel": { + "type": "object", + "properties": { + "provider": { + "const": "openrouter", + "description": "OpenRouter Configuration" + }, + "model": { + "type": "string", + "description": "The name of the language model." + }, + "displayName": { + "type": "string", + "description": "Optional display name." + }, + "token": { + "description": "Optional API key to use with the model. Defaults to the `OPENROUTER_API_KEY` environment variable.", + "anyOf": [ + { + "type": "object", + "properties": { + "secret": { + "type": "string", + "description": "The name of the secret that contains the token." + } + }, + "required": [ + "secret" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "env": { + "type": "string", + "description": "The name of the environment variable that contains the token. Only supported in declarative connection configs." + } + }, + "required": [ + "env" + ], + "additionalProperties": false + } + ] + }, + "baseUrl": { + "type": "string", + "format": "url", + "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", + "description": "Optional base URL." + } + }, + "required": [ + "provider", + "model" + ], + "additionalProperties": false + }, + "XaiLanguageModel": { + "type": "object", + "properties": { + "provider": { + "const": "xai", + "description": "xAI Configuration" + }, + "model": { + "type": "string", + "description": "The name of the language model.", + "examples": [ + "grok-beta", + "grok-vision-beta" + ] + }, + "displayName": { + "type": "string", + "description": "Optional display name." + }, + "token": { + "description": "Optional API key to use with the model. Defaults to the `XAI_API_KEY` environment variable.", + "anyOf": [ + { + "type": "object", + "properties": { + "secret": { + "type": "string", + "description": "The name of the secret that contains the token." + } + }, + "required": [ + "secret" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "env": { + "type": "string", + "description": "The name of the environment variable that contains the token. Only supported in declarative connection configs." + } + }, + "required": [ + "env" + ], + "additionalProperties": false + } + ] + }, + "baseUrl": { + "type": "string", + "format": "url", + "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", + "description": "Optional base URL." + } + }, + "required": [ + "provider", + "model" + ], + "additionalProperties": false + } + }, + "oneOf": [ { "type": "object", "properties": { @@ -662,6 +904,132 @@ const schema = { ], "additionalProperties": false }, + { + "type": "object", + "properties": { + "provider": { + "const": "azure", + "description": "Azure Configuration" + }, + "model": { + "type": "string", + "description": "The deployment name of the Azure model." + }, + "displayName": { + "type": "string", + "description": "Optional display name." + }, + "resourceName": { + "type": "string", + "description": "Azure resource name. Defaults to the `AZURE_RESOURCE_NAME` environment variable." + }, + "token": { + "description": "Optional API key to use with the model. Defaults to the `AZURE_API_KEY` environment variable.", + "anyOf": [ + { + "type": "object", + "properties": { + "secret": { + "type": "string", + "description": "The name of the secret that contains the token." + } + }, + "required": [ + "secret" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "env": { + "type": "string", + "description": "The name of the environment variable that contains the token. Only supported in declarative connection configs." + } + }, + "required": [ + "env" + ], + "additionalProperties": false + } + ] + }, + "apiVersion": { + "type": "string", + "description": "Sets a custom api version. Defaults to `preview`." + }, + "baseUrl": { + "type": "string", + "format": "url", + "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", + "description": "Use a different URL prefix for API calls. Either this or `resourceName` can be used." + } + }, + "required": [ + "provider", + "model" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "provider": { + "const": "deepseek", + "description": "DeepSeek Configuration" + }, + "model": { + "type": "string", + "description": "The name of the language model." + }, + "displayName": { + "type": "string", + "description": "Optional display name." + }, + "token": { + "description": "Optional API key to use with the model. Defaults to the `DEEPSEEK_API_KEY` environment variable.", + "anyOf": [ + { + "type": "object", + "properties": { + "secret": { + "type": "string", + "description": "The name of the secret that contains the token." + } + }, + "required": [ + "secret" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "env": { + "type": "string", + "description": "The name of the environment variable that contains the token. Only supported in declarative connection configs." + } + }, + "required": [ + "env" + ], + "additionalProperties": false + } + ] + }, + "baseUrl": { + "type": "string", + "format": "url", + "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", + "description": "Optional base URL." + } + }, + "required": [ + "provider", + "model" + ], + "additionalProperties": false + }, { "type": "object", "properties": { @@ -721,6 +1089,81 @@ const schema = { ], "additionalProperties": false }, + { + "type": "object", + "properties": { + "provider": { + "const": "google-vertex-anthropic", + "description": "Google Vertex AI Anthropic Configuration" + }, + "model": { + "type": "string", + "description": "The name of the Anthropic language model running on Google Vertex.", + "examples": [ + "claude-sonnet-4" + ] + }, + "displayName": { + "type": "string", + "description": "Optional display name." + }, + "project": { + "type": "string", + "description": "The Google Cloud project ID. Defaults to the `GOOGLE_VERTEX_PROJECT` environment variable." + }, + "region": { + "type": "string", + "description": "The Google Cloud region. Defaults to the `GOOGLE_VERTEX_REGION` environment variable.", + "examples": [ + "us-central1", + "us-east1", + "europe-west1" + ] + }, + "credentials": { + "description": "Optional file path to service account credentials JSON. Defaults to the `GOOGLE_APPLICATION_CREDENTIALS` environment variable or application default credentials.", + "anyOf": [ + { + "type": "object", + "properties": { + "secret": { + "type": "string", + "description": "The name of the secret that contains the token." + } + }, + "required": [ + "secret" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "env": { + "type": "string", + "description": "The name of the environment variable that contains the token. Only supported in declarative connection configs." + } + }, + "required": [ + "env" + ], + "additionalProperties": false + } + ] + }, + "baseUrl": { + "type": "string", + "format": "url", + "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", + "description": "Optional base URL." + } + }, + "required": [ + "provider", + "model" + ], + "additionalProperties": false + }, { "type": "object", "properties": { @@ -802,35 +1245,206 @@ const schema = { "type": "object", "properties": { "provider": { - "const": "google-vertex-anthropic", - "description": "Google Vertex AI Anthropic Configuration" + "const": "mistral", + "description": "Mistral AI Configuration" }, "model": { "type": "string", - "description": "The name of the Anthropic language model running on Google Vertex.", + "description": "The name of the language model." + }, + "displayName": { + "type": "string", + "description": "Optional display name." + }, + "token": { + "description": "Optional API key to use with the model. Defaults to the `MISTRAL_API_KEY` environment variable.", + "anyOf": [ + { + "type": "object", + "properties": { + "secret": { + "type": "string", + "description": "The name of the secret that contains the token." + } + }, + "required": [ + "secret" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "env": { + "type": "string", + "description": "The name of the environment variable that contains the token. Only supported in declarative connection configs." + } + }, + "required": [ + "env" + ], + "additionalProperties": false + } + ] + }, + "baseUrl": { + "type": "string", + "format": "url", + "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", + "description": "Optional base URL." + } + }, + "required": [ + "provider", + "model" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "provider": { + "const": "openai", + "description": "OpenAI Configuration" + }, + "model": { + "type": "string", + "description": "The name of the language model.", "examples": [ - "claude-sonnet-4" + "gpt-4.1", + "o4-mini", + "o3", + "o3-deep-research" ] }, "displayName": { "type": "string", "description": "Optional display name." }, - "project": { - "type": "string", - "description": "The Google Cloud project ID. Defaults to the `GOOGLE_VERTEX_PROJECT` environment variable." - }, - "region": { - "type": "string", - "description": "The Google Cloud region. Defaults to the `GOOGLE_VERTEX_REGION` environment variable.", - "examples": [ - "us-central1", - "us-east1", - "europe-west1" + "token": { + "description": "Optional API key to use with the model. Defaults to the `OPENAI_API_KEY` environment variable.", + "anyOf": [ + { + "type": "object", + "properties": { + "secret": { + "type": "string", + "description": "The name of the secret that contains the token." + } + }, + "required": [ + "secret" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "env": { + "type": "string", + "description": "The name of the environment variable that contains the token. Only supported in declarative connection configs." + } + }, + "required": [ + "env" + ], + "additionalProperties": false + } ] }, - "credentials": { - "description": "Optional file path to service account credentials JSON. Defaults to the `GOOGLE_APPLICATION_CREDENTIALS` environment variable or application default credentials.", + "baseUrl": { + "type": "string", + "format": "url", + "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", + "description": "Optional base URL." + } + }, + "required": [ + "provider", + "model" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "provider": { + "const": "openrouter", + "description": "OpenRouter Configuration" + }, + "model": { + "type": "string", + "description": "The name of the language model." + }, + "displayName": { + "type": "string", + "description": "Optional display name." + }, + "token": { + "description": "Optional API key to use with the model. Defaults to the `OPENROUTER_API_KEY` environment variable.", + "anyOf": [ + { + "type": "object", + "properties": { + "secret": { + "type": "string", + "description": "The name of the secret that contains the token." + } + }, + "required": [ + "secret" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "env": { + "type": "string", + "description": "The name of the environment variable that contains the token. Only supported in declarative connection configs." + } + }, + "required": [ + "env" + ], + "additionalProperties": false + } + ] + }, + "baseUrl": { + "type": "string", + "format": "url", + "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", + "description": "Optional base URL." + } + }, + "required": [ + "provider", + "model" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "provider": { + "const": "xai", + "description": "xAI Configuration" + }, + "model": { + "type": "string", + "description": "The name of the language model.", + "examples": [ + "grok-beta", + "grok-vision-beta" + ] + }, + "displayName": { + "type": "string", + "description": "Optional display name." + }, + "token": { + "description": "Optional API key to use with the model. Defaults to the `XAI_API_KEY` environment variable.", "anyOf": [ { "type": "object", diff --git a/packages/schemas/src/v3/languageModel.type.ts b/packages/schemas/src/v3/languageModel.type.ts index aaacabaf..88034678 100644 --- a/packages/schemas/src/v3/languageModel.type.ts +++ b/packages/schemas/src/v3/languageModel.type.ts @@ -1,47 +1,18 @@ // THIS IS A AUTO-GENERATED FILE. DO NOT MODIFY MANUALLY! export type LanguageModel = - | OpenAILanguageModel | AmazonBedrockLanguageModel | AnthropicLanguageModel + | AzureLanguageModel + | DeepSeekLanguageModel | GoogleGenerativeAILanguageModel + | GoogleVertexAnthropicLanguageModel | GoogleVertexLanguageModel - | GoogleVertexAnthropicLanguageModel; + | MistralLanguageModel + | OpenAILanguageModel + | OpenRouterLanguageModel + | XaiLanguageModel; -export interface OpenAILanguageModel { - /** - * OpenAI Configuration - */ - provider: "openai"; - /** - * The name of the language model. - */ - model: string; - /** - * Optional display name. - */ - displayName?: string; - /** - * Optional API key to use with the model. Defaults to the `OPENAI_API_KEY` environment variable. - */ - token?: - | { - /** - * The name of the secret that contains the token. - */ - secret: string; - } - | { - /** - * The name of the environment variable that contains the token. Only supported in declarative connection configs. - */ - env: string; - }; - /** - * Optional base URL. - */ - baseUrl?: string; -} export interface AmazonBedrockLanguageModel { /** * Amazon Bedrock Configuration @@ -130,11 +101,53 @@ export interface AnthropicLanguageModel { */ baseUrl?: string; } -export interface GoogleGenerativeAILanguageModel { +export interface AzureLanguageModel { /** - * Google Generative AI Configuration + * Azure Configuration */ - provider: "google-generative-ai"; + provider: "azure"; + /** + * The deployment name of the Azure model. + */ + model: string; + /** + * Optional display name. + */ + displayName?: string; + /** + * Azure resource name. Defaults to the `AZURE_RESOURCE_NAME` environment variable. + */ + resourceName?: string; + /** + * Optional API key to use with the model. Defaults to the `AZURE_API_KEY` environment variable. + */ + token?: + | { + /** + * The name of the secret that contains the token. + */ + secret: string; + } + | { + /** + * The name of the environment variable that contains the token. Only supported in declarative connection configs. + */ + env: string; + }; + /** + * Sets a custom api version. Defaults to `preview`. + */ + apiVersion?: string; + /** + * Use a different URL prefix for API calls. Either this or `resourceName` can be used. + */ + baseUrl?: string; +} +export interface DeepSeekLanguageModel { + /** + * DeepSeek Configuration + */ + provider: "deepseek"; /** * The name of the language model. */ @@ -144,7 +157,7 @@ export interface GoogleGenerativeAILanguageModel { */ displayName?: string; /** - * Optional API key to use with the model. Defaults to the `GOOGLE_GENERATIVE_AI_API_KEY` environment variable. + * Optional API key to use with the model. Defaults to the `DEEPSEEK_API_KEY` environment variable. */ token?: | { @@ -164,11 +177,11 @@ export interface GoogleGenerativeAILanguageModel { */ baseUrl?: string; } -export interface GoogleVertexLanguageModel { +export interface GoogleGenerativeAILanguageModel { /** - * Google Vertex AI Configuration + * Google Generative AI Configuration */ - provider: "google-vertex"; + provider: "google-generative-ai"; /** * The name of the language model. */ @@ -178,17 +191,9 @@ export interface GoogleVertexLanguageModel { */ displayName?: string; /** - * The Google Cloud project ID. Defaults to the `GOOGLE_VERTEX_PROJECT` environment variable. + * Optional API key to use with the model. Defaults to the `GOOGLE_GENERATIVE_AI_API_KEY` environment variable. */ - project?: string; - /** - * The Google Cloud region. Defaults to the `GOOGLE_VERTEX_REGION` environment variable. - */ - region?: string; - /** - * Optional file path to service account credentials JSON. Defaults to the `GOOGLE_APPLICATION_CREDENTIALS` environment variable or application default credentials. - */ - credentials?: + token?: | { /** * The name of the secret that contains the token. @@ -248,3 +253,181 @@ export interface GoogleVertexAnthropicLanguageModel { */ baseUrl?: string; } +export interface GoogleVertexLanguageModel { + /** + * Google Vertex AI Configuration + */ + provider: "google-vertex"; + /** + * The name of the language model. + */ + model: string; + /** + * Optional display name. + */ + displayName?: string; + /** + * The Google Cloud project ID. Defaults to the `GOOGLE_VERTEX_PROJECT` environment variable. + */ + project?: string; + /** + * The Google Cloud region. Defaults to the `GOOGLE_VERTEX_REGION` environment variable. + */ + region?: string; + /** + * Optional file path to service account credentials JSON. Defaults to the `GOOGLE_APPLICATION_CREDENTIALS` environment variable or application default credentials. + */ + credentials?: + | { + /** + * The name of the secret that contains the token. + */ + secret: string; + } + | { + /** + * The name of the environment variable that contains the token. Only supported in declarative connection configs. + */ + env: string; + }; + /** + * Optional base URL. + */ + baseUrl?: string; +} +export interface MistralLanguageModel { + /** + * Mistral AI Configuration + */ + provider: "mistral"; + /** + * The name of the language model. + */ + model: string; + /** + * Optional display name. + */ + displayName?: string; + /** + * Optional API key to use with the model. Defaults to the `MISTRAL_API_KEY` environment variable. + */ + token?: + | { + /** + * The name of the secret that contains the token. + */ + secret: string; + } + | { + /** + * The name of the environment variable that contains the token. Only supported in declarative connection configs. + */ + env: string; + }; + /** + * Optional base URL. + */ + baseUrl?: string; +} +export interface OpenAILanguageModel { + /** + * OpenAI Configuration + */ + provider: "openai"; + /** + * The name of the language model. + */ + model: string; + /** + * Optional display name. + */ + displayName?: string; + /** + * Optional API key to use with the model. Defaults to the `OPENAI_API_KEY` environment variable. + */ + token?: + | { + /** + * The name of the secret that contains the token. + */ + secret: string; + } + | { + /** + * The name of the environment variable that contains the token. Only supported in declarative connection configs. + */ + env: string; + }; + /** + * Optional base URL. + */ + baseUrl?: string; +} +export interface OpenRouterLanguageModel { + /** + * OpenRouter Configuration + */ + provider: "openrouter"; + /** + * The name of the language model. + */ + model: string; + /** + * Optional display name. + */ + displayName?: string; + /** + * Optional API key to use with the model. Defaults to the `OPENROUTER_API_KEY` environment variable. + */ + token?: + | { + /** + * The name of the secret that contains the token. + */ + secret: string; + } + | { + /** + * The name of the environment variable that contains the token. Only supported in declarative connection configs. + */ + env: string; + }; + /** + * Optional base URL. + */ + baseUrl?: string; +} +export interface XaiLanguageModel { + /** + * xAI Configuration + */ + provider: "xai"; + /** + * The name of the language model. + */ + model: string; + /** + * Optional display name. + */ + displayName?: string; + /** + * Optional API key to use with the model. Defaults to the `XAI_API_KEY` environment variable. + */ + token?: + | { + /** + * The name of the secret that contains the token. + */ + secret: string; + } + | { + /** + * The name of the environment variable that contains the token. Only supported in declarative connection configs. + */ + env: string; + }; + /** + * Optional base URL. + */ + baseUrl?: string; +} diff --git a/packages/web/package.json b/packages/web/package.json index 2f12ad9a..ff77c18f 100644 --- a/packages/web/package.json +++ b/packages/web/package.json @@ -14,10 +14,14 @@ "dependencies": { "@ai-sdk/amazon-bedrock": "3.0.0-beta.7", "@ai-sdk/anthropic": "2.0.0-beta.8", + "@ai-sdk/azure": "2.0.0-beta.11", + "@ai-sdk/deepseek": "1.0.0-beta.8", "@ai-sdk/google": "2.0.0-beta.11", "@ai-sdk/google-vertex": "3.0.0-beta.15", + "@ai-sdk/mistral": "2.0.0-beta.6", "@ai-sdk/openai": "2.0.0-beta.9", "@ai-sdk/react": "2.0.0-beta.21", + "@ai-sdk/xai": "2.0.0-beta.10", "@auth/prisma-adapter": "^2.7.4", "@codemirror/commands": "^6.6.0", "@codemirror/lang-cpp": "^6.0.2", @@ -49,6 +53,7 @@ "@hookform/resolvers": "^3.9.0", "@iconify/react": "^5.1.0", "@iizukak/codemirror-lang-wgsl": "^0.3.0", + "@openrouter/ai-sdk-provider": "1.0.0-beta.5", "@opentelemetry/api-logs": "^0.203.0", "@opentelemetry/instrumentation": "^0.203.0", "@opentelemetry/sdk-logs": "^0.203.0", diff --git a/packages/web/public/azureai.svg b/packages/web/public/azureai.svg new file mode 100644 index 00000000..c4ed5c4d --- /dev/null +++ b/packages/web/public/azureai.svg @@ -0,0 +1 @@ +AzureAI \ No newline at end of file diff --git a/packages/web/public/deepseek.svg b/packages/web/public/deepseek.svg new file mode 100644 index 00000000..3fc23024 --- /dev/null +++ b/packages/web/public/deepseek.svg @@ -0,0 +1 @@ +DeepSeek \ No newline at end of file diff --git a/packages/web/public/mistral.svg b/packages/web/public/mistral.svg new file mode 100644 index 00000000..8e03e244 --- /dev/null +++ b/packages/web/public/mistral.svg @@ -0,0 +1 @@ +Mistral \ No newline at end of file diff --git a/packages/web/public/openrouter.svg b/packages/web/public/openrouter.svg new file mode 100644 index 00000000..e6cca2a8 --- /dev/null +++ b/packages/web/public/openrouter.svg @@ -0,0 +1 @@ +OpenRouter \ No newline at end of file diff --git a/packages/web/public/xai.svg b/packages/web/public/xai.svg new file mode 100644 index 00000000..536e7139 --- /dev/null +++ b/packages/web/public/xai.svg @@ -0,0 +1 @@ +Grok \ No newline at end of file diff --git a/packages/web/src/app/api/(server)/chat/route.ts b/packages/web/src/app/api/(server)/chat/route.ts index 43ab93b5..8a7b5c83 100644 --- a/packages/web/src/app/api/(server)/chat/route.ts +++ b/packages/web/src/app/api/(server)/chat/route.ts @@ -14,12 +14,17 @@ import { createGoogleGenerativeAI } from '@ai-sdk/google'; import { createVertex } from '@ai-sdk/google-vertex'; import { createVertexAnthropic } from '@ai-sdk/google-vertex/anthropic'; import { createOpenAI, OpenAIResponsesProviderOptions } from "@ai-sdk/openai"; +import { createMistral } from '@ai-sdk/mistral'; +import { createXai } from '@ai-sdk/xai'; import { LanguageModelV2 as AISDKLanguageModelV2 } from "@ai-sdk/provider"; import * as Sentry from "@sentry/nextjs"; import { getTokenFromConfig } from "@sourcebot/crypto"; import { OrgRole } from "@sourcebot/db"; import { createLogger } from "@sourcebot/logger"; import { LanguageModel } from "@sourcebot/schemas/v3/index.type"; +import { createAzure } from '@ai-sdk/azure'; +import { createDeepSeek } from '@ai-sdk/deepseek'; +import { createOpenRouter } from '@openrouter/ai-sdk-provider'; import { createUIMessageStream, createUIMessageStreamResponse, @@ -122,7 +127,7 @@ const chatHandler = ({ messages, id, selectedRepos, languageModelId }: ChatHandl // corresponding config in `config.json`. const languageModelConfig = (await _getConfiguredLanguageModelsFull()) - .find((model) => model.model === languageModelId); + .find((model) => model.model === languageModelId); if (!languageModelConfig) { return serviceErrorResponse({ @@ -296,14 +301,28 @@ const getAISDKLanguageModelAndOptions = async (config: LanguageModel, orgId: num const { provider, model: modelId } = config; switch (provider) { + case 'amazon-bedrock': { + const aws = createAmazonBedrock({ + baseURL: config.baseUrl, + region: config.region ?? env.AWS_REGION, + accessKeyId: config.accessKeyId + ? await getTokenFromConfig(config.accessKeyId, orgId, prisma) + : env.AWS_ACCESS_KEY_ID, + secretAccessKey: config.accessKeySecret + ? await getTokenFromConfig(config.accessKeySecret, orgId, prisma) + : env.AWS_SECRET_ACCESS_KEY, + }); + + return { + model: aws(modelId), + }; + } case 'anthropic': { const anthropic = createAnthropic({ baseURL: config.baseUrl, - ...(config.token ? { - apiKey: (await getTokenFromConfig(config.token, orgId, prisma)), - } : { - apiKey: env.ANTHROPIC_API_KEY, - }), + apiKey: config.token + ? await getTokenFromConfig(config.token, orgId, prisma) + : env.ANTHROPIC_API_KEY, }); return { @@ -322,59 +341,40 @@ const getAISDKLanguageModelAndOptions = async (config: LanguageModel, orgId: num }, }; } - case 'openai': { - const openai = createOpenAI({ + case 'azure': { + const azure = createAzure({ baseURL: config.baseUrl, - ...(config.token ? { - apiKey: (await getTokenFromConfig(config.token, orgId, prisma)), - } : { - apiKey: env.OPENAI_API_KEY, - }), + apiKey: config.token ? (await getTokenFromConfig(config.token, orgId, prisma)) : env.AZURE_API_KEY, + apiVersion: config.apiVersion, + resourceName: config.resourceName ?? env.AZURE_RESOURCE_NAME, }); return { - model: openai(modelId), - providerOptions: { - openai: { - reasoningEffort: 'high' - } satisfies OpenAIResponsesProviderOptions, - }, + model: azure(modelId), + }; + } + case 'deepseek': { + const deepseek = createDeepSeek({ + baseURL: config.baseUrl, + apiKey: config.token ? (await getTokenFromConfig(config.token, orgId, prisma)) : env.DEEPSEEK_API_KEY, + }); + + return { + model: deepseek(modelId), }; } case 'google-generative-ai': { const google = createGoogleGenerativeAI({ baseURL: config.baseUrl, - ...(config.token ? { - apiKey: (await getTokenFromConfig(config.token, orgId, prisma)), - } : { - apiKey: env.GOOGLE_GENERATIVE_AI_API_KEY, - }), + apiKey: config.token + ? await getTokenFromConfig(config.token, orgId, prisma) + : env.GOOGLE_GENERATIVE_AI_API_KEY, }); return { model: google(modelId), }; } - case 'amazon-bedrock': { - const aws = createAmazonBedrock({ - baseURL: config.baseUrl, - region: config.region ?? env.AWS_REGION, - ...(config.accessKeyId ? { - accessKeyId: (await getTokenFromConfig(config.accessKeyId, orgId, prisma)), - } : { - accessKeyId: env.AWS_ACCESS_KEY_ID, - }), - ...(config.accessKeySecret ? { - secretAccessKey: (await getTokenFromConfig(config.accessKeySecret, orgId, prisma)), - } : { - secretAccessKey: env.AWS_SECRET_ACCESS_KEY, - }), - }); - - return { - model: aws(modelId), - }; - } case 'google-vertex': { const vertex = createVertex({ project: config.project ?? env.GOOGLE_VERTEX_PROJECT, @@ -405,6 +405,59 @@ const getAISDKLanguageModelAndOptions = async (config: LanguageModel, orgId: num model: vertexAnthropic(modelId), }; } + case 'mistral': { + const mistral = createMistral({ + baseURL: config.baseUrl, + apiKey: config.token + ? await getTokenFromConfig(config.token, orgId, prisma) + : env.MISTRAL_API_KEY, + }); + + return { + model: mistral(modelId), + }; + } + case 'openai': { + const openai = createOpenAI({ + baseURL: config.baseUrl, + apiKey: config.token + ? await getTokenFromConfig(config.token, orgId, prisma) + : env.OPENAI_API_KEY, + }); + + return { + model: openai(modelId), + providerOptions: { + openai: { + reasoningEffort: 'high' + } satisfies OpenAIResponsesProviderOptions, + }, + }; + } + case 'openrouter': { + const openrouter = createOpenRouter({ + baseURL: config.baseUrl, + apiKey: config.token + ? await getTokenFromConfig(config.token, orgId, prisma) + : env.OPENROUTER_API_KEY, + }); + + return { + model: openrouter(modelId), + }; + } + case 'xai': { + const xai = createXai({ + baseURL: config.baseUrl, + apiKey: config.token + ? await getTokenFromConfig(config.token, orgId, prisma) + : env.XAI_API_KEY, + }); + + return { + model: xai(modelId), + }; + } } } diff --git a/packages/web/src/env.mjs b/packages/web/src/env.mjs index bf4666d7..0991b4bb 100644 --- a/packages/web/src/env.mjs +++ b/packages/web/src/env.mjs @@ -99,7 +99,19 @@ export const env = createEnv({ ANTHROPIC_API_KEY: z.string().optional(), ANTHROPIC_THINKING_BUDGET_TOKENS: numberSchema.default(12000), + AZURE_API_KEY: z.string().optional(), + AZURE_RESOURCE_NAME: z.string().optional(), + + DEEPSEEK_API_KEY: z.string().optional(), + OPENAI_API_KEY: z.string().optional(), + + OPENROUTER_API_KEY: z.string().optional(), + + XAI_API_KEY: z.string().optional(), + + MISTRAL_API_KEY: z.string().optional(), + GOOGLE_GENERATIVE_AI_API_KEY: z.string().optional(), GOOGLE_VERTEX_PROJECT: z.string().optional(), GOOGLE_VERTEX_REGION: z.string().default('us-central1'), diff --git a/packages/web/src/features/chat/components/chatBox/modelProviderLogo.tsx b/packages/web/src/features/chat/components/chatBox/modelProviderLogo.tsx index ee7a6f1b..b04d50ee 100644 --- a/packages/web/src/features/chat/components/chatBox/modelProviderLogo.tsx +++ b/packages/web/src/features/chat/components/chatBox/modelProviderLogo.tsx @@ -5,9 +5,14 @@ import { LanguageModelProvider } from "../../types"; import { cn } from "@/lib/utils"; import Image from "next/image"; import anthropicLogo from "@/public/anthropic.svg"; +import azureAiLogo from "@/public/azureai.svg"; import bedrockLogo from "@/public/bedrock.svg"; import geminiLogo from "@/public/gemini.svg"; import openaiLogo from "@/public/openai.svg"; +import deepseekLogo from "@/public/deepseek.svg"; +import mistralLogo from "@/public/mistral.svg"; +import openrouterLogo from "@/public/openrouter.svg"; +import xaiLogo from "@/public/xai.svg"; interface ModelProviderLogoProps { provider: LanguageModelProvider; @@ -30,6 +35,16 @@ export const ModelProviderLogo = ({ src: anthropicLogo, className: 'dark:invert' }; + case 'azure': + return { + src: azureAiLogo, + className: 'w-3.5 h-3.5' + }; + case 'deepseek': + return { + src: deepseekLogo, + className: 'w-3.5 h-3.5' + }; case 'openai': return { src: openaiLogo, @@ -46,6 +61,21 @@ export const ModelProviderLogo = ({ src: anthropicLogo, className: 'dark:invert' }; + case 'mistral': + return { + src: mistralLogo, + className: 'w-3.5 h-3.5' + }; + case 'openrouter': + return { + src: openrouterLogo, + className: 'dark:invert w-3.5 h-3.5' + }; + case 'xai': + return { + src: xaiLogo, + className: 'dark:invert w-3.5 h-3.5' + }; } }, [provider]); diff --git a/schemas/v3/languageModel.json b/schemas/v3/languageModel.json index 73192b0c..c0ac8e40 100644 --- a/schemas/v3/languageModel.json +++ b/schemas/v3/languageModel.json @@ -2,44 +2,6 @@ "type": "object", "title": "LanguageModel", "definitions": { - "OpenAILanguageModel": { - "type": "object", - "properties": { - "provider": { - "const": "openai", - "description": "OpenAI Configuration" - }, - "model": { - "type": "string", - "description": "The name of the language model.", - "examples": [ - "gpt-4.1", - "o4-mini", - "o3", - "o3-deep-research" - ] - }, - "displayName": { - "type": "string", - "description": "Optional display name." - }, - "token": { - "$ref": "./shared.json#/definitions/Token", - "description": "Optional API key to use with the model. Defaults to the `OPENAI_API_KEY` environment variable." - }, - "baseUrl": { - "type": "string", - "format": "url", - "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", - "description": "Optional base URL." - } - }, - "required": [ - "provider", - "model" - ], - "additionalProperties": false - }, "AmazonBedrockLanguageModel": { "type": "object", "properties": { @@ -117,6 +79,78 @@ ], "additionalProperties": false }, + "AzureLanguageModel": { + "type": "object", + "properties": { + "provider": { + "const": "azure", + "description": "Azure Configuration" + }, + "model": { + "type": "string", + "description": "The deployment name of the Azure model." + }, + "displayName": { + "type": "string", + "description": "Optional display name." + }, + "resourceName": { + "type": "string", + "description": "Azure resource name. Defaults to the `AZURE_RESOURCE_NAME` environment variable." + }, + "token": { + "$ref": "./shared.json#/definitions/Token", + "description": "Optional API key to use with the model. Defaults to the `AZURE_API_KEY` environment variable." + }, + "apiVersion": { + "type": "string", + "description": "Sets a custom api version. Defaults to `preview`." + }, + "baseUrl": { + "type": "string", + "format": "url", + "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", + "description": "Use a different URL prefix for API calls. Either this or `resourceName` can be used." + } + }, + "required": [ + "provider", + "model" + ], + "additionalProperties": false + }, + "DeepSeekLanguageModel": { + "type": "object", + "properties": { + "provider": { + "const": "deepseek", + "description": "DeepSeek Configuration" + }, + "model": { + "type": "string", + "description": "The name of the language model." + }, + "displayName": { + "type": "string", + "description": "Optional display name." + }, + "token": { + "$ref": "./shared.json#/definitions/Token", + "description": "Optional API key to use with the model. Defaults to the `DEEPSEEK_API_KEY` environment variable." + }, + "baseUrl": { + "type": "string", + "format": "url", + "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", + "description": "Optional base URL." + } + }, + "required": [ + "provider", + "model" + ], + "additionalProperties": false + }, "GoogleGenerativeAILanguageModel": { "type": "object", "properties": { @@ -149,6 +183,54 @@ ], "additionalProperties": false }, + "GoogleVertexAnthropicLanguageModel": { + "type": "object", + "properties": { + "provider": { + "const": "google-vertex-anthropic", + "description": "Google Vertex AI Anthropic Configuration" + }, + "model": { + "type": "string", + "description": "The name of the Anthropic language model running on Google Vertex.", + "examples": [ + "claude-sonnet-4" + ] + }, + "displayName": { + "type": "string", + "description": "Optional display name." + }, + "project": { + "type": "string", + "description": "The Google Cloud project ID. Defaults to the `GOOGLE_VERTEX_PROJECT` environment variable." + }, + "region": { + "type": "string", + "description": "The Google Cloud region. Defaults to the `GOOGLE_VERTEX_REGION` environment variable.", + "examples": [ + "us-central1", + "us-east1", + "europe-west1" + ] + }, + "credentials": { + "$ref": "./shared.json#/definitions/Token", + "description": "Optional file path to service account credentials JSON. Defaults to the `GOOGLE_APPLICATION_CREDENTIALS` environment variable or application default credentials." + }, + "baseUrl": { + "type": "string", + "format": "url", + "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", + "description": "Optional base URL." + } + }, + "required": [ + "provider", + "model" + ], + "additionalProperties": false + }, "GoogleVertexLanguageModel": { "type": "object", "properties": { @@ -199,40 +281,130 @@ ], "additionalProperties": false }, - "GoogleVertexAnthropicLanguageModel": { + "MistralLanguageModel": { "type": "object", "properties": { "provider": { - "const": "google-vertex-anthropic", - "description": "Google Vertex AI Anthropic Configuration" + "const": "mistral", + "description": "Mistral AI Configuration" }, "model": { "type": "string", - "description": "The name of the Anthropic language model running on Google Vertex.", + "description": "The name of the language model." + }, + "displayName": { + "type": "string", + "description": "Optional display name." + }, + "token": { + "$ref": "./shared.json#/definitions/Token", + "description": "Optional API key to use with the model. Defaults to the `MISTRAL_API_KEY` environment variable." + }, + "baseUrl": { + "type": "string", + "format": "url", + "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", + "description": "Optional base URL." + } + }, + "required": [ + "provider", + "model" + ], + "additionalProperties": false + }, + "OpenAILanguageModel": { + "type": "object", + "properties": { + "provider": { + "const": "openai", + "description": "OpenAI Configuration" + }, + "model": { + "type": "string", + "description": "The name of the language model.", "examples": [ - "claude-sonnet-4" + "gpt-4.1", + "o4-mini", + "o3", + "o3-deep-research" ] }, "displayName": { "type": "string", "description": "Optional display name." }, - "project": { - "type": "string", - "description": "The Google Cloud project ID. Defaults to the `GOOGLE_VERTEX_PROJECT` environment variable." + "token": { + "$ref": "./shared.json#/definitions/Token", + "description": "Optional API key to use with the model. Defaults to the `OPENAI_API_KEY` environment variable." }, - "region": { + "baseUrl": { "type": "string", - "description": "The Google Cloud region. Defaults to the `GOOGLE_VERTEX_REGION` environment variable.", + "format": "url", + "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", + "description": "Optional base URL." + } + }, + "required": [ + "provider", + "model" + ], + "additionalProperties": false + }, + "OpenRouterLanguageModel": { + "type": "object", + "properties": { + "provider": { + "const": "openrouter", + "description": "OpenRouter Configuration" + }, + "model": { + "type": "string", + "description": "The name of the language model." + }, + "displayName": { + "type": "string", + "description": "Optional display name." + }, + "token": { + "$ref": "./shared.json#/definitions/Token", + "description": "Optional API key to use with the model. Defaults to the `OPENROUTER_API_KEY` environment variable." + }, + "baseUrl": { + "type": "string", + "format": "url", + "pattern": "^https?:\\/\\/[^\\s/$.?#].[^\\s]*$", + "description": "Optional base URL." + } + }, + "required": [ + "provider", + "model" + ], + "additionalProperties": false + }, + "XaiLanguageModel": { + "type": "object", + "properties": { + "provider": { + "const": "xai", + "description": "xAI Configuration" + }, + "model": { + "type": "string", + "description": "The name of the language model.", "examples": [ - "us-central1", - "us-east1", - "europe-west1" + "grok-beta", + "grok-vision-beta" ] }, - "credentials": { + "displayName": { + "type": "string", + "description": "Optional display name." + }, + "token": { "$ref": "./shared.json#/definitions/Token", - "description": "Optional file path to service account credentials JSON. Defaults to the `GOOGLE_APPLICATION_CREDENTIALS` environment variable or application default credentials." + "description": "Optional API key to use with the model. Defaults to the `XAI_API_KEY` environment variable." }, "baseUrl": { "type": "string", @@ -249,23 +421,38 @@ } }, "oneOf": [ - { - "$ref": "#/definitions/OpenAILanguageModel" - }, { "$ref": "#/definitions/AmazonBedrockLanguageModel" }, { "$ref": "#/definitions/AnthropicLanguageModel" }, + { + "$ref": "#/definitions/AzureLanguageModel" + }, + { + "$ref": "#/definitions/DeepSeekLanguageModel" + }, { "$ref": "#/definitions/GoogleGenerativeAILanguageModel" }, + { + "$ref": "#/definitions/GoogleVertexAnthropicLanguageModel" + }, { "$ref": "#/definitions/GoogleVertexLanguageModel" }, { - "$ref": "#/definitions/GoogleVertexAnthropicLanguageModel" + "$ref": "#/definitions/MistralLanguageModel" + }, + { + "$ref": "#/definitions/OpenAILanguageModel" + }, + { + "$ref": "#/definitions/OpenRouterLanguageModel" + }, + { + "$ref": "#/definitions/XaiLanguageModel" } ] } \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index 7a473a8c..8bd61ead 100644 --- a/yarn.lock +++ b/yarn.lock @@ -32,6 +32,32 @@ __metadata: languageName: node linkType: hard +"@ai-sdk/azure@npm:2.0.0-beta.11": + version: 2.0.0-beta.11 + resolution: "@ai-sdk/azure@npm:2.0.0-beta.11" + dependencies: + "@ai-sdk/openai": "npm:2.0.0-beta.11" + "@ai-sdk/provider": "npm:2.0.0-beta.1" + "@ai-sdk/provider-utils": "npm:3.0.0-beta.5" + peerDependencies: + zod: ^3.25.76 || ^4 + checksum: 10c0/3de3bdfde6f604d6ed7e199e15acaed4844e7b59cadc99a662dbaea8bdd509198ab734b8fe41183b39ca73f24ca886cd90b924991929e6b81e6ec039328539b1 + languageName: node + linkType: hard + +"@ai-sdk/deepseek@npm:1.0.0-beta.8": + version: 1.0.0-beta.8 + resolution: "@ai-sdk/deepseek@npm:1.0.0-beta.8" + dependencies: + "@ai-sdk/openai-compatible": "npm:1.0.0-beta.8" + "@ai-sdk/provider": "npm:2.0.0-beta.1" + "@ai-sdk/provider-utils": "npm:3.0.0-beta.5" + peerDependencies: + zod: ^3.25.76 || ^4 + checksum: 10c0/4ff14a3032dcbf931db0f8b02e992ffdee541a2eca1aa49ffae4d56d9f9a14f5c4cc6fbbee03e1841964d00dbe9f7fa55c78ca7ea2c33865bf681d72ac0cf26b + languageName: node + linkType: hard + "@ai-sdk/gateway@npm:1.0.0-beta.8": version: 1.0.0-beta.8 resolution: "@ai-sdk/gateway@npm:1.0.0-beta.8" @@ -83,6 +109,42 @@ __metadata: languageName: node linkType: hard +"@ai-sdk/mistral@npm:2.0.0-beta.6": + version: 2.0.0-beta.6 + resolution: "@ai-sdk/mistral@npm:2.0.0-beta.6" + dependencies: + "@ai-sdk/provider": "npm:2.0.0-beta.1" + "@ai-sdk/provider-utils": "npm:3.0.0-beta.5" + peerDependencies: + zod: ^3.25.76 || ^4 + checksum: 10c0/075cbfc709b5c9b1af69db05c8f8f9e3edfe0caadaad72f26ceb4ee7022b785b8af62e982cfc6c496dff1386da0dd9742d675c55a14f348aff492bed52a310e5 + languageName: node + linkType: hard + +"@ai-sdk/openai-compatible@npm:1.0.0-beta.8": + version: 1.0.0-beta.8 + resolution: "@ai-sdk/openai-compatible@npm:1.0.0-beta.8" + dependencies: + "@ai-sdk/provider": "npm:2.0.0-beta.1" + "@ai-sdk/provider-utils": "npm:3.0.0-beta.5" + peerDependencies: + zod: ^3.25.76 || ^4 + checksum: 10c0/047f044bf0da9608e09073957916373bd39760ec00f498ba0c4a597ec70ba9eb4ef31f06b21b363b3c1ba775f64fcc46d41b60a171e0e99250824817ecb19ba8 + languageName: node + linkType: hard + +"@ai-sdk/openai@npm:2.0.0-beta.11": + version: 2.0.0-beta.11 + resolution: "@ai-sdk/openai@npm:2.0.0-beta.11" + dependencies: + "@ai-sdk/provider": "npm:2.0.0-beta.1" + "@ai-sdk/provider-utils": "npm:3.0.0-beta.5" + peerDependencies: + zod: ^3.25.76 || ^4 + checksum: 10c0/c48664c651cd50c10db5b18b963e39a964d5d69649c24350bff5cca3f5b02ef4f75531ff93a51e8463db91023b050d7f415c81ea0fd48eeb5a55bb5233b151a6 + languageName: node + linkType: hard + "@ai-sdk/openai@npm:2.0.0-beta.9": version: 2.0.0-beta.9 resolution: "@ai-sdk/openai@npm:2.0.0-beta.9" @@ -150,6 +212,19 @@ __metadata: languageName: node linkType: hard +"@ai-sdk/xai@npm:2.0.0-beta.10": + version: 2.0.0-beta.10 + resolution: "@ai-sdk/xai@npm:2.0.0-beta.10" + dependencies: + "@ai-sdk/openai-compatible": "npm:1.0.0-beta.8" + "@ai-sdk/provider": "npm:2.0.0-beta.1" + "@ai-sdk/provider-utils": "npm:3.0.0-beta.5" + peerDependencies: + zod: ^3.25.76 || ^4 + checksum: 10c0/8f6251785892db79306c95cdde38cbede40c4c73c354bfbdc78262fe2b6736646d0ce4186028e81d0ea59cdf6e584f53afdc2a3e3299e5df754d59c9ad828688 + languageName: node + linkType: hard + "@alloc/quick-lru@npm:^5.2.0": version: 5.2.0 resolution: "@alloc/quick-lru@npm:5.2.0" @@ -2995,6 +3070,16 @@ __metadata: languageName: node linkType: hard +"@openrouter/ai-sdk-provider@npm:1.0.0-beta.5": + version: 1.0.0-beta.5 + resolution: "@openrouter/ai-sdk-provider@npm:1.0.0-beta.5" + peerDependencies: + ai: ^5.0.0-beta.12 + zod: ^3.24.1 || ^v4 + checksum: 10c0/0aa75b0d2c6dbfe938f38a3049d06c00b5784e5cd06364dc0a35b88f8cb73db75d723cfe45b5b12bc0916819976f83866f9cfc755a1c3efaf5b8ba3839a60eeb + languageName: node + linkType: hard + "@opentelemetry/api-logs@npm:0.203.0, @opentelemetry/api-logs@npm:^0.203.0": version: 0.203.0 resolution: "@opentelemetry/api-logs@npm:0.203.0" @@ -6452,10 +6537,14 @@ __metadata: dependencies: "@ai-sdk/amazon-bedrock": "npm:3.0.0-beta.7" "@ai-sdk/anthropic": "npm:2.0.0-beta.8" + "@ai-sdk/azure": "npm:2.0.0-beta.11" + "@ai-sdk/deepseek": "npm:1.0.0-beta.8" "@ai-sdk/google": "npm:2.0.0-beta.11" "@ai-sdk/google-vertex": "npm:3.0.0-beta.15" + "@ai-sdk/mistral": "npm:2.0.0-beta.6" "@ai-sdk/openai": "npm:2.0.0-beta.9" "@ai-sdk/react": "npm:2.0.0-beta.21" + "@ai-sdk/xai": "npm:2.0.0-beta.10" "@auth/prisma-adapter": "npm:^2.7.4" "@codemirror/commands": "npm:^6.6.0" "@codemirror/lang-cpp": "npm:^6.0.2" @@ -6487,6 +6576,7 @@ __metadata: "@hookform/resolvers": "npm:^3.9.0" "@iconify/react": "npm:^5.1.0" "@iizukak/codemirror-lang-wgsl": "npm:^0.3.0" + "@openrouter/ai-sdk-provider": "npm:1.0.0-beta.5" "@opentelemetry/api-logs": "npm:^0.203.0" "@opentelemetry/instrumentation": "npm:^0.203.0" "@opentelemetry/sdk-logs": "npm:^0.203.0"