Skip to content
Merged
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
1 change: 1 addition & 0 deletions .github/workflows/typos.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ IST = "IST"
MacOS = "macOS"
AKS = "AKS"
O_WRONLY = "O_WRONLY"
AIBridge = "AI Bridge"

[default.extend-words]
AKS = "AKS"
Expand Down
8 changes: 4 additions & 4 deletions cli/testdata/coder_server_--help.golden
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ OPTIONS:
Periodically check for new releases of Coder and inform the owner. The
check is performed once per day.

AIBRIDGE OPTIONS:
AI BRIDGE OPTIONS:
--aibridge-anthropic-base-url string, $CODER_AIBRIDGE_ANTHROPIC_BASE_URL (default: https://api.anthropic.com/)
The base URL of the Anthropic API.

Expand Down Expand Up @@ -114,9 +114,9 @@ AIBRIDGE OPTIONS:
Whether to start an in-memory aibridged instance.

--aibridge-inject-coder-mcp-tools bool, $CODER_AIBRIDGE_INJECT_CODER_MCP_TOOLS (default: false)
Whether to inject Coder's MCP tools into intercepted AIBridge requests
(requires the "oauth2" and "mcp-server-http" experiments to be
enabled).
Whether to inject Coder's MCP tools into intercepted AI Bridge
requests (requires the "oauth2" and "mcp-server-http" experiments to
be enabled).

--aibridge-openai-base-url string, $CODER_AIBRIDGE_OPENAI_BASE_URL (default: https://api.openai.com/v1/)
The base URL of the OpenAI API.
Expand Down
4 changes: 2 additions & 2 deletions cli/testdata/server-config.yaml.golden
Original file line number Diff line number Diff line change
Expand Up @@ -747,8 +747,8 @@ aibridge:
# https://docs.claude.com/en/docs/claude-code/settings#environment-variables.
# (default: global.anthropic.claude-haiku-4-5-20251001-v1:0, type: string)
bedrock_small_fast_model: global.anthropic.claude-haiku-4-5-20251001-v1:0
# Whether to inject Coder's MCP tools into intercepted AIBridge requests (requires
# the "oauth2" and "mcp-server-http" experiments to be enabled).
# Whether to inject Coder's MCP tools into intercepted AI Bridge requests
# (requires the "oauth2" and "mcp-server-http" experiments to be enabled).
# (default: false, type: bool)
inject_coder_mcp_tools: false
# Length of time to retain data such as interceptions and all related records
Expand Down
6 changes: 3 additions & 3 deletions coderd/apidoc/docs.go

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

6 changes: 3 additions & 3 deletions coderd/apidoc/swagger.json

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

4 changes: 2 additions & 2 deletions coderd/database/dbauthz/dbauthz.go
Original file line number Diff line number Diff line change
Expand Up @@ -596,12 +596,12 @@ var (
// See aibridged package.
subjectAibridged = rbac.Subject{
Type: rbac.SubjectAibridged,
FriendlyName: "AIBridge Daemon",
FriendlyName: "AI Bridge Daemon",
ID: uuid.Nil.String(),
Roles: rbac.Roles([]rbac.Role{
{
Identifier: rbac.RoleIdentifier{Name: "aibridged"},
DisplayName: "AIBridge Daemon",
DisplayName: "AI Bridge Daemon",
Site: rbac.Permissions(map[string][]policy.Action{
rbac.ResourceUser.Type: {
policy.ActionRead, // Required to validate API key owner is active.
Expand Down
2 changes: 1 addition & 1 deletion coderd/database/querier.go

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

2 changes: 1 addition & 1 deletion coderd/database/queries.sql.go

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

2 changes: 1 addition & 1 deletion coderd/database/queries/aibridge.sql
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ ORDER BY
id ASC;

-- name: ListAIBridgeInterceptionsTelemetrySummaries :many
-- Finds all unique AIBridge interception telemetry summaries combinations
-- Finds all unique AI Bridge interception telemetry summaries combinations
-- (provider, model, client) in the given timeframe for telemetry reporting.
SELECT
DISTINCT ON (provider, model, client)
Expand Down
2 changes: 1 addition & 1 deletion coderd/rbac/regosql/configs.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ func ConnectionLogConverter() *sqltypes.VariableConverter {
func AIBridgeInterceptionConverter() *sqltypes.VariableConverter {
matcher := sqltypes.NewVariableConverter().RegisterMatcher(
resourceIDMatcher(),
// AIBridge interceptions are not tied to any organization.
// AI Bridge interceptions are not tied to any organization.
sqltypes.StringVarMatcher("''", []string{"input", "object", "org_owner"}),
sqltypes.StringVarMatcher("initiator_id :: text", []string{"input", "object", "owner"}),
)
Expand Down
8 changes: 4 additions & 4 deletions coderd/telemetry/telemetry.go
Original file line number Diff line number Diff line change
Expand Up @@ -751,7 +751,7 @@ func (r *remoteReporter) createSnapshot() (*Snapshot, error) {
eg.Go(func() error {
summaries, err := r.generateAIBridgeInterceptionsSummaries(ctx)
if err != nil {
return xerrors.Errorf("generate AIBridge interceptions telemetry summaries: %w", err)
return xerrors.Errorf("generate AI Bridge interceptions telemetry summaries: %w", err)
}
snapshot.AIBridgeInterceptionsSummaries = summaries
return nil
Expand Down Expand Up @@ -785,7 +785,7 @@ func (r *remoteReporter) generateAIBridgeInterceptionsSummaries(ctx context.Cont
return nil, nil
}
if err != nil {
return nil, xerrors.Errorf("insert AIBridge interceptions telemetry lock (period_ending_at=%q): %w", endedAtBefore, err)
return nil, xerrors.Errorf("insert AI Bridge interceptions telemetry lock (period_ending_at=%q): %w", endedAtBefore, err)
}

// List the summary categories that need to be calculated.
Expand All @@ -794,7 +794,7 @@ func (r *remoteReporter) generateAIBridgeInterceptionsSummaries(ctx context.Cont
EndedAtBefore: endedAtBefore, // exclusive
})
if err != nil {
return nil, xerrors.Errorf("list AIBridge interceptions telemetry summaries (startedAtAfter=%q, endedAtBefore=%q): %w", endedAtAfter, endedAtBefore, err)
return nil, xerrors.Errorf("list AI Bridge interceptions telemetry summaries (startedAtAfter=%q, endedAtBefore=%q): %w", endedAtAfter, endedAtBefore, err)
}

// Calculate and convert the summaries for all categories.
Expand All @@ -813,7 +813,7 @@ func (r *remoteReporter) generateAIBridgeInterceptionsSummaries(ctx context.Cont
EndedAtBefore: endedAtBefore,
})
if err != nil {
return xerrors.Errorf("calculate AIBridge interceptions telemetry summary (provider=%q, model=%q, client=%q, startedAtAfter=%q, endedAtBefore=%q): %w", category.Provider, category.Model, category.Client, endedAtAfter, endedAtBefore, err)
return xerrors.Errorf("calculate AI Bridge interceptions telemetry summary (provider=%q, model=%q, client=%q, startedAtAfter=%q, endedAtBefore=%q): %w", category.Provider, category.Model, category.Client, endedAtAfter, endedAtBefore, err)
}

// Double check that at least one interception was found in the
Expand Down
4 changes: 2 additions & 2 deletions codersdk/aibridge.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ type AIBridgeListInterceptionsResponse struct {
// @typescript-ignore AIBridgeListInterceptionsFilter
type AIBridgeListInterceptionsFilter struct {
// Limit defaults to 100, max is 1000.
// Offset based pagination is not supported for AIBridge interceptions. Use
// Offset based pagination is not supported for AI Bridge interceptions. Use
// cursor pagination instead with after_id.
Pagination Pagination `json:"pagination,omitempty"`

Expand Down Expand Up @@ -112,7 +112,7 @@ func (f AIBridgeListInterceptionsFilter) asRequestOption() RequestOption {
}
}

// AIBridgeListInterceptions returns AIBridge interceptions with the given
// AIBridgeListInterceptions returns AI Bridge interceptions with the given
// filter.
func (c *Client) AIBridgeListInterceptions(ctx context.Context, filter AIBridgeListInterceptionsFilter) (AIBridgeListInterceptionsResponse, error) {
res, err := c.Request(ctx, http.MethodGet, "/api/v2/aibridge/interceptions", nil, filter.asRequestOption(), filter.Pagination.asRequestOption(), filter.Pagination.asRequestOption())
Expand Down
30 changes: 15 additions & 15 deletions codersdk/deployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -1174,7 +1174,7 @@ func (c *DeploymentValues) Options() serpent.OptionSet {
YAML: "inbox",
}
deploymentGroupAIBridge = serpent.Group{
Name: "AIBridge",
Name: "AI Bridge",
YAML: "aibridge",
}
)
Expand Down Expand Up @@ -3238,9 +3238,9 @@ Write out the current server config as YAML to stdout.`,
YAML: "hideAITasks",
},

// AIBridge Options
// AI Bridge Options
{
Name: "AIBridge Enabled",
Name: "AI Bridge Enabled",
Description: "Whether to start an in-memory aibridged instance.",
Flag: "aibridge-enabled",
Env: "CODER_AIBRIDGE_ENABLED",
Expand All @@ -3250,7 +3250,7 @@ Write out the current server config as YAML to stdout.`,
YAML: "enabled",
},
{
Name: "AIBridge OpenAI Base URL",
Name: "AI Bridge OpenAI Base URL",
Description: "The base URL of the OpenAI API.",
Flag: "aibridge-openai-base-url",
Env: "CODER_AIBRIDGE_OPENAI_BASE_URL",
Expand All @@ -3260,7 +3260,7 @@ Write out the current server config as YAML to stdout.`,
YAML: "openai_base_url",
},
{
Name: "AIBridge OpenAI Key",
Name: "AI Bridge OpenAI Key",
Description: "The key to authenticate against the OpenAI API.",
Flag: "aibridge-openai-key",
Env: "CODER_AIBRIDGE_OPENAI_KEY",
Expand All @@ -3270,7 +3270,7 @@ Write out the current server config as YAML to stdout.`,
YAML: "openai_key",
},
{
Name: "AIBridge Anthropic Base URL",
Name: "AI Bridge Anthropic Base URL",
Description: "The base URL of the Anthropic API.",
Flag: "aibridge-anthropic-base-url",
Env: "CODER_AIBRIDGE_ANTHROPIC_BASE_URL",
Expand All @@ -3280,7 +3280,7 @@ Write out the current server config as YAML to stdout.`,
YAML: "anthropic_base_url",
},
{
Name: "AIBridge Anthropic Key",
Name: "AI Bridge Anthropic Key",
Description: "The key to authenticate against the Anthropic API.",
Flag: "aibridge-anthropic-key",
Env: "CODER_AIBRIDGE_ANTHROPIC_KEY",
Expand All @@ -3290,7 +3290,7 @@ Write out the current server config as YAML to stdout.`,
YAML: "anthropic_key",
},
{
Name: "AIBridge Bedrock Region",
Name: "AI Bridge Bedrock Region",
Description: "The AWS Bedrock API region.",
Flag: "aibridge-bedrock-region",
Env: "CODER_AIBRIDGE_BEDROCK_REGION",
Expand All @@ -3300,7 +3300,7 @@ Write out the current server config as YAML to stdout.`,
YAML: "bedrock_region",
},
{
Name: "AIBridge Bedrock Access Key",
Name: "AI Bridge Bedrock Access Key",
Description: "The access key to authenticate against the AWS Bedrock API.",
Flag: "aibridge-bedrock-access-key",
Env: "CODER_AIBRIDGE_BEDROCK_ACCESS_KEY",
Expand All @@ -3310,7 +3310,7 @@ Write out the current server config as YAML to stdout.`,
YAML: "bedrock_access_key",
},
{
Name: "AIBridge Bedrock Access Key Secret",
Name: "AI Bridge Bedrock Access Key Secret",
Description: "The access key secret to use with the access key to authenticate against the AWS Bedrock API.",
Flag: "aibridge-bedrock-access-key-secret",
Env: "CODER_AIBRIDGE_BEDROCK_ACCESS_KEY_SECRET",
Expand All @@ -3320,7 +3320,7 @@ Write out the current server config as YAML to stdout.`,
YAML: "bedrock_access_key_secret",
},
{
Name: "AIBridge Bedrock Model",
Name: "AI Bridge Bedrock Model",
Description: "The model to use when making requests to the AWS Bedrock API.",
Flag: "aibridge-bedrock-model",
Env: "CODER_AIBRIDGE_BEDROCK_MODEL",
Expand All @@ -3330,7 +3330,7 @@ Write out the current server config as YAML to stdout.`,
YAML: "bedrock_model",
},
{
Name: "AIBridge Bedrock Small Fast Model",
Name: "AI Bridge 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.",
Flag: "aibridge-bedrock-small-fastmodel",
Env: "CODER_AIBRIDGE_BEDROCK_SMALL_FAST_MODEL",
Expand All @@ -3340,8 +3340,8 @@ Write out the current server config as YAML to stdout.`,
YAML: "bedrock_small_fast_model",
},
{
Name: "AIBridge Inject Coder MCP tools",
Description: "Whether to inject Coder's MCP tools into intercepted AIBridge requests (requires the \"oauth2\" and \"mcp-server-http\" experiments to be enabled).",
Name: "AI Bridge Inject Coder MCP tools",
Description: "Whether to inject Coder's MCP tools into intercepted AI Bridge requests (requires the \"oauth2\" and \"mcp-server-http\" experiments to be enabled).",
Flag: "aibridge-inject-coder-mcp-tools",
Env: "CODER_AIBRIDGE_INJECT_CODER_MCP_TOOLS",
Value: &c.AI.BridgeConfig.InjectCoderMCPTools,
Expand All @@ -3350,7 +3350,7 @@ Write out the current server config as YAML to stdout.`,
YAML: "inject_coder_mcp_tools",
},
{
Name: "AIBridge Data Retention Duration",
Name: "AI Bridge Data Retention Duration",
Description: "Length of time to retain data such as interceptions and all related records (token, prompt, tool use).",
Flag: "aibridge-retention",
Env: "CODER_AIBRIDGE_RETENTION",
Expand Down
6 changes: 3 additions & 3 deletions docs/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -1216,17 +1216,17 @@
"children": [
{
"title": "aibridge",
"description": "Manage AIBridge.",
"description": "Manage AI Bridge.",
"path": "reference/cli/aibridge.md"
},
{
"title": "aibridge interceptions",
"description": "Manage AIBridge interceptions.",
"description": "Manage AI Bridge interceptions.",
"path": "reference/cli/aibridge_interceptions.md"
},
{
"title": "aibridge interceptions list",
"description": "List AIBridge interceptions as JSON.",
"description": "List AI Bridge interceptions as JSON.",
"path": "reference/cli/aibridge_interceptions_list.md"
},
{
Expand Down
4 changes: 2 additions & 2 deletions docs/reference/api/aibridge.md

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

8 changes: 4 additions & 4 deletions docs/reference/cli/aibridge.md

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

8 changes: 4 additions & 4 deletions docs/reference/cli/aibridge_interceptions.md

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

2 changes: 1 addition & 1 deletion docs/reference/cli/aibridge_interceptions_list.md

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

2 changes: 1 addition & 1 deletion docs/reference/cli/index.md

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

2 changes: 1 addition & 1 deletion docs/reference/cli/server.md

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

Loading
Loading