diff --git a/cli/testdata/server-config.yaml.golden b/cli/testdata/server-config.yaml.golden index 5504fdadc9..07ec24d933 100644 --- a/cli/testdata/server-config.yaml.golden +++ b/cli/testdata/server-config.yaml.golden @@ -820,13 +820,16 @@ aibridgeproxy: # Path to the CA private key file for AI Bridge Proxy. # (default: , type: string) key_file: "" - # Comma-separated list of domains for which HTTPS traffic will be decrypted and - # routed through AI Bridge. Requests to other domains will be tunneled directly - # without decryption. - # (default: api.anthropic.com,api.openai.com, type: string-array) + # Comma-separated list of AI provider domains for which HTTPS traffic will be + # decrypted and routed through AI Bridge. Requests to other domains will be + # tunneled directly without decryption. Supported domains: api.anthropic.com, + # api.openai.com, api.individual.githubcopilot.com. + # (default: api.anthropic.com,api.openai.com,api.individual.githubcopilot.com, + # type: string-array) domain_allowlist: - api.anthropic.com - api.openai.com + - api.individual.githubcopilot.com # URL of an upstream HTTP proxy to chain tunneled (non-allowlisted) requests # through. Format: http://[user:pass@]host:port or https://[user:pass@]host:port. # (default: , type: string) diff --git a/codersdk/deployment.go b/codersdk/deployment.go index 7c2850056e..0f30be0194 100644 --- a/codersdk/deployment.go +++ b/codersdk/deployment.go @@ -3757,11 +3757,11 @@ Write out the current server config as YAML to stdout.`, }, { Name: "AI Bridge Proxy Domain Allowlist", - Description: "Comma-separated list of domains for which HTTPS traffic will be decrypted and routed through AI Bridge. Requests to other domains will be tunneled directly without decryption.", + Description: "Comma-separated list of AI provider domains for which HTTPS traffic will be decrypted and routed through AI Bridge. Requests to other domains will be tunneled directly without decryption. Supported domains: api.anthropic.com, api.openai.com, api.individual.githubcopilot.com.", Flag: "aibridge-proxy-domain-allowlist", Env: "CODER_AIBRIDGE_PROXY_DOMAIN_ALLOWLIST", Value: &c.AI.BridgeProxyConfig.DomainAllowlist, - Default: "api.anthropic.com,api.openai.com", + Default: "api.anthropic.com,api.openai.com,api.individual.githubcopilot.com", Hidden: true, Group: &deploymentGroupAIBridgeProxy, YAML: "domain_allowlist", diff --git a/enterprise/aibridgeproxyd/aibridgeproxyd.go b/enterprise/aibridgeproxyd/aibridgeproxyd.go index 822161fdd6..4df84c65f7 100644 --- a/enterprise/aibridgeproxyd/aibridgeproxyd.go +++ b/enterprise/aibridgeproxyd/aibridgeproxyd.go @@ -32,6 +32,7 @@ import ( const ( HostAnthropic = "api.anthropic.com" HostOpenAI = "api.openai.com" + HostCopilot = "api.individual.githubcopilot.com" ) const ( @@ -543,6 +544,8 @@ func defaultAIBridgeProvider(host string) string { return aibridge.ProviderAnthropic case HostOpenAI: return aibridge.ProviderOpenAI + case HostCopilot: + return aibridge.ProviderCopilot default: return "" } diff --git a/enterprise/cli/aibridged.go b/enterprise/cli/aibridged.go index 62e6e74527..09108ab55c 100644 --- a/enterprise/cli/aibridged.go +++ b/enterprise/cli/aibridged.go @@ -48,6 +48,9 @@ func newAIBridgeDaemon(coderAPI *coderd.API) (*aibridged.Server, error) { CircuitBreaker: cbConfig, SendActorHeaders: cfg.SendActorHeaders.Value(), }, getBedrockConfig(cfg.Bedrock)), + aibridge.NewCopilotProvider(aibridge.CopilotConfig{ + CircuitBreaker: cbConfig, + }), } reg := prometheus.WrapRegistererWithPrefix("coder_aibridged_", coderAPI.PrometheusRegistry)