mirror of
https://github.com/coder/coder.git
synced 2026-06-02 20:48:20 +00:00
chore(docs): standardize "AIBridge" to "AI Bridge" in documentation (#20831)
This commit is contained in:
@@ -9,6 +9,7 @@ IST = "IST"
|
||||
MacOS = "macOS"
|
||||
AKS = "AKS"
|
||||
O_WRONLY = "O_WRONLY"
|
||||
AIBridge = "AI Bridge"
|
||||
|
||||
[default.extend-words]
|
||||
AKS = "AKS"
|
||||
|
||||
+4
-4
@@ -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.
|
||||
|
||||
+2
-2
@@ -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
|
||||
|
||||
Generated
+3
-3
@@ -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",
|
||||
|
||||
Generated
+3
-3
@@ -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",
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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"}),
|
||||
)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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())
|
||||
|
||||
+15
-15
@@ -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",
|
||||
|
||||
+3
-3
@@ -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"
|
||||
},
|
||||
{
|
||||
|
||||
Generated
+2
-2
@@ -1,6 +1,6 @@
|
||||
# AIBridge
|
||||
# AI Bridge
|
||||
|
||||
## List AIBridge interceptions
|
||||
## List AI Bridge interceptions
|
||||
|
||||
### Code samples
|
||||
|
||||
|
||||
Generated
+4
-4
@@ -1,7 +1,7 @@
|
||||
<!-- DO NOT EDIT | GENERATED CONTENT -->
|
||||
# aibridge
|
||||
|
||||
Manage AIBridge.
|
||||
Manage AI Bridge.
|
||||
|
||||
## Usage
|
||||
|
||||
@@ -11,6 +11,6 @@ coder aibridge
|
||||
|
||||
## Subcommands
|
||||
|
||||
| Name | Purpose |
|
||||
|-----------------------------------------------------------|--------------------------------|
|
||||
| [<code>interceptions</code>](./aibridge_interceptions.md) | Manage AIBridge interceptions. |
|
||||
| Name | Purpose |
|
||||
|-----------------------------------------------------------|---------------------------------|
|
||||
| [<code>interceptions</code>](./aibridge_interceptions.md) | Manage AI Bridge interceptions. |
|
||||
|
||||
+4
-4
@@ -1,7 +1,7 @@
|
||||
<!-- DO NOT EDIT | GENERATED CONTENT -->
|
||||
# aibridge interceptions
|
||||
|
||||
Manage AIBridge interceptions.
|
||||
Manage AI Bridge interceptions.
|
||||
|
||||
## Usage
|
||||
|
||||
@@ -11,6 +11,6 @@ coder aibridge interceptions
|
||||
|
||||
## Subcommands
|
||||
|
||||
| Name | Purpose |
|
||||
|-------------------------------------------------------|--------------------------------------|
|
||||
| [<code>list</code>](./aibridge_interceptions_list.md) | List AIBridge interceptions as JSON. |
|
||||
| Name | Purpose |
|
||||
|-------------------------------------------------------|---------------------------------------|
|
||||
| [<code>list</code>](./aibridge_interceptions_list.md) | List AI Bridge interceptions as JSON. |
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
<!-- DO NOT EDIT | GENERATED CONTENT -->
|
||||
# aibridge interceptions list
|
||||
|
||||
List AIBridge interceptions as JSON.
|
||||
List AI Bridge interceptions as JSON.
|
||||
|
||||
## Usage
|
||||
|
||||
|
||||
Generated
+1
-1
@@ -68,7 +68,7 @@ Coder — A tool for provisioning self-hosted development environments with Terr
|
||||
| [<code>groups</code>](./groups.md) | Manage groups |
|
||||
| [<code>prebuilds</code>](./prebuilds.md) | Manage Coder prebuilds |
|
||||
| [<code>external-workspaces</code>](./external-workspaces.md) | Create or manage external workspaces |
|
||||
| [<code>aibridge</code>](./aibridge.md) | Manage AIBridge. |
|
||||
| [<code>aibridge</code>](./aibridge.md) | Manage AI Bridge. |
|
||||
|
||||
## Options
|
||||
|
||||
|
||||
Generated
+1
-1
@@ -1762,7 +1762,7 @@ The small fast model to use when making requests to the AWS Bedrock API. Claude
|
||||
| YAML | <code>aibridge.inject_coder_mcp_tools</code> |
|
||||
| Default | <code>false</code> |
|
||||
|
||||
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
|
||||
|
||||
|
||||
@@ -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",
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
+2
-2
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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
|
||||
|
||||
+4
-4
@@ -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.
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user