From abdfdfc683c23555c437b98ef24e65942cba1798 Mon Sep 17 00:00:00 2001 From: Kyle Carberry Date: Tue, 24 Feb 2026 13:40:02 -0500 Subject: [PATCH] refactor(ai): remove chat model catalog server options --- cli/testdata/coder_server_--help.golden | 12 ------ cli/testdata/server-config.yaml.golden | 12 ------ coderd/apidoc/docs.go | 6 --- coderd/apidoc/swagger.json | 6 --- codersdk/deployment.go | 42 ------------------- docs/reference/api/general.md | 2 - docs/reference/api/schemas.md | 10 ----- docs/reference/cli/server.md | 40 ------------------ .../cli/testdata/coder_server_--help.golden | 12 ------ site/src/api/typesGenerated.ts | 2 - 10 files changed, 144 deletions(-) diff --git a/cli/testdata/coder_server_--help.golden b/cli/testdata/coder_server_--help.golden index c5a30194d3..c29e0cd5ab 100644 --- a/cli/testdata/coder_server_--help.golden +++ b/cli/testdata/coder_server_--help.golden @@ -177,18 +177,6 @@ AI BRIDGE OPTIONS: --agent-local-workspace bool, $CODER_AGENT_LOCAL_WORKSPACE (default: false) Enable admin-only local workspace mode for agent chats. - --chat-anthropic-models-url string, $CODER_CHAT_ANTHROPIC_MODELS_URL - Override URL used to list Anthropic models for the chat model catalog. - - --chat-models-allowlist string, $CODER_CHAT_MODELS_ALLOWLIST - Comma-separated allowlist of models for the chat model catalog. - - --chat-models-denylist string, $CODER_CHAT_MODELS_DENYLIST - Comma-separated denylist of models for the chat model catalog. - - --chat-openai-models-url string, $CODER_CHAT_OPENAI_MODELS_URL - Override URL used to list OpenAI models for the chat model catalog. - --chat-system-prompt string, $CODER_CHAT_SYSTEM_PROMPT (default: You are the Coder agent — an interactive chat tool that helps users with software-engineering tasks inside of the Coder product. Use the instructions below and the tools available to you to assist User. diff --git a/cli/testdata/server-config.yaml.golden b/cli/testdata/server-config.yaml.golden index 57d0949cd6..939fa9e8b9 100644 --- a/cli/testdata/server-config.yaml.golden +++ b/cli/testdata/server-config.yaml.golden @@ -926,21 +926,9 @@ aibridge: # The base URL of the OpenAI API. # (default: https://api.openai.com/v1/, type: string) openai_base_url: https://api.openai.com/v1/ - # Override URL used to list OpenAI models for the chat model catalog. - # (default: , type: string) - chat_openai_models_url: "" # The base URL of the Anthropic API. # (default: https://api.anthropic.com/, type: string) anthropic_base_url: https://api.anthropic.com/ - # Override URL used to list Anthropic models for the chat model catalog. - # (default: , type: string) - chat_anthropic_models_url: "" - # Comma-separated allowlist of models for the chat model catalog. - # (default: , type: string) - chat_models_allowlist: "" - # Comma-separated denylist of models for the chat model catalog. - # (default: , type: string) - chat_models_denylist: "" # The base URL to use for the AWS Bedrock API. Use this setting to specify an # exact URL to use. Takes precedence over CODER_AIBRIDGE_BEDROCK_REGION. # (default: , type: string) diff --git a/coderd/apidoc/docs.go b/coderd/apidoc/docs.go index c6ba7737e4..0a91b12a76 100644 --- a/coderd/apidoc/docs.go +++ b/coderd/apidoc/docs.go @@ -12849,12 +12849,6 @@ const docTemplate = `{ "max_concurrency": { "type": "integer" }, - "models_allowlist": { - "type": "string" - }, - "models_denylist": { - "type": "string" - }, "openai": { "$ref": "#/definitions/codersdk.AIBridgeOpenAIConfig" }, diff --git a/coderd/apidoc/swagger.json b/coderd/apidoc/swagger.json index aff2fe00f2..2500a4bc36 100644 --- a/coderd/apidoc/swagger.json +++ b/coderd/apidoc/swagger.json @@ -11413,12 +11413,6 @@ "max_concurrency": { "type": "integer" }, - "models_allowlist": { - "type": "string" - }, - "models_denylist": { - "type": "string" - }, "openai": { "$ref": "#/definitions/codersdk.AIBridgeOpenAIConfig" }, diff --git a/codersdk/deployment.go b/codersdk/deployment.go index 569aae52b2..3a2a37295c 100644 --- a/codersdk/deployment.go +++ b/codersdk/deployment.go @@ -3715,16 +3715,6 @@ Don't assume what needs to be done - collaborate to define the scope together. Group: &deploymentGroupAIBridge, YAML: "openai_base_url", }, - { - Name: "Chat OpenAI Models URL", - Description: "Override URL used to list OpenAI models for the chat model catalog.", - Flag: "chat-openai-models-url", - Env: "CODER_CHAT_OPENAI_MODELS_URL", - Value: &c.AI.BridgeConfig.OpenAI.ModelsURL, - Default: "", - Group: &deploymentGroupAIBridge, - YAML: "chat_openai_models_url", - }, { Name: "AI Bridge OpenAI Key", Description: "The key to authenticate against the OpenAI API.", @@ -3745,16 +3735,6 @@ Don't assume what needs to be done - collaborate to define the scope together. Group: &deploymentGroupAIBridge, YAML: "anthropic_base_url", }, - { - Name: "Chat Anthropic Models URL", - Description: "Override URL used to list Anthropic models for the chat model catalog.", - Flag: "chat-anthropic-models-url", - Env: "CODER_CHAT_ANTHROPIC_MODELS_URL", - Value: &c.AI.BridgeConfig.Anthropic.ModelsURL, - Default: "", - Group: &deploymentGroupAIBridge, - YAML: "chat_anthropic_models_url", - }, { Name: "AI Bridge Anthropic Key", Description: "The key to authenticate against the Anthropic API.", @@ -3765,26 +3745,6 @@ Don't assume what needs to be done - collaborate to define the scope together. Group: &deploymentGroupAIBridge, Annotations: serpent.Annotations{}.Mark(annotationSecretKey, "true"), }, - { - Name: "Chat Models Allowlist", - Description: "Comma-separated allowlist of models for the chat model catalog.", - Flag: "chat-models-allowlist", - Env: "CODER_CHAT_MODELS_ALLOWLIST", - Value: &c.AI.BridgeConfig.ModelsAllowlist, - Default: "", - Group: &deploymentGroupAIBridge, - YAML: "chat_models_allowlist", - }, - { - Name: "Chat Models Denylist", - Description: "Comma-separated denylist of models for the chat model catalog.", - Flag: "chat-models-denylist", - Env: "CODER_CHAT_MODELS_DENYLIST", - Value: &c.AI.BridgeConfig.ModelsDenylist, - Default: "", - Group: &deploymentGroupAIBridge, - YAML: "chat_models_denylist", - }, { Name: "AI Bridge Bedrock Base URL", Description: "The base URL to use for the AWS Bedrock API. Use this setting to specify an exact URL to use. Takes precedence " + @@ -4117,8 +4077,6 @@ type AIBridgeConfig struct { Enabled serpent.Bool `json:"enabled" typescript:",notnull"` OpenAI AIBridgeOpenAIConfig `json:"openai" typescript:",notnull"` Anthropic AIBridgeAnthropicConfig `json:"anthropic" typescript:",notnull"` - ModelsAllowlist serpent.String `json:"models_allowlist" typescript:",notnull"` - ModelsDenylist serpent.String `json:"models_denylist" typescript:",notnull"` Bedrock AIBridgeBedrockConfig `json:"bedrock" typescript:",notnull"` InjectCoderMCPTools serpent.Bool `json:"inject_coder_mcp_tools" typescript:",notnull"` Retention serpent.Duration `json:"retention" typescript:",notnull"` diff --git a/docs/reference/api/general.md b/docs/reference/api/general.md index f9395ae2c1..1fdc82c0f4 100644 --- a/docs/reference/api/general.md +++ b/docs/reference/api/general.md @@ -195,8 +195,6 @@ curl -X GET http://coder-server:8080/api/v2/deployment/config \ "enabled": true, "inject_coder_mcp_tools": true, "max_concurrency": 0, - "models_allowlist": "string", - "models_denylist": "string", "openai": { "base_url": "string", "key": "string", diff --git a/docs/reference/api/schemas.md b/docs/reference/api/schemas.md index 4454a17e4f..ac51e95690 100644 --- a/docs/reference/api/schemas.md +++ b/docs/reference/api/schemas.md @@ -402,8 +402,6 @@ "enabled": true, "inject_coder_mcp_tools": true, "max_concurrency": 0, - "models_allowlist": "string", - "models_denylist": "string", "openai": { "base_url": "string", "key": "string", @@ -430,8 +428,6 @@ | `enabled` | boolean | false | | | | `inject_coder_mcp_tools` | boolean | false | | | | `max_concurrency` | integer | false | | | -| `models_allowlist` | string | false | | | -| `models_denylist` | string | false | | | | `openai` | [codersdk.AIBridgeOpenAIConfig](#codersdkaibridgeopenaiconfig) | false | | | | `rate_limit` | integer | false | | | | `retention` | integer | false | | | @@ -799,8 +795,6 @@ "enabled": true, "inject_coder_mcp_tools": true, "max_concurrency": 0, - "models_allowlist": "string", - "models_denylist": "string", "openai": { "base_url": "string", "key": "string", @@ -3474,8 +3468,6 @@ CreateWorkspaceRequest provides options for creating a new workspace. Only one o "enabled": true, "inject_coder_mcp_tools": true, "max_concurrency": 0, - "models_allowlist": "string", - "models_denylist": "string", "openai": { "base_url": "string", "key": "string", @@ -4052,8 +4044,6 @@ CreateWorkspaceRequest provides options for creating a new workspace. Only one o "enabled": true, "inject_coder_mcp_tools": true, "max_concurrency": 0, - "models_allowlist": "string", - "models_denylist": "string", "openai": { "base_url": "string", "key": "string", diff --git a/docs/reference/cli/server.md b/docs/reference/cli/server.md index 106640946b..90f9ff301b 100644 --- a/docs/reference/cli/server.md +++ b/docs/reference/cli/server.md @@ -1826,16 +1826,6 @@ Whether to start an in-memory aibridged instance. The base URL of the OpenAI API. -### --chat-openai-models-url - -| | | -|-------------|----------------------------------------------| -| Type | string | -| Environment | $CODER_CHAT_OPENAI_MODELS_URL | -| YAML | aibridge.chat_openai_models_url | - -Override URL used to list OpenAI models for the chat model catalog. - ### --aibridge-openai-key | | | @@ -1856,16 +1846,6 @@ The key to authenticate against the OpenAI API. The base URL of the Anthropic API. -### --chat-anthropic-models-url - -| | | -|-------------|-------------------------------------------------| -| Type | string | -| Environment | $CODER_CHAT_ANTHROPIC_MODELS_URL | -| YAML | aibridge.chat_anthropic_models_url | - -Override URL used to list Anthropic models for the chat model catalog. - ### --aibridge-anthropic-key | | | @@ -1875,26 +1855,6 @@ Override URL used to list Anthropic models for the chat model catalog. The key to authenticate against the Anthropic API. -### --chat-models-allowlist - -| | | -|-------------|---------------------------------------------| -| Type | string | -| Environment | $CODER_CHAT_MODELS_ALLOWLIST | -| YAML | aibridge.chat_models_allowlist | - -Comma-separated allowlist of models for the chat model catalog. - -### --chat-models-denylist - -| | | -|-------------|--------------------------------------------| -| Type | string | -| Environment | $CODER_CHAT_MODELS_DENYLIST | -| YAML | aibridge.chat_models_denylist | - -Comma-separated denylist of models for the chat model catalog. - ### --aibridge-bedrock-base-url | | | diff --git a/enterprise/cli/testdata/coder_server_--help.golden b/enterprise/cli/testdata/coder_server_--help.golden index 6c6ac561e2..196f8351c3 100644 --- a/enterprise/cli/testdata/coder_server_--help.golden +++ b/enterprise/cli/testdata/coder_server_--help.golden @@ -178,18 +178,6 @@ AI BRIDGE OPTIONS: --agent-local-workspace bool, $CODER_AGENT_LOCAL_WORKSPACE (default: false) Enable admin-only local workspace mode for agent chats. - --chat-anthropic-models-url string, $CODER_CHAT_ANTHROPIC_MODELS_URL - Override URL used to list Anthropic models for the chat model catalog. - - --chat-models-allowlist string, $CODER_CHAT_MODELS_ALLOWLIST - Comma-separated allowlist of models for the chat model catalog. - - --chat-models-denylist string, $CODER_CHAT_MODELS_DENYLIST - Comma-separated denylist of models for the chat model catalog. - - --chat-openai-models-url string, $CODER_CHAT_OPENAI_MODELS_URL - Override URL used to list OpenAI models for the chat model catalog. - --chat-system-prompt string, $CODER_CHAT_SYSTEM_PROMPT (default: You are the Coder agent — an interactive chat tool that helps users with software-engineering tasks inside of the Coder product. Use the instructions below and the tools available to you to assist User. diff --git a/site/src/api/typesGenerated.ts b/site/src/api/typesGenerated.ts index a80efd4b2c..db429d59c2 100644 --- a/site/src/api/typesGenerated.ts +++ b/site/src/api/typesGenerated.ts @@ -32,8 +32,6 @@ export interface AIBridgeConfig { readonly enabled: boolean; readonly openai: AIBridgeOpenAIConfig; readonly anthropic: AIBridgeAnthropicConfig; - readonly models_allowlist: string; - readonly models_denylist: string; readonly bedrock: AIBridgeBedrockConfig; readonly inject_coder_mcp_tools: boolean; readonly retention: number;