Skip to content

Commit c50b0e8

Browse files
authored
feat!: default CODER_AI_GATEWAY_ENABLED to true (#25575)
`CODER_AI_GATEWAY_ENABLED` / `CODER_AIBRIDGE_ENABLED` is now being defaulted to `true` now that it will be used by Coder Agents. If you previously had this value disabled explicitly, that value will persist.
1 parent 9341efe commit c50b0e8

7 files changed

Lines changed: 12 additions & 11 deletions

File tree

cli/testdata/coder_server_--help.golden

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ AI GATEWAY OPTIONS:
157157
Length of time to retain data such as interceptions and all related
158158
records (token, prompt, tool use).
159159

160-
--ai-gateway-enabled bool, $CODER_AI_GATEWAY_ENABLED (default: false)
160+
--ai-gateway-enabled bool, $CODER_AI_GATEWAY_ENABLED (default: true)
161161
Whether to start an in-memory AI Gateway instance.
162162

163163
--ai-gateway-max-concurrency int, $CODER_AI_GATEWAY_MAX_CONCURRENCY (default: 0)

cli/testdata/server-config.yaml.golden

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -768,8 +768,8 @@ chat:
768768
aibridge:
769769
# Deprecated: use --ai-gateway-enabled or CODER_AI_GATEWAY_ENABLED instead.
770770
# Whether to start an in-memory aibridged instance.
771-
# (default: false, type: bool)
772-
enabled: false
771+
# (default: true, type: bool)
772+
enabled: true
773773
# Deprecated: use --ai-gateway-openai-base-url or CODER_AI_GATEWAY_OPENAI_BASE_URL
774774
# instead. The base URL of the OpenAI API.
775775
# (default: https://api.openai.com/v1/, type: string)
@@ -867,8 +867,8 @@ aibridge:
867867
circuit_breaker_max_requests: 3
868868
ai_gateway:
869869
# Whether to start an in-memory AI Gateway instance.
870-
# (default: false, type: bool)
871-
enabled: false
870+
# (default: true, type: bool)
871+
enabled: true
872872
# The base URL of the OpenAI API.
873873
# (default: https://api.openai.com/v1/, type: string)
874874
openai_base_url: https://api.openai.com/v1/

codersdk/deployment.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ func (n FeatureName) Humanize() string {
250250
case FeatureSCIM:
251251
return "SCIM"
252252
case FeatureAIBridge:
253-
return "AI Bridge"
253+
return "AI Gateway"
254254
case FeatureAIGovernanceUserLimit:
255255
return "AI Governance User Limit"
256256
default:
@@ -1705,7 +1705,7 @@ func (c *DeploymentValues) Options() serpent.OptionSet {
17051705
Flag: "ai-gateway-enabled",
17061706
Env: "CODER_AI_GATEWAY_ENABLED",
17071707
Value: &c.AI.BridgeConfig.Enabled,
1708-
Default: "false",
1708+
Default: "true",
17091709
Group: &deploymentGroupAIGateway,
17101710
YAML: "enabled",
17111711
}
@@ -4055,7 +4055,7 @@ Write out the current server config as YAML to stdout.`,
40554055
Flag: "aibridge-enabled",
40564056
Env: "CODER_AIBRIDGE_ENABLED",
40574057
Value: &c.AI.BridgeConfig.Enabled,
4058-
Default: "false",
4058+
Default: "true",
40594059
Group: &deploymentGroupAIBridge,
40604060
YAML: "enabled",
40614061
Hidden: true,

docs/reference/cli/server.md

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

enterprise/cli/testdata/coder_server_--help.golden

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ AI GATEWAY OPTIONS:
158158
Length of time to retain data such as interceptions and all related
159159
records (token, prompt, tool use).
160160

161-
--ai-gateway-enabled bool, $CODER_AI_GATEWAY_ENABLED (default: false)
161+
--ai-gateway-enabled bool, $CODER_AI_GATEWAY_ENABLED (default: true)
162162
Whether to start an in-memory AI Gateway instance.
163163

164164
--ai-gateway-max-concurrency int, $CODER_AI_GATEWAY_MAX_CONCURRENCY (default: 0)

enterprise/coderd/aibridge_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ func TestAIBridgeListInterceptions(t *testing.T) {
5454
var sdkErr *codersdk.Error
5555
require.ErrorAs(t, err, &sdkErr)
5656
require.Equal(t, http.StatusForbidden, sdkErr.StatusCode())
57-
require.Equal(t, "AI Bridge is a Premium feature. Contact sales!", sdkErr.Message)
57+
require.Equal(t, "AI Gateway is a Premium feature. Contact sales!", sdkErr.Message)
5858
})
5959

6060
t.Run("EmptyDB", func(t *testing.T) {

enterprise/coderd/coderd_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ func TestEntitlements(t *testing.T) {
9494
features[codersdk.FeatureUserLimit] = 100
9595
coderdenttest.AddLicense(t, adminClient, coderdenttest.LicenseOptions{
9696
Features: features,
97+
Addons: []codersdk.Addon{codersdk.AddonAIGovernance},
9798
GraceAt: time.Now().Add(59 * 24 * time.Hour),
9899
})
99100
res, err := adminClient.Entitlements(context.Background()) //nolint:gocritic // adding another user would put us over user limit

0 commit comments

Comments
 (0)