mirror of
https://github.com/coder/coder.git
synced 2026-06-02 20:48:20 +00:00
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.
This commit is contained in:
+1
-1
@@ -157,7 +157,7 @@ AI GATEWAY OPTIONS:
|
|||||||
Length of time to retain data such as interceptions and all related
|
Length of time to retain data such as interceptions and all related
|
||||||
records (token, prompt, tool use).
|
records (token, prompt, tool use).
|
||||||
|
|
||||||
--ai-gateway-enabled bool, $CODER_AI_GATEWAY_ENABLED (default: false)
|
--ai-gateway-enabled bool, $CODER_AI_GATEWAY_ENABLED (default: true)
|
||||||
Whether to start an in-memory AI Gateway instance.
|
Whether to start an in-memory AI Gateway instance.
|
||||||
|
|
||||||
--ai-gateway-max-concurrency int, $CODER_AI_GATEWAY_MAX_CONCURRENCY (default: 0)
|
--ai-gateway-max-concurrency int, $CODER_AI_GATEWAY_MAX_CONCURRENCY (default: 0)
|
||||||
|
|||||||
+4
-4
@@ -768,8 +768,8 @@ chat:
|
|||||||
aibridge:
|
aibridge:
|
||||||
# Deprecated: use --ai-gateway-enabled or CODER_AI_GATEWAY_ENABLED instead.
|
# Deprecated: use --ai-gateway-enabled or CODER_AI_GATEWAY_ENABLED instead.
|
||||||
# Whether to start an in-memory aibridged instance.
|
# Whether to start an in-memory aibridged instance.
|
||||||
# (default: false, type: bool)
|
# (default: true, type: bool)
|
||||||
enabled: false
|
enabled: true
|
||||||
# Deprecated: use --ai-gateway-openai-base-url or CODER_AI_GATEWAY_OPENAI_BASE_URL
|
# Deprecated: use --ai-gateway-openai-base-url or CODER_AI_GATEWAY_OPENAI_BASE_URL
|
||||||
# instead. The base URL of the OpenAI API.
|
# instead. The base URL of the OpenAI API.
|
||||||
# (default: https://api.openai.com/v1/, type: string)
|
# (default: https://api.openai.com/v1/, type: string)
|
||||||
@@ -867,8 +867,8 @@ aibridge:
|
|||||||
circuit_breaker_max_requests: 3
|
circuit_breaker_max_requests: 3
|
||||||
ai_gateway:
|
ai_gateway:
|
||||||
# Whether to start an in-memory AI Gateway instance.
|
# Whether to start an in-memory AI Gateway instance.
|
||||||
# (default: false, type: bool)
|
# (default: true, type: bool)
|
||||||
enabled: false
|
enabled: true
|
||||||
# The base URL of the OpenAI API.
|
# The base URL of the OpenAI API.
|
||||||
# (default: https://api.openai.com/v1/, type: string)
|
# (default: https://api.openai.com/v1/, type: string)
|
||||||
openai_base_url: https://api.openai.com/v1/
|
openai_base_url: https://api.openai.com/v1/
|
||||||
|
|||||||
@@ -250,7 +250,7 @@ func (n FeatureName) Humanize() string {
|
|||||||
case FeatureSCIM:
|
case FeatureSCIM:
|
||||||
return "SCIM"
|
return "SCIM"
|
||||||
case FeatureAIBridge:
|
case FeatureAIBridge:
|
||||||
return "AI Bridge"
|
return "AI Gateway"
|
||||||
case FeatureAIGovernanceUserLimit:
|
case FeatureAIGovernanceUserLimit:
|
||||||
return "AI Governance User Limit"
|
return "AI Governance User Limit"
|
||||||
default:
|
default:
|
||||||
@@ -1705,7 +1705,7 @@ func (c *DeploymentValues) Options() serpent.OptionSet {
|
|||||||
Flag: "ai-gateway-enabled",
|
Flag: "ai-gateway-enabled",
|
||||||
Env: "CODER_AI_GATEWAY_ENABLED",
|
Env: "CODER_AI_GATEWAY_ENABLED",
|
||||||
Value: &c.AI.BridgeConfig.Enabled,
|
Value: &c.AI.BridgeConfig.Enabled,
|
||||||
Default: "false",
|
Default: "true",
|
||||||
Group: &deploymentGroupAIGateway,
|
Group: &deploymentGroupAIGateway,
|
||||||
YAML: "enabled",
|
YAML: "enabled",
|
||||||
}
|
}
|
||||||
@@ -4055,7 +4055,7 @@ Write out the current server config as YAML to stdout.`,
|
|||||||
Flag: "aibridge-enabled",
|
Flag: "aibridge-enabled",
|
||||||
Env: "CODER_AIBRIDGE_ENABLED",
|
Env: "CODER_AIBRIDGE_ENABLED",
|
||||||
Value: &c.AI.BridgeConfig.Enabled,
|
Value: &c.AI.BridgeConfig.Enabled,
|
||||||
Default: "false",
|
Default: "true",
|
||||||
Group: &deploymentGroupAIBridge,
|
Group: &deploymentGroupAIBridge,
|
||||||
YAML: "enabled",
|
YAML: "enabled",
|
||||||
Hidden: true,
|
Hidden: true,
|
||||||
|
|||||||
Generated
+1
-1
@@ -1730,7 +1730,7 @@ Force chat debug logging on for every chat, bypassing the runtime admin and user
|
|||||||
| Type | <code>bool</code> |
|
| Type | <code>bool</code> |
|
||||||
| Environment | <code>$CODER_AI_GATEWAY_ENABLED</code> |
|
| Environment | <code>$CODER_AI_GATEWAY_ENABLED</code> |
|
||||||
| YAML | <code>ai_gateway.enabled</code> |
|
| YAML | <code>ai_gateway.enabled</code> |
|
||||||
| Default | <code>false</code> |
|
| Default | <code>true</code> |
|
||||||
|
|
||||||
Whether to start an in-memory AI Gateway instance.
|
Whether to start an in-memory AI Gateway instance.
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -158,7 +158,7 @@ AI GATEWAY OPTIONS:
|
|||||||
Length of time to retain data such as interceptions and all related
|
Length of time to retain data such as interceptions and all related
|
||||||
records (token, prompt, tool use).
|
records (token, prompt, tool use).
|
||||||
|
|
||||||
--ai-gateway-enabled bool, $CODER_AI_GATEWAY_ENABLED (default: false)
|
--ai-gateway-enabled bool, $CODER_AI_GATEWAY_ENABLED (default: true)
|
||||||
Whether to start an in-memory AI Gateway instance.
|
Whether to start an in-memory AI Gateway instance.
|
||||||
|
|
||||||
--ai-gateway-max-concurrency int, $CODER_AI_GATEWAY_MAX_CONCURRENCY (default: 0)
|
--ai-gateway-max-concurrency int, $CODER_AI_GATEWAY_MAX_CONCURRENCY (default: 0)
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ func TestAIBridgeListInterceptions(t *testing.T) {
|
|||||||
var sdkErr *codersdk.Error
|
var sdkErr *codersdk.Error
|
||||||
require.ErrorAs(t, err, &sdkErr)
|
require.ErrorAs(t, err, &sdkErr)
|
||||||
require.Equal(t, http.StatusForbidden, sdkErr.StatusCode())
|
require.Equal(t, http.StatusForbidden, sdkErr.StatusCode())
|
||||||
require.Equal(t, "AI Bridge is a Premium feature. Contact sales!", sdkErr.Message)
|
require.Equal(t, "AI Gateway is a Premium feature. Contact sales!", sdkErr.Message)
|
||||||
})
|
})
|
||||||
|
|
||||||
t.Run("EmptyDB", func(t *testing.T) {
|
t.Run("EmptyDB", func(t *testing.T) {
|
||||||
|
|||||||
@@ -94,6 +94,7 @@ func TestEntitlements(t *testing.T) {
|
|||||||
features[codersdk.FeatureUserLimit] = 100
|
features[codersdk.FeatureUserLimit] = 100
|
||||||
coderdenttest.AddLicense(t, adminClient, coderdenttest.LicenseOptions{
|
coderdenttest.AddLicense(t, adminClient, coderdenttest.LicenseOptions{
|
||||||
Features: features,
|
Features: features,
|
||||||
|
Addons: []codersdk.Addon{codersdk.AddonAIGovernance},
|
||||||
GraceAt: time.Now().Add(59 * 24 * time.Hour),
|
GraceAt: time.Now().Add(59 * 24 * time.Hour),
|
||||||
})
|
})
|
||||||
res, err := adminClient.Entitlements(context.Background()) //nolint:gocritic // adding another user would put us over user limit
|
res, err := adminClient.Entitlements(context.Background()) //nolint:gocritic // adding another user would put us over user limit
|
||||||
|
|||||||
Reference in New Issue
Block a user