diff --git a/cli/testdata/server-config.yaml.golden b/cli/testdata/server-config.yaml.golden index c8f1f94a85f23..8b254fe29592f 100644 --- a/cli/testdata/server-config.yaml.golden +++ b/cli/testdata/server-config.yaml.golden @@ -720,25 +720,12 @@ aibridge: # The base URL of the OpenAI API. # (default: https://api.openai.com/v1/, type: string) openai_base_url: https://api.openai.com/v1/ - # The key to authenticate against the OpenAI API. - # (default: , type: string) - openai_key: "" # The base URL of the Anthropic API. # (default: https://api.anthropic.com/, type: string) anthropic_base_url: https://api.anthropic.com/ - # The key to authenticate against the Anthropic API. - # (default: , type: string) - anthropic_key: "" # The AWS Bedrock API region. # (default: , type: string) bedrock_region: "" - # The access key to authenticate against the AWS Bedrock API. - # (default: , type: string) - bedrock_access_key: "" - # The access key secret to use with the access key to authenticate against the AWS - # Bedrock API. - # (default: , type: string) - bedrock_access_key_secret: "" # The model to use when making requests to the AWS Bedrock API. # (default: global.anthropic.claude-sonnet-4-5-20250929-v1:0, type: string) bedrock_model: global.anthropic.claude-sonnet-4-5-20250929-v1:0 diff --git a/codersdk/deployment.go b/codersdk/deployment.go index 29081b4bf6076..7b09e3a83c13b 100644 --- a/codersdk/deployment.go +++ b/codersdk/deployment.go @@ -3270,7 +3270,7 @@ Write out the current server config as YAML to stdout.`, Value: &c.AI.BridgeConfig.OpenAI.Key, Default: "", Group: &deploymentGroupAIBridge, - YAML: "openai_key", + Annotations: serpent.Annotations{}.Mark(annotationSecretKey, "true"), }, { Name: "AI Bridge Anthropic Base URL", @@ -3290,7 +3290,7 @@ Write out the current server config as YAML to stdout.`, Value: &c.AI.BridgeConfig.Anthropic.Key, Default: "", Group: &deploymentGroupAIBridge, - YAML: "anthropic_key", + Annotations: serpent.Annotations{}.Mark(annotationSecretKey, "true"), }, { Name: "AI Bridge Bedrock Region", @@ -3310,7 +3310,7 @@ Write out the current server config as YAML to stdout.`, Value: &c.AI.BridgeConfig.Bedrock.AccessKey, Default: "", Group: &deploymentGroupAIBridge, - YAML: "bedrock_access_key", + Annotations: serpent.Annotations{}.Mark(annotationSecretKey, "true"), }, { Name: "AI Bridge Bedrock Access Key Secret", @@ -3320,7 +3320,7 @@ Write out the current server config as YAML to stdout.`, Value: &c.AI.BridgeConfig.Bedrock.AccessKeySecret, Default: "", Group: &deploymentGroupAIBridge, - YAML: "bedrock_access_key_secret", + Annotations: serpent.Annotations{}.Mark(annotationSecretKey, "true"), }, { Name: "AI Bridge Bedrock Model", diff --git a/codersdk/deployment_test.go b/codersdk/deployment_test.go index ee3f7365d6244..0b46320892c00 100644 --- a/codersdk/deployment_test.go +++ b/codersdk/deployment_test.go @@ -84,6 +84,20 @@ func TestDeploymentValues_HighlyConfigurable(t *testing.T) { "Notifications: Email Auth: Password": { yaml: true, }, + // We don't want these to be configurable via YAML because they are secrets. + // However, we do want to allow them to be shown in documentation. + "AI Bridge OpenAI Key": { + yaml: true, + }, + "AI Bridge Anthropic Key": { + yaml: true, + }, + "AI Bridge Bedrock Access Key": { + yaml: true, + }, + "AI Bridge Bedrock Access Key Secret": { + yaml: true, + }, } set := (&codersdk.DeploymentValues{}).Options() diff --git a/docs/reference/cli/server.md b/docs/reference/cli/server.md index 951e140f3f01f..8f86ea7248aa1 100644 --- a/docs/reference/cli/server.md +++ b/docs/reference/cli/server.md @@ -1676,7 +1676,6 @@ The base URL of the OpenAI API. |-------------|-----------------------------------------| | Type | string | | Environment | $CODER_AIBRIDGE_OPENAI_KEY | -| YAML | aibridge.openai_key | The key to authenticate against the OpenAI API. @@ -1697,7 +1696,6 @@ The base URL of the Anthropic API. |-------------|--------------------------------------------| | Type | string | | Environment | $CODER_AIBRIDGE_ANTHROPIC_KEY | -| YAML | aibridge.anthropic_key | The key to authenticate against the Anthropic API. @@ -1717,7 +1715,6 @@ The AWS Bedrock API region. |-------------|-------------------------------------------------| | Type | string | | Environment | $CODER_AIBRIDGE_BEDROCK_ACCESS_KEY | -| YAML | aibridge.bedrock_access_key | The access key to authenticate against the AWS Bedrock API. @@ -1727,7 +1724,6 @@ The access key to authenticate against the AWS Bedrock API. |-------------|--------------------------------------------------------| | Type | string | | Environment | $CODER_AIBRIDGE_BEDROCK_ACCESS_KEY_SECRET | -| YAML | aibridge.bedrock_access_key_secret | The access key secret to use with the access key to authenticate against the AWS Bedrock API. diff --git a/site/src/pages/DeploymentSettingsPage/ObservabilitySettingsPage/ObservabilitySettingsPage.tsx b/site/src/pages/DeploymentSettingsPage/ObservabilitySettingsPage/ObservabilitySettingsPage.tsx index 31bfb4d940bc0..1d2c9da8bd804 100644 --- a/site/src/pages/DeploymentSettingsPage/ObservabilitySettingsPage/ObservabilitySettingsPage.tsx +++ b/site/src/pages/DeploymentSettingsPage/ObservabilitySettingsPage/ObservabilitySettingsPage.tsx @@ -17,6 +17,7 @@ const ObservabilitySettingsPage: FC = () => { diff --git a/site/src/pages/DeploymentSettingsPage/ObservabilitySettingsPage/ObservabilitySettingsPageView.stories.tsx b/site/src/pages/DeploymentSettingsPage/ObservabilitySettingsPage/ObservabilitySettingsPageView.stories.tsx index f52def7cd6036..4c4275aa2ce7a 100644 --- a/site/src/pages/DeploymentSettingsPage/ObservabilitySettingsPage/ObservabilitySettingsPageView.stories.tsx +++ b/site/src/pages/DeploymentSettingsPage/ObservabilitySettingsPage/ObservabilitySettingsPageView.stories.tsx @@ -54,3 +54,18 @@ type Story = StoryObj; export const Page: Story = {}; export const Premium: Story = { args: { isPremium: true } }; + +export const AI_Bridge: Story = { + args: { + featureAIBridgeEnabled: true, + options: [ + { + name: "AI Bridge Enabled", + value: true, + group: { name: "AI Bridge" }, + flag: "aibridge-enabled", + hidden: false, + }, + ], + }, +}; diff --git a/site/src/pages/DeploymentSettingsPage/ObservabilitySettingsPage/ObservabilitySettingsPageView.tsx b/site/src/pages/DeploymentSettingsPage/ObservabilitySettingsPage/ObservabilitySettingsPageView.tsx index 728efbf33f2e5..d70e44698fb79 100644 --- a/site/src/pages/DeploymentSettingsPage/ObservabilitySettingsPage/ObservabilitySettingsPageView.tsx +++ b/site/src/pages/DeploymentSettingsPage/ObservabilitySettingsPage/ObservabilitySettingsPageView.tsx @@ -25,12 +25,18 @@ import OptionsTable from "../OptionsTable"; type ObservabilitySettingsPageViewProps = { options: SerpentOption[]; featureAuditLogEnabled: boolean; + featureAIBridgeEnabled: boolean; isPremium: boolean; }; export const ObservabilitySettingsPageView: FC< ObservabilitySettingsPageViewProps -> = ({ options, featureAuditLogEnabled, isPremium }) => { +> = ({ + options, + featureAuditLogEnabled, + isPremium, + featureAIBridgeEnabled, +}) => { return (
@@ -94,6 +100,29 @@ export const ObservabilitySettingsPageView: FC< )} />
+ + {featureAIBridgeEnabled && ( +
+ + } + > + + AI Bridge + + + Monitor and manage AI requests across your deployment. + + + + deploymentGroupHasParent(o.group, "AI Bridge")) + .filter((o) => !o.annotations?.secret === true)} + /> +
+ )}
); };