Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
94273a5
feat: implement `AI Bridge` heading to `/deployment/observability`
jakehwll Nov 17, 2025
0e77551
chore: `lint`/`fmt` fix
jakehwll Nov 17, 2025
53ee00f
fix: dont show `AI Bridge` heading unless enabled
jakehwll Nov 17, 2025
51cb6b9
fix: prefer to use `entitlement` over `featureVisibility`
jakehwll Nov 17, 2025
961045a
chore: commit bump
jakehwll Nov 18, 2025
8f9179e
feat: add testcase for `AIBridge`
jakehwll Nov 19, 2025
48aa5b5
fix: rename `AIBridge` to `AI Bridge`
jakehwll Nov 27, 2025
c8d605d
Merge branch 'main' into jakehwll/ai-bridge-observability
jakehwll Nov 27, 2025
9cd6621
fix: hide `access key` and `openai` key
jakehwll Nov 27, 2025
eebd457
chore: lint debug `AIBridge`
jakehwll Nov 27, 2025
31ad801
fix: restore `hidden` values
jakehwll Nov 27, 2025
dd86468
fix: hide `secret`ly annotated keys from observability
jakehwll Nov 27, 2025
a289020
chore: `AIBridge` -> `AI Bridge`
jakehwll Nov 27, 2025
9fe4f11
chore: `AIBridge` -> `AI_Bridge`
jakehwll Nov 27, 2025
afc8296
fix: remove yaml keys for security
jakehwll Nov 28, 2025
412c4cd
fix: remove keys from golden tests
jakehwll Nov 28, 2025
3f10ab6
fix: nuke keys from `server.md` (gen)
jakehwll Nov 28, 2025
1569749
fix: ignore keys in `deployment_test.go`
jakehwll Nov 28, 2025
5d2cd7a
Merge branch 'main' into jakehwll/ai-bridge-observability
jakehwll Nov 28, 2025
6e551ab
Merge branch 'main' into jakehwll/ai-bridge-observability
jakehwll Nov 29, 2025
0af34ae
Merge branch 'main' into jakehwll/ai-bridge-observability
jakehwll Dec 1, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions cli/testdata/server-config.yaml.golden
Original file line number Diff line number Diff line change
Expand Up @@ -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: <unset>, 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: <unset>, type: string)
anthropic_key: ""
# The AWS Bedrock API region.
# (default: <unset>, type: string)
bedrock_region: ""
# The access key to authenticate against the AWS Bedrock API.
# (default: <unset>, type: string)
bedrock_access_key: ""
# The access key secret to use with the access key to authenticate against the AWS
# Bedrock API.
# (default: <unset>, 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
Expand Down
8 changes: 4 additions & 4 deletions codersdk/deployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand Down
14 changes: 14 additions & 0 deletions codersdk/deployment_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
4 changes: 0 additions & 4 deletions docs/reference/cli/server.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ const ObservabilitySettingsPage: FC = () => {
<ObservabilitySettingsPageView
options={deploymentConfig.options}
featureAuditLogEnabled={entitlements.features.audit_log.enabled}
featureAIBridgeEnabled={entitlements.features.aibridge.enabled}
isPremium={hasPremiumLicense}
/>
</>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,18 @@ type Story = StoryObj<typeof ObservabilitySettingsPageView>;
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,
},
],
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
<Stack direction="column" spacing={6}>
<div>
Expand Down Expand Up @@ -94,6 +100,29 @@ export const ObservabilitySettingsPageView: FC<
)}
/>
</div>

{featureAIBridgeEnabled && (
<div>
<SettingsHeader
actions={
<SettingsHeaderDocsLink href={docs("/ai-coder/ai-bridge")} />
}
>
<SettingsHeaderTitle hierarchy="secondary" level="h2">
AI Bridge
</SettingsHeaderTitle>
<SettingsHeaderDescription>
Monitor and manage AI requests across your deployment.
</SettingsHeaderDescription>
</SettingsHeader>

<OptionsTable
options={options
.filter((o) => deploymentGroupHasParent(o.group, "AI Bridge"))
.filter((o) => !o.annotations?.secret === true)}
/>
</div>
)}
</Stack>
);
};
Loading