fix: deprecate ai provider seeding env config (#25854)

Environment variables used to configure AI Gateway providers are now deprecated, and we need to reflect this as such.
This commit is contained in:
Danny Kopping
2026-06-01 15:15:47 +02:00
committed by GitHub
parent 61a9c4a61d
commit c8555e2163
7 changed files with 244 additions and 84 deletions
+25 -26
View File
@@ -1700,6 +1700,7 @@ func (c *DeploymentValues) Options() serpent.OptionSet {
}
// AI Gateway options
aiGatewayProviderSeedingDeprecated := "Deprecated: manage AI Providers from the Coder UI or HTTP API. If set, this option seeds provider configuration at startup only exactly once. It will not be used in service runtime. "
aiGatewayEnabled := serpent.Option{
Name: "AI Gateway Enabled",
Description: "Whether to start an in-memory AI Gateway instance.",
@@ -1712,7 +1713,7 @@ func (c *DeploymentValues) Options() serpent.OptionSet {
}
aiGatewayOpenAIBaseURL := serpent.Option{
Name: "AI Gateway OpenAI Base URL",
Description: "The base URL of the OpenAI API.",
Description: aiGatewayProviderSeedingDeprecated + "The base URL of the OpenAI API.",
Flag: "ai-gateway-openai-base-url",
Env: "CODER_AI_GATEWAY_OPENAI_BASE_URL",
Value: &c.AI.BridgeConfig.LegacyOpenAI.BaseURL,
@@ -1722,7 +1723,7 @@ func (c *DeploymentValues) Options() serpent.OptionSet {
}
aiGatewayOpenAIKey := serpent.Option{
Name: "AI Gateway OpenAI Key",
Description: "The key to authenticate against the OpenAI API.",
Description: aiGatewayProviderSeedingDeprecated + "The key to authenticate against the OpenAI API.",
Flag: "ai-gateway-openai-key",
Env: "CODER_AI_GATEWAY_OPENAI_KEY",
Value: &c.AI.BridgeConfig.LegacyOpenAI.Key,
@@ -1732,7 +1733,7 @@ func (c *DeploymentValues) Options() serpent.OptionSet {
}
aiGatewayAnthropicBaseURL := serpent.Option{
Name: "AI Gateway Anthropic Base URL",
Description: "The base URL of the Anthropic API.",
Description: aiGatewayProviderSeedingDeprecated + "The base URL of the Anthropic API.",
Flag: "ai-gateway-anthropic-base-url",
Env: "CODER_AI_GATEWAY_ANTHROPIC_BASE_URL",
Value: &c.AI.BridgeConfig.LegacyAnthropic.BaseURL,
@@ -1742,7 +1743,7 @@ func (c *DeploymentValues) Options() serpent.OptionSet {
}
aiGatewayAnthropicKey := serpent.Option{
Name: "AI Gateway Anthropic Key",
Description: "The key to authenticate against the Anthropic API.",
Description: aiGatewayProviderSeedingDeprecated + "The key to authenticate against the Anthropic API.",
Flag: "ai-gateway-anthropic-key",
Env: "CODER_AI_GATEWAY_ANTHROPIC_KEY",
Value: &c.AI.BridgeConfig.LegacyAnthropic.Key,
@@ -1751,30 +1752,28 @@ func (c *DeploymentValues) Options() serpent.OptionSet {
Annotations: serpent.Annotations{}.Mark(annotationSecretKey, "true"),
}
aiGatewayBedrockBaseURL := serpent.Option{
Name: "AI Gateway 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 " +
"over CODER_AI_GATEWAY_BEDROCK_REGION.",
Flag: "ai-gateway-bedrock-base-url",
Env: "CODER_AI_GATEWAY_BEDROCK_BASE_URL",
Value: &c.AI.BridgeConfig.LegacyBedrock.BaseURL,
Default: "",
Group: &deploymentGroupAIGateway,
YAML: "bedrock_base_url",
Name: "AI Gateway Bedrock Base URL",
Description: aiGatewayProviderSeedingDeprecated + "The base URL to use for the AWS Bedrock API. Use this setting to specify an exact URL to use. Takes precedence over CODER_AI_GATEWAY_BEDROCK_REGION.",
Flag: "ai-gateway-bedrock-base-url",
Env: "CODER_AI_GATEWAY_BEDROCK_BASE_URL",
Value: &c.AI.BridgeConfig.LegacyBedrock.BaseURL,
Default: "",
Group: &deploymentGroupAIGateway,
YAML: "bedrock_base_url",
}
aiGatewayBedrockRegion := serpent.Option{
Name: "AI Gateway Bedrock Region",
Description: "The AWS Bedrock API region to use. Constructs a base URL to use for the AWS Bedrock API in the form of " +
"'https://bedrock-runtime.<region>.amazonaws.com'.",
Flag: "ai-gateway-bedrock-region",
Env: "CODER_AI_GATEWAY_BEDROCK_REGION",
Value: &c.AI.BridgeConfig.LegacyBedrock.Region,
Default: "",
Group: &deploymentGroupAIGateway,
YAML: "bedrock_region",
Name: "AI Gateway Bedrock Region",
Description: aiGatewayProviderSeedingDeprecated + "The AWS Bedrock API region to use. Constructs a base URL to use for the AWS Bedrock API in the form of 'https://bedrock-runtime.<region>.amazonaws.com'.",
Flag: "ai-gateway-bedrock-region",
Env: "CODER_AI_GATEWAY_BEDROCK_REGION",
Value: &c.AI.BridgeConfig.LegacyBedrock.Region,
Default: "",
Group: &deploymentGroupAIGateway,
YAML: "bedrock_region",
}
aiGatewayBedrockAccessKey := serpent.Option{
Name: "AI Gateway Bedrock Access Key",
Description: "The access key to authenticate against the AWS Bedrock API.",
Description: aiGatewayProviderSeedingDeprecated + "The access key to authenticate against the AWS Bedrock API.",
Flag: "ai-gateway-bedrock-access-key",
Env: "CODER_AI_GATEWAY_BEDROCK_ACCESS_KEY",
Value: &c.AI.BridgeConfig.LegacyBedrock.AccessKey,
@@ -1784,7 +1783,7 @@ func (c *DeploymentValues) Options() serpent.OptionSet {
}
aiGatewayBedrockAccessKeySecret := serpent.Option{
Name: "AI Gateway Bedrock Access Key Secret",
Description: "The access key secret to use with the access key to authenticate against the AWS Bedrock API.",
Description: aiGatewayProviderSeedingDeprecated + "The access key secret to use with the access key to authenticate against the AWS Bedrock API.",
Flag: "ai-gateway-bedrock-access-key-secret",
Env: "CODER_AI_GATEWAY_BEDROCK_ACCESS_KEY_SECRET",
Value: &c.AI.BridgeConfig.LegacyBedrock.AccessKeySecret,
@@ -1794,7 +1793,7 @@ func (c *DeploymentValues) Options() serpent.OptionSet {
}
aiGatewayBedrockModel := serpent.Option{
Name: "AI Gateway Bedrock Model",
Description: "The model to use when making requests to the AWS Bedrock API.",
Description: aiGatewayProviderSeedingDeprecated + "The model to use when making requests to the AWS Bedrock API.",
Flag: "ai-gateway-bedrock-model",
Env: "CODER_AI_GATEWAY_BEDROCK_MODEL",
Value: &c.AI.BridgeConfig.LegacyBedrock.Model,
@@ -1804,7 +1803,7 @@ func (c *DeploymentValues) Options() serpent.OptionSet {
}
aiGatewayBedrockSmallFastModel := serpent.Option{
Name: "AI Gateway Bedrock Small Fast Model",
Description: "The small fast model to use when making requests to the AWS Bedrock API. Claude Code uses Haiku-class models to perform background tasks. See https://docs.claude.com/en/docs/claude-code/settings#environment-variables.",
Description: aiGatewayProviderSeedingDeprecated + "The small fast model to use when making requests to the AWS Bedrock API. Claude Code uses Haiku-class models to perform background tasks. See https://docs.claude.com/en/docs/claude-code/settings#environment-variables.",
Flag: "ai-gateway-bedrock-small-fastmodel",
Env: "CODER_AI_GATEWAY_BEDROCK_SMALL_FAST_MODEL",
Value: &c.AI.BridgeConfig.LegacyBedrock.SmallFastModel,