@@ -500,6 +500,7 @@ type DeploymentValues struct {
500
500
WorkspaceHostnameSuffix serpent.String `json:"workspace_hostname_suffix,omitempty" typescript:",notnull"`
501
501
Prebuilds PrebuildsConfig `json:"workspace_prebuilds,omitempty" typescript:",notnull"`
502
502
HideAITasks serpent.Bool `json:"hide_ai_tasks,omitempty" typescript:",notnull"`
503
+ AI AIConfig `json:"ai,omitempty"`
503
504
504
505
Config serpent.YAMLConfigPath `json:"config,omitempty" typescript:",notnull"`
505
506
WriteConfig serpent.Bool `json:"write_config,omitempty" typescript:",notnull"`
@@ -1158,6 +1159,10 @@ func (c *DeploymentValues) Options() serpent.OptionSet {
1158
1159
Parent : & deploymentGroupNotifications ,
1159
1160
YAML : "inbox" ,
1160
1161
}
1162
+ deploymentGroupAIBridge = serpent.Group {
1163
+ Name : "AIBridge" ,
1164
+ YAML : "aibridge" ,
1165
+ }
1161
1166
)
1162
1167
1163
1168
httpAddress := serpent.Option {
@@ -3208,11 +3213,88 @@ Write out the current server config as YAML to stdout.`,
3208
3213
Group : & deploymentGroupClient ,
3209
3214
YAML : "hideAITasks" ,
3210
3215
},
3216
+
3217
+ // AIBridge Options
3218
+ {
3219
+ Name : "AIBridge Enabled" ,
3220
+ Description : fmt .Sprintf ("Whether to start an in-memory aibridged instance (%q experiment must be enabled, too)." , ExperimentAIBridge ),
3221
+ Flag : "aibridge-enabled" ,
3222
+ Env : "CODER_AIBRIDGE_ENABLED" ,
3223
+ Value : & c .AI .BridgeConfig .Enabled ,
3224
+ Default : "true" ,
3225
+ Group : & deploymentGroupAIBridge ,
3226
+ YAML : "enabled" ,
3227
+ Hidden : false ,
3228
+ },
3229
+ {
3230
+ Name : "AIBridge OpenAI Base URL" ,
3231
+ Description : "The base URL of the OpenAI API." ,
3232
+ Flag : "aibridge-openai-base-url" ,
3233
+ Env : "CODER_AIBRIDGE_OPENAI_BASE_URL" ,
3234
+ Value : & c .AI .BridgeConfig .OpenAI .BaseURL ,
3235
+ Default : "https://api.openai.com/v1/" ,
3236
+ Group : & deploymentGroupAIBridge ,
3237
+ YAML : "openai_base_url" ,
3238
+ Hidden : true ,
3239
+ },
3240
+ {
3241
+ Name : "AIBridge OpenAI Key" ,
3242
+ Description : "The key to authenticate against the OpenAI API." ,
3243
+ Flag : "aibridge-openai-key" ,
3244
+ Env : "CODER_AIBRIDGE_OPENAI_KEY" ,
3245
+ Value : & c .AI .BridgeConfig .OpenAI .Key ,
3246
+ Default : "" ,
3247
+ Group : & deploymentGroupAIBridge ,
3248
+ YAML : "openai_key" ,
3249
+ Hidden : true ,
3250
+ },
3251
+ {
3252
+ Name : "AIBridge Anthropic Base URL" ,
3253
+ Description : "The base URL of the Anthropic API." ,
3254
+ Flag : "aibridge-anthropic-base-url" ,
3255
+ Env : "CODER_AIBRIDGE_ANTHROPIC_BASE_URL" ,
3256
+ Value : & c .AI .BridgeConfig .Anthropic .BaseURL ,
3257
+ Default : "https://api.anthropic.com/" ,
3258
+ Group : & deploymentGroupAIBridge ,
3259
+ YAML : "base_url" ,
3260
+ Hidden : true ,
3261
+ },
3262
+ {
3263
+ Name : "AIBridge Anthropic KEY" ,
3264
+ Description : "The key to authenticate against the Anthropic API." ,
3265
+ Flag : "aibridge-anthropic-key" ,
3266
+ Env : "CODER_AIBRIDGE_ANTHROPIC_KEY" ,
3267
+ Value : & c .AI .BridgeConfig .Anthropic .Key ,
3268
+ Default : "" ,
3269
+ Group : & deploymentGroupAIBridge ,
3270
+ YAML : "key" ,
3271
+ Hidden : true ,
3272
+ },
3211
3273
}
3212
3274
3213
3275
return opts
3214
3276
}
3215
3277
3278
+ type AIBridgeConfig struct {
3279
+ Enabled serpent.Bool `json:"enabled" typescript:",notnull"`
3280
+ OpenAI AIBridgeOpenAIConfig `json:"openai" typescript:",notnull"`
3281
+ Anthropic AIBridgeAnthropicConfig `json:"anthropic" typescript:",notnull"`
3282
+ }
3283
+
3284
+ type AIBridgeOpenAIConfig struct {
3285
+ BaseURL serpent.String `json:"base_url" typescript:",notnull"`
3286
+ Key serpent.String `json:"key" typescript:",notnull"`
3287
+ }
3288
+
3289
+ type AIBridgeAnthropicConfig struct {
3290
+ BaseURL serpent.String `json:"base_url" typescript:",notnull"`
3291
+ Key serpent.String `json:"key" typescript:",notnull"`
3292
+ }
3293
+
3294
+ type AIConfig struct {
3295
+ BridgeConfig AIBridgeConfig `json:"bridge,omitempty"`
3296
+ }
3297
+
3216
3298
type SupportConfig struct {
3217
3299
Links serpent.Struct [[]LinkConfig ] `json:"links" typescript:",notnull"`
3218
3300
}
@@ -3436,6 +3518,7 @@ const (
3436
3518
ExperimentOAuth2 Experiment = "oauth2" // Enables OAuth2 provider functionality.
3437
3519
ExperimentMCPServerHTTP Experiment = "mcp-server-http" // Enables the MCP HTTP server functionality.
3438
3520
ExperimentWorkspaceSharing Experiment = "workspace-sharing" // Enables updating workspace ACLs for sharing with users and groups.
3521
+ ExperimentAIBridge Experiment = "aibridge" // Enables AI Bridge functionality.
3439
3522
)
3440
3523
3441
3524
func (e Experiment ) DisplayName () string {
@@ -3456,6 +3539,8 @@ func (e Experiment) DisplayName() string {
3456
3539
return "MCP HTTP Server Functionality"
3457
3540
case ExperimentWorkspaceSharing :
3458
3541
return "Workspace Sharing"
3542
+ case ExperimentAIBridge :
3543
+ return "AI Bridge"
3459
3544
default :
3460
3545
// Split on hyphen and convert to title case
3461
3546
// e.g. "web-push" -> "Web Push", "mcp-server-http" -> "Mcp Server Http"
@@ -3474,6 +3559,7 @@ var ExperimentsKnown = Experiments{
3474
3559
ExperimentOAuth2 ,
3475
3560
ExperimentMCPServerHTTP ,
3476
3561
ExperimentWorkspaceSharing ,
3562
+ ExperimentAIBridge ,
3477
3563
}
3478
3564
3479
3565
// ExperimentsSafe should include all experiments that are safe for
0 commit comments