Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions cli/testdata/coder_server_--help.golden
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,20 @@ AI BRIDGE OPTIONS:
Maximum number of AI Bridge requests per second per replica. Set to 0
to disable (unlimited).

AI BRIDGE PROXY OPTIONS:
--aibridge-proxy-cert-file string, $CODER_AIBRIDGE_PROXY_CERT_FILE
Path to the CA certificate file for AI Bridge Proxy.

--aibridge-proxy-enabled bool, $CODER_AIBRIDGE_PROXY_ENABLED (default: false)
Enable the AI Bridge MITM Proxy for intercepting and decrypting AI
provider requests.

--aibridge-proxy-key-file string, $CODER_AIBRIDGE_PROXY_KEY_FILE
Path to the CA private key file for AI Bridge Proxy.

--aibridge-proxy-listen-addr string, $CODER_AIBRIDGE_PROXY_LISTEN_ADDR (default: :8888)
The address the AI Bridge Proxy will listen on.

CLIENT OPTIONS:
These options change the behavior of how clients interact with the Coder.
Clients include the Coder CLI, Coder Desktop, IDE extensions, and the web UI.
Expand Down
14 changes: 14 additions & 0 deletions cli/testdata/server-config.yaml.golden
Original file line number Diff line number Diff line change
Expand Up @@ -765,6 +765,20 @@ aibridge:
# (unlimited).
# (default: 0, type: int)
rateLimit: 0
aibridgeproxy:
# Enable the AI Bridge MITM Proxy for intercepting and decrypting AI provider
# requests.
# (default: false, type: bool)
enabled: false
# The address the AI Bridge Proxy will listen on.
# (default: :8888, type: string)
listen_addr: :8888
# Path to the CA certificate file for AI Bridge Proxy.
# (default: <unset>, type: string)
cert_file: ""
# Path to the CA private key file for AI Bridge Proxy.
# (default: <unset>, type: string)
key_file: ""
# Configure data retention policies for various database tables. Retention
# policies automatically purge old data to reduce database size and improve
# performance. Setting a retention duration to 0 disables automatic purging for
Expand Down
20 changes: 20 additions & 0 deletions coderd/apidoc/docs.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions coderd/apidoc/swagger.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

57 changes: 56 additions & 1 deletion codersdk/deployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -1217,6 +1217,10 @@ func (c *DeploymentValues) Options() serpent.OptionSet {
Name: "AI Bridge",
YAML: "aibridge",
}
deploymentGroupAIBridgeProxy = serpent.Group{
Name: "AI Bridge Proxy",
YAML: "aibridgeproxy",
}
deploymentGroupRetention = serpent.Group{
Name: "Retention",
Description: "Configure data retention policies for various database tables. Retention policies automatically purge old data to reduce database size and improve performance. Setting a retention duration to 0 disables automatic purging for that data type.",
Expand Down Expand Up @@ -3443,6 +3447,49 @@ Write out the current server config as YAML to stdout.`,
Group: &deploymentGroupAIBridge,
YAML: "rateLimit",
},

// AI Bridge Proxy Options
{
Name: "AI Bridge Proxy Enabled",
Description: "Enable the AI Bridge MITM Proxy for intercepting and decrypting AI provider requests.",
Flag: "aibridge-proxy-enabled",
Env: "CODER_AIBRIDGE_PROXY_ENABLED",
Value: &c.AI.BridgeProxyConfig.Enabled,
Default: "false",
Group: &deploymentGroupAIBridgeProxy,
YAML: "enabled",
},
{
Name: "AI Bridge Proxy Listen Address",
Description: "The address the AI Bridge Proxy will listen on.",
Flag: "aibridge-proxy-listen-addr",
Env: "CODER_AIBRIDGE_PROXY_LISTEN_ADDR",
Value: &c.AI.BridgeProxyConfig.ListenAddr,
Default: ":8888",
Group: &deploymentGroupAIBridgeProxy,
YAML: "listen_addr",
},
{
Name: "AI Bridge Proxy Certificate File",
Description: "Path to the CA certificate file for AI Bridge Proxy.",
Flag: "aibridge-proxy-cert-file",
Env: "CODER_AIBRIDGE_PROXY_CERT_FILE",
Value: &c.AI.BridgeProxyConfig.CertFile,
Default: "",
Group: &deploymentGroupAIBridgeProxy,
YAML: "cert_file",
},
{
Name: "AI Bridge Proxy Key File",
Description: "Path to the CA private key file for AI Bridge Proxy.",
Flag: "aibridge-proxy-key-file",
Env: "CODER_AIBRIDGE_PROXY_KEY_FILE",
Value: &c.AI.BridgeProxyConfig.KeyFile,
Default: "",
Group: &deploymentGroupAIBridgeProxy,
YAML: "key_file",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to confirm, do we need to set this as a secret? Something like: Annotations: serpent.Annotations{}.Mark(annotationSecretKey, "true"),
This is the file path, so the content is the actual secret 🤔

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I think since it's a file path it's not sensitive itself.

},

// Retention settings
{
Name: "Audit Logs Retention",
Expand Down Expand Up @@ -3535,8 +3582,16 @@ type AIBridgeBedrockConfig struct {
SmallFastModel serpent.String `json:"small_fast_model" typescript:",notnull"`
}

type AIBridgeProxyConfig struct {
Enabled serpent.Bool `json:"enabled" typescript:",notnull"`
ListenAddr serpent.String `json:"listen_addr" typescript:",notnull"`
CertFile serpent.String `json:"cert_file" typescript:",notnull"`
KeyFile serpent.String `json:"key_file" typescript:",notnull"`
}

type AIConfig struct {
BridgeConfig AIBridgeConfig `json:"bridge,omitempty"`
BridgeConfig AIBridgeConfig `json:"bridge,omitempty"`
BridgeProxyConfig AIBridgeProxyConfig `json:"aibridge_proxy,omitempty"`
}

type SupportConfig struct {
Expand Down
6 changes: 6 additions & 0 deletions docs/reference/api/general.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

45 changes: 42 additions & 3 deletions docs/reference/api/schemas.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

42 changes: 42 additions & 0 deletions docs/reference/cli/server.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading