diff --git a/.github/workflows/typos.toml b/.github/workflows/typos.toml index 8b3f77c1ef566..9008a998a9001 100644 --- a/.github/workflows/typos.toml +++ b/.github/workflows/typos.toml @@ -9,6 +9,7 @@ IST = "IST" MacOS = "macOS" AKS = "AKS" O_WRONLY = "O_WRONLY" +AIBridge = "AI Bridge" [default.extend-words] AKS = "AKS" diff --git a/cli/testdata/coder_server_--help.golden b/cli/testdata/coder_server_--help.golden index 3d77772075bc3..1444f8096148f 100644 --- a/cli/testdata/coder_server_--help.golden +++ b/cli/testdata/coder_server_--help.golden @@ -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. @@ -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. diff --git a/cli/testdata/server-config.yaml.golden b/cli/testdata/server-config.yaml.golden index d030e1d63c27b..c8f1f94a85f23 100644 --- a/cli/testdata/server-config.yaml.golden +++ b/cli/testdata/server-config.yaml.golden @@ -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 diff --git a/coderd/apidoc/docs.go b/coderd/apidoc/docs.go index 67be7d985dfe4..ff7f73d117e3b 100644 --- a/coderd/apidoc/docs.go +++ b/coderd/apidoc/docs.go @@ -96,10 +96,10 @@ const docTemplate = `{ "application/json" ], "tags": [ - "AIBridge" + "AI Bridge" ], - "summary": "List AIBridge interceptions", - "operationId": "list-aibridge-interceptions", + "summary": "List AI Bridge interceptions", + "operationId": "list-ai-bridge-interceptions", "parameters": [ { "type": "string", diff --git a/coderd/apidoc/swagger.json b/coderd/apidoc/swagger.json index 888c88057e2a9..849d375a3e8e3 100644 --- a/coderd/apidoc/swagger.json +++ b/coderd/apidoc/swagger.json @@ -73,9 +73,9 @@ } ], "produces": ["application/json"], - "tags": ["AIBridge"], - "summary": "List AIBridge interceptions", - "operationId": "list-aibridge-interceptions", + "tags": ["AI Bridge"], + "summary": "List AI Bridge interceptions", + "operationId": "list-ai-bridge-interceptions", "parameters": [ { "type": "string", diff --git a/coderd/database/dbauthz/dbauthz.go b/coderd/database/dbauthz/dbauthz.go index c3cc39116f656..4a2bb02a2a580 100644 --- a/coderd/database/dbauthz/dbauthz.go +++ b/coderd/database/dbauthz/dbauthz.go @@ -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. diff --git a/coderd/database/querier.go b/coderd/database/querier.go index bf6b0bc5c06cb..f3d64f7f25b32 100644 --- a/coderd/database/querier.go +++ b/coderd/database/querier.go @@ -612,7 +612,7 @@ type sqlcQuerier interface { InsertWorkspaceResource(ctx context.Context, arg InsertWorkspaceResourceParams) (WorkspaceResource, error) InsertWorkspaceResourceMetadata(ctx context.Context, arg InsertWorkspaceResourceMetadataParams) ([]WorkspaceResourceMetadatum, error) ListAIBridgeInterceptions(ctx context.Context, arg ListAIBridgeInterceptionsParams) ([]ListAIBridgeInterceptionsRow, error) - // 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. ListAIBridgeInterceptionsTelemetrySummaries(ctx context.Context, arg ListAIBridgeInterceptionsTelemetrySummariesParams) ([]ListAIBridgeInterceptionsTelemetrySummariesRow, error) ListAIBridgeTokenUsagesByInterceptionIDs(ctx context.Context, interceptionIds []uuid.UUID) ([]AIBridgeTokenUsage, error) diff --git a/coderd/database/queries.sql.go b/coderd/database/queries.sql.go index b4aa80cd6e4ab..a0743586acaec 100644 --- a/coderd/database/queries.sql.go +++ b/coderd/database/queries.sql.go @@ -880,7 +880,7 @@ type ListAIBridgeInterceptionsTelemetrySummariesRow struct { Client string `db:"client" json:"client"` } -// 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. func (q *sqlQuerier) ListAIBridgeInterceptionsTelemetrySummaries(ctx context.Context, arg ListAIBridgeInterceptionsTelemetrySummariesParams) ([]ListAIBridgeInterceptionsTelemetrySummariesRow, error) { rows, err := q.db.QueryContext(ctx, listAIBridgeInterceptionsTelemetrySummaries, arg.EndedAtAfter, arg.EndedAtBefore) diff --git a/coderd/database/queries/aibridge.sql b/coderd/database/queries/aibridge.sql index bfd08860cb39c..4a1e346c865b8 100644 --- a/coderd/database/queries/aibridge.sql +++ b/coderd/database/queries/aibridge.sql @@ -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) diff --git a/coderd/rbac/regosql/configs.go b/coderd/rbac/regosql/configs.go index b06d4d0583014..355a49756d587 100644 --- a/coderd/rbac/regosql/configs.go +++ b/coderd/rbac/regosql/configs.go @@ -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"}), ) diff --git a/coderd/telemetry/telemetry.go b/coderd/telemetry/telemetry.go index 19873f99eeb2f..58822a93d7086 100644 --- a/coderd/telemetry/telemetry.go +++ b/coderd/telemetry/telemetry.go @@ -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 @@ -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. @@ -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. @@ -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 diff --git a/codersdk/aibridge.go b/codersdk/aibridge.go index a109a143b4f9c..09dab7caf04a9 100644 --- a/codersdk/aibridge.go +++ b/codersdk/aibridge.go @@ -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"` @@ -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()) diff --git a/codersdk/deployment.go b/codersdk/deployment.go index a86fdab8145fc..a51e3e9247e58 100644 --- a/codersdk/deployment.go +++ b/codersdk/deployment.go @@ -1174,7 +1174,7 @@ func (c *DeploymentValues) Options() serpent.OptionSet { YAML: "inbox", } deploymentGroupAIBridge = serpent.Group{ - Name: "AIBridge", + Name: "AI Bridge", YAML: "aibridge", } ) @@ -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", @@ -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", @@ -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", @@ -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", @@ -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", @@ -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", @@ -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", @@ -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", @@ -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", @@ -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", @@ -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, @@ -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", diff --git a/docs/manifest.json b/docs/manifest.json index 9645594e562b3..7afd00164da99 100644 --- a/docs/manifest.json +++ b/docs/manifest.json @@ -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" }, { diff --git a/docs/reference/api/aibridge.md b/docs/reference/api/aibridge.md index e3e0729c2fe89..9969a51d4adc7 100644 --- a/docs/reference/api/aibridge.md +++ b/docs/reference/api/aibridge.md @@ -1,6 +1,6 @@ -# AIBridge +# AI Bridge -## List AIBridge interceptions +## List AI Bridge interceptions ### Code samples diff --git a/docs/reference/cli/aibridge.md b/docs/reference/cli/aibridge.md index 7b16c5cdc87a8..67e633682d433 100644 --- a/docs/reference/cli/aibridge.md +++ b/docs/reference/cli/aibridge.md @@ -1,7 +1,7 @@ # aibridge -Manage AIBridge. +Manage AI Bridge. ## Usage @@ -11,6 +11,6 @@ coder aibridge ## Subcommands -| Name | Purpose | -|-----------------------------------------------------------|--------------------------------| -| [interceptions](./aibridge_interceptions.md) | Manage AIBridge interceptions. | +| Name | Purpose | +|-----------------------------------------------------------|---------------------------------| +| [interceptions](./aibridge_interceptions.md) | Manage AI Bridge interceptions. | diff --git a/docs/reference/cli/aibridge_interceptions.md b/docs/reference/cli/aibridge_interceptions.md index 9cfb3d45a74ea..80c2135b07055 100644 --- a/docs/reference/cli/aibridge_interceptions.md +++ b/docs/reference/cli/aibridge_interceptions.md @@ -1,7 +1,7 @@ # aibridge interceptions -Manage AIBridge interceptions. +Manage AI Bridge interceptions. ## Usage @@ -11,6 +11,6 @@ coder aibridge interceptions ## Subcommands -| Name | Purpose | -|-------------------------------------------------------|--------------------------------------| -| [list](./aibridge_interceptions_list.md) | List AIBridge interceptions as JSON. | +| Name | Purpose | +|-------------------------------------------------------|---------------------------------------| +| [list](./aibridge_interceptions_list.md) | List AI Bridge interceptions as JSON. | diff --git a/docs/reference/cli/aibridge_interceptions_list.md b/docs/reference/cli/aibridge_interceptions_list.md index 7e86cd4968e33..a47b8c53dafd3 100644 --- a/docs/reference/cli/aibridge_interceptions_list.md +++ b/docs/reference/cli/aibridge_interceptions_list.md @@ -1,7 +1,7 @@ # aibridge interceptions list -List AIBridge interceptions as JSON. +List AI Bridge interceptions as JSON. ## Usage diff --git a/docs/reference/cli/index.md b/docs/reference/cli/index.md index 1005da991dc4f..958e475fea80c 100644 --- a/docs/reference/cli/index.md +++ b/docs/reference/cli/index.md @@ -68,7 +68,7 @@ Coder — A tool for provisioning self-hosted development environments with Terr | [groups](./groups.md) | Manage groups | | [prebuilds](./prebuilds.md) | Manage Coder prebuilds | | [external-workspaces](./external-workspaces.md) | Create or manage external workspaces | -| [aibridge](./aibridge.md) | Manage AIBridge. | +| [aibridge](./aibridge.md) | Manage AI Bridge. | ## Options diff --git a/docs/reference/cli/server.md b/docs/reference/cli/server.md index 92c46ee8a9027..951e140f3f01f 100644 --- a/docs/reference/cli/server.md +++ b/docs/reference/cli/server.md @@ -1762,7 +1762,7 @@ The small fast model to use when making requests to the AWS Bedrock API. Claude | YAML | 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-retention diff --git a/enterprise/cli/aibridge.go b/enterprise/cli/aibridge.go index 90953b6aa2bf2..a8e539713067a 100644 --- a/enterprise/cli/aibridge.go +++ b/enterprise/cli/aibridge.go @@ -17,7 +17,7 @@ const maxInterceptionsLimit = 1000 func (r *RootCmd) aibridge() *serpent.Command { cmd := &serpent.Command{ Use: "aibridge", - Short: "Manage AIBridge.", + Short: "Manage AI Bridge.", Handler: func(inv *serpent.Invocation) error { return inv.Command.HelpHandler(inv) }, @@ -31,7 +31,7 @@ func (r *RootCmd) aibridge() *serpent.Command { func (r *RootCmd) aibridgeInterceptions() *serpent.Command { cmd := &serpent.Command{ Use: "interceptions", - Short: "Manage AIBridge interceptions.", + Short: "Manage AI Bridge interceptions.", Handler: func(inv *serpent.Invocation) error { return inv.Command.HelpHandler(inv) }, @@ -55,7 +55,7 @@ func (r *RootCmd) aibridgeInterceptionsList() *serpent.Command { return &serpent.Command{ Use: "list", - Short: "List AIBridge interceptions as JSON.", + Short: "List AI Bridge interceptions as JSON.", Options: serpent.OptionSet{ { Flag: "initiator", diff --git a/enterprise/cli/testdata/coder_--help.golden b/enterprise/cli/testdata/coder_--help.golden index 51ee58258f8e4..78d27661f97c0 100644 --- a/enterprise/cli/testdata/coder_--help.golden +++ b/enterprise/cli/testdata/coder_--help.golden @@ -14,7 +14,7 @@ USAGE: $ coder templates init SUBCOMMANDS: - aibridge Manage AIBridge. + aibridge Manage AI Bridge. external-workspaces Create or manage external workspaces features List Enterprise features groups Manage groups diff --git a/enterprise/cli/testdata/coder_aibridge_--help.golden b/enterprise/cli/testdata/coder_aibridge_--help.golden index d005ae429ad50..5fdb98d21a479 100644 --- a/enterprise/cli/testdata/coder_aibridge_--help.golden +++ b/enterprise/cli/testdata/coder_aibridge_--help.golden @@ -3,10 +3,10 @@ coder v0.0.0-devel USAGE: coder aibridge - Manage AIBridge. + Manage AI Bridge. SUBCOMMANDS: - interceptions Manage AIBridge interceptions. + interceptions Manage AI Bridge interceptions. ——— Run `coder --help` for a list of global options. diff --git a/enterprise/cli/testdata/coder_aibridge_interceptions_--help.golden b/enterprise/cli/testdata/coder_aibridge_interceptions_--help.golden index 1f3b3af5ad3d3..49e36fb712177 100644 --- a/enterprise/cli/testdata/coder_aibridge_interceptions_--help.golden +++ b/enterprise/cli/testdata/coder_aibridge_interceptions_--help.golden @@ -3,10 +3,10 @@ coder v0.0.0-devel USAGE: coder aibridge interceptions - Manage AIBridge interceptions. + Manage AI Bridge interceptions. SUBCOMMANDS: - list List AIBridge interceptions as JSON. + list List AI Bridge interceptions as JSON. ——— Run `coder --help` for a list of global options. diff --git a/enterprise/cli/testdata/coder_aibridge_interceptions_list_--help.golden b/enterprise/cli/testdata/coder_aibridge_interceptions_list_--help.golden index c98fd0019a45a..307696c390486 100644 --- a/enterprise/cli/testdata/coder_aibridge_interceptions_list_--help.golden +++ b/enterprise/cli/testdata/coder_aibridge_interceptions_list_--help.golden @@ -3,7 +3,7 @@ coder v0.0.0-devel USAGE: coder aibridge interceptions list [flags] - List AIBridge interceptions as JSON. + List AI Bridge interceptions as JSON. OPTIONS: --after-id string diff --git a/enterprise/cli/testdata/coder_server_--help.golden b/enterprise/cli/testdata/coder_server_--help.golden index 9ce4bcaf7b54e..5ed217752b2c6 100644 --- a/enterprise/cli/testdata/coder_server_--help.golden +++ b/enterprise/cli/testdata/coder_server_--help.golden @@ -81,7 +81,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. @@ -115,9 +115,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. diff --git a/enterprise/coderd/aibridge.go b/enterprise/coderd/aibridge.go index 3f3b1d6789a09..96bbe1d205181 100644 --- a/enterprise/coderd/aibridge.go +++ b/enterprise/coderd/aibridge.go @@ -57,14 +57,14 @@ func aibridgeHandler(api *API, middlewares ...func(http.Handler) http.Handler) f } } -// aiBridgeListInterceptions returns all AIBridge interceptions a user can read. +// aiBridgeListInterceptions returns all AI Bridge interceptions a user can read. // Optional filters with query params // -// @Summary List AIBridge interceptions -// @ID list-aibridge-interceptions +// @Summary List AI Bridge interceptions +// @ID list-ai-bridge-interceptions // @Security CoderSessionToken // @Produce json -// @Tags AIBridge +// @Tags AI Bridge // @Param q query string false "Search query in the format `key:value`. Available keys are: initiator, provider, model, started_after, started_before." // @Param limit query int false "Page limit" // @Param after_id query string false "Cursor pagination after ID (cannot be used with offset)" @@ -144,7 +144,7 @@ func (api *API) aiBridgeListInterceptions(rw http.ResponseWriter, r *http.Reques }, nil) if err != nil { httpapi.Write(ctx, rw, http.StatusInternalServerError, codersdk.Response{ - Message: "Internal error getting AIBridge interceptions.", + Message: "Internal error getting AI Bridge interceptions.", Detail: err.Error(), }) return @@ -172,7 +172,7 @@ func populatedAndConvertAIBridgeInterceptions(ctx context.Context, db database.S ids[i] = row.AIBridgeInterception.ID } - //nolint:gocritic // This is a system function until we implement a join for aibridge interceptions. AIBridge interception subresources use the same authorization call as their parent. + //nolint:gocritic // This is a system function until we implement a join for aibridge interceptions. AI Bridge interception subresources use the same authorization call as their parent. tokenUsagesRows, err := db.ListAIBridgeTokenUsagesByInterceptionIDs(dbauthz.AsSystemRestricted(ctx), ids) if err != nil { return nil, xerrors.Errorf("get linked aibridge token usages from database: %w", err) @@ -182,7 +182,7 @@ func populatedAndConvertAIBridgeInterceptions(ctx context.Context, db database.S tokenUsagesMap[row.InterceptionID] = append(tokenUsagesMap[row.InterceptionID], row) } - //nolint:gocritic // This is a system function until we implement a join for aibridge interceptions. AIBridge interception subresources use the same authorization call as their parent. + //nolint:gocritic // This is a system function until we implement a join for aibridge interceptions. AI Bridge interception subresources use the same authorization call as their parent. userPromptRows, err := db.ListAIBridgeUserPromptsByInterceptionIDs(dbauthz.AsSystemRestricted(ctx), ids) if err != nil { return nil, xerrors.Errorf("get linked aibridge user prompts from database: %w", err) @@ -192,7 +192,7 @@ func populatedAndConvertAIBridgeInterceptions(ctx context.Context, db database.S userPromptsMap[row.InterceptionID] = append(userPromptsMap[row.InterceptionID], row) } - //nolint:gocritic // This is a system function until we implement a join for aibridge interceptions. AIBridge interception subresources use the same authorization call as their parent. + //nolint:gocritic // This is a system function until we implement a join for aibridge interceptions. AI Bridge interception subresources use the same authorization call as their parent. toolUsagesRows, err := db.ListAIBridgeToolUsagesByInterceptionIDs(dbauthz.AsSystemRestricted(ctx), ids) if err != nil { return nil, xerrors.Errorf("get linked aibridge tool usages from database: %w", err) diff --git a/scripts/apidocgen/postprocess/main.go b/scripts/apidocgen/postprocess/main.go index a37b85c975b3d..b09421efced35 100644 --- a/scripts/apidocgen/postprocess/main.go +++ b/scripts/apidocgen/postprocess/main.go @@ -239,5 +239,5 @@ func extractSectionName(section []byte) (string, error) { } func toMdFilename(sectionName string) string { - return nonAlphanumericRegex.ReplaceAllLiteralString(strings.ToLower(sectionName), "-") + ".md" + return nonAlphanumericRegex.ReplaceAllLiteralString(strings.ReplaceAll(strings.ToLower(sectionName), " ", ""), "-") + ".md" }