diff --git a/cli/testdata/coder_server_--help.golden b/cli/testdata/coder_server_--help.golden index 506f31b489..fccd065f50 100644 --- a/cli/testdata/coder_server_--help.golden +++ b/cli/testdata/coder_server_--help.golden @@ -117,7 +117,7 @@ AI GATEWAY OPTIONS: limit, and is currently the only supported value. --ai-gateway-dump-dir string, $CODER_AI_GATEWAY_DUMP_DIR - Base directory for dumping AI Bridge request/response pairs to disk + Base directory for dumping AI Gateway request/response pairs to disk for debugging. When set, each provider writes under a subdirectory named after the provider. Sensitive headers are redacted. Leave empty to disable. diff --git a/cli/testdata/server-config.yaml.golden b/cli/testdata/server-config.yaml.golden index 8d7b441354..f16fe383c1 100644 --- a/cli/testdata/server-config.yaml.golden +++ b/cli/testdata/server-config.yaml.golden @@ -972,7 +972,7 @@ ai_gateway: # X-Ai-Bridge-Actor-Metadata-Username (their username). # (default: false, type: bool) send_actor_headers: false - # Base directory for dumping AI Bridge request/response pairs to disk for + # Base directory for dumping AI Gateway request/response pairs to disk for # debugging. When set, each provider writes under a subdirectory named after the # provider. Sensitive headers are redacted. Leave empty to disable. # (default: , type: string) diff --git a/coderd/ai_providers_migrate.go b/coderd/ai_providers_migrate.go index 7ec6a997b0..ed44592530 100644 --- a/coderd/ai_providers_migrate.go +++ b/coderd/ai_providers_migrate.go @@ -143,7 +143,7 @@ func SeedAIProvidersFromEnv( if existingHash == dp.Hash { continue } - return xerrors.Errorf("AI provider %q already exists in the database and differs from the current environment configuration; update the provider through the API or remove the CODER_AIBRIDGE_* env vars to stop seeding it", dp.Name) + return xerrors.Errorf("AI provider %q already exists in the database and differs from the current environment configuration; update the provider through the API or remove the CODER_AIBRIDGE_* (legacy) / CODER_AI_GATEWAY_* env vars to stop seeding it", dp.Name) } row, err := tx.InsertAIProvider(sysCtx, database.InsertAIProviderParams{ diff --git a/coderd/coderd.go b/coderd/coderd.go index ae0df0eb88..7eb955d6ce 100644 --- a/coderd/coderd.go +++ b/coderd/coderd.go @@ -625,7 +625,7 @@ func New(options *Options) *API { // Seed the AI Bridge model price table from the embedded price book. //nolint:gocritic // Startup seeder needs to run as aibridge context. if err := prices.Seed(dbauthz.AsAIBridged(ctx), options.Database); err != nil { - options.Logger.Error(ctx, "failed to seed AI Bridge prices; cost tracking may use stale prices", slog.Error(err)) + options.Logger.Error(ctx, "failed to seed AI Gateway prices; cost tracking may use stale prices", slog.Error(err)) } // AGPL uses a no-op build usage checker as there are no license diff --git a/coderd/database/dbauthz/dbauthz.go b/coderd/database/dbauthz/dbauthz.go index d6e5a27e77..a735b85542 100644 --- a/coderd/database/dbauthz/dbauthz.go +++ b/coderd/database/dbauthz/dbauthz.go @@ -638,12 +638,12 @@ var ( // See aibridged package. subjectAibridged = rbac.Subject{ Type: rbac.SubjectAibridged, - FriendlyName: "AI Bridge Daemon", + FriendlyName: "AI Gateway Daemon", ID: uuid.Nil.String(), Roles: rbac.Roles([]rbac.Role{ { Identifier: rbac.RoleIdentifier{Name: "aibridged"}, - DisplayName: "AI Bridge Daemon", + DisplayName: "AI Gateway 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/telemetry/telemetry.go b/coderd/telemetry/telemetry.go index 2f6945ba3f..e581c8b473 100644 --- a/coderd/telemetry/telemetry.go +++ b/coderd/telemetry/telemetry.go @@ -774,7 +774,7 @@ func (r *remoteReporter) createSnapshot() (*Snapshot, error) { eg.Go(func() error { summaries, err := r.generateAIBridgeInterceptionsSummaries(ctx) if err != nil { - return xerrors.Errorf("generate AI Bridge interceptions telemetry summaries: %w", err) + return xerrors.Errorf("generate AI Gateway interceptions telemetry summaries: %w", err) } snapshot.AIBridgeInterceptionsSummaries = summaries return nil @@ -878,7 +878,7 @@ func (r *remoteReporter) generateAIBridgeInterceptionsSummaries(ctx context.Cont return nil, nil } if err != nil { - return nil, xerrors.Errorf("insert AI Bridge interceptions telemetry lock (period_ending_at=%q): %w", endedAtBefore, err) + return nil, xerrors.Errorf("insert AI Gateway interceptions telemetry lock (period_ending_at=%q): %w", endedAtBefore, err) } // List the summary categories that need to be calculated. @@ -887,7 +887,7 @@ func (r *remoteReporter) generateAIBridgeInterceptionsSummaries(ctx context.Cont EndedAtBefore: endedAtBefore, // exclusive }) if err != nil { - return nil, xerrors.Errorf("list AI Bridge interceptions telemetry summaries (startedAtAfter=%q, endedAtBefore=%q): %w", endedAtAfter, endedAtBefore, err) + return nil, xerrors.Errorf("list AI Gateway interceptions telemetry summaries (startedAtAfter=%q, endedAtBefore=%q): %w", endedAtAfter, endedAtBefore, err) } // Calculate and convert the summaries for all categories. @@ -906,7 +906,7 @@ func (r *remoteReporter) generateAIBridgeInterceptionsSummaries(ctx context.Cont EndedAtBefore: endedAtBefore, }) if err != nil { - 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) + return xerrors.Errorf("calculate AI Gateway 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/deployment.go b/codersdk/deployment.go index 2b4d92006a..479b371276 100644 --- a/codersdk/deployment.go +++ b/codersdk/deployment.go @@ -1999,7 +1999,7 @@ communicating directly.`, } aiGatewayAPIDumpDir := serpent.Option{ Name: "AI Gateway API Dump Directory", - Description: "Base directory for dumping AI Bridge request/response pairs to disk for debugging. When set, each provider writes under a subdirectory named after the provider. Sensitive headers are redacted. Leave empty to disable.", + Description: "Base directory for dumping AI Gateway request/response pairs to disk for debugging. When set, each provider writes under a subdirectory named after the provider. Sensitive headers are redacted. Leave empty to disable.", Flag: "ai-gateway-dump-dir", Env: "CODER_AI_GATEWAY_DUMP_DIR", Value: &c.AI.BridgeConfig.APIDumpDir, diff --git a/docs/.style/style-guide/audience-and-scope.md b/docs/.style/style-guide/audience-and-scope.md index 20970b96e1..3a35d7d213 100644 --- a/docs/.style/style-guide/audience-and-scope.md +++ b/docs/.style/style-guide/audience-and-scope.md @@ -314,7 +314,7 @@ Caitlin is non-technical (customer success) but uses agentic AI tools to make sm They need docs that explain Coder Tasks and the agent-driven flows in plain language, with no assumed dev-environment knowledge and no manual setup steps. They avoid anything that requires opening a terminal or editing a config file. -*Coder surface:* Coder Tasks, AI Bridge, prompt-driven workflows, web-based interfaces. +*Coder surface:* Coder Tasks, AI Gateway, prompt-driven workflows, web-based interfaces. #### Felipe the FinOps diff --git a/docs/.style/style-guide/word-choice.md b/docs/.style/style-guide/word-choice.md index 08e3b6ea4a..4fd7b1d922 100644 --- a/docs/.style/style-guide/word-choice.md +++ b/docs/.style/style-guide/word-choice.md @@ -19,7 +19,7 @@ It reads as a misspelling of the product name. |---------------------------------|------------------------------------------------| | Coder | coder (referring to the product, no backticks) | | `coder` (the CLI, in backticks) | coder (the CLI, no backticks) | -| AI Bridge | AI bridge, AIBridge | +| AI Gateway | AI gateway, AIGateway, AI Bridge | | Workspace Proxy | workspace proxy (referring to the feature) | | workspace | Workspace (referring to the generic concept) | | template | Template (referring to the generic concept) | @@ -30,13 +30,13 @@ It reads as a misspelling of the product name. > Coder runs `coder login` to authenticate against the Coder server. > -> Open the AI Bridge integration page to configure model providers. +> Open the AI Gateway integration page to configure model providers. **Don't**: > coder runs coder login to authenticate against the coder server. > -> Open the ai bridge integration page to configure model providers. +> Open the ai gateway integration page to configure model providers. *Enforced by `Coder.ProductTerms` (planned).* diff --git a/docs/reference/cli/server.md b/docs/reference/cli/server.md index 367fb0519b..5ff296bc02 100644 --- a/docs/reference/cli/server.md +++ b/docs/reference/cli/server.md @@ -1919,7 +1919,7 @@ Once enabled, extra headers will be added to upstream requests to identify the u | Environment | $CODER_AI_GATEWAY_DUMP_DIR | | YAML | ai_gateway.api_dump_dir | -Base directory for dumping AI Bridge request/response pairs to disk for debugging. When set, each provider writes under a subdirectory named after the provider. Sensitive headers are redacted. Leave empty to disable. +Base directory for dumping AI Gateway request/response pairs to disk for debugging. When set, each provider writes under a subdirectory named after the provider. Sensitive headers are redacted. Leave empty to disable. ### --ai-gateway-allow-byok diff --git a/enterprise/cli/testdata/coder_server_--help.golden b/enterprise/cli/testdata/coder_server_--help.golden index bc0822640d..f29a8f84a7 100644 --- a/enterprise/cli/testdata/coder_server_--help.golden +++ b/enterprise/cli/testdata/coder_server_--help.golden @@ -118,7 +118,7 @@ AI GATEWAY OPTIONS: limit, and is currently the only supported value. --ai-gateway-dump-dir string, $CODER_AI_GATEWAY_DUMP_DIR - Base directory for dumping AI Bridge request/response pairs to disk + Base directory for dumping AI Gateway request/response pairs to disk for debugging. When set, each provider writes under a subdirectory named after the provider. Sensitive headers are redacted. Leave empty to disable. diff --git a/examples/monitoring/dashboards/grafana/aibridge/README.md b/examples/monitoring/dashboards/grafana/aibridge/README.md index dd9f2a4b21..1195a00dd6 100644 --- a/examples/monitoring/dashboards/grafana/aibridge/README.md +++ b/examples/monitoring/dashboards/grafana/aibridge/README.md @@ -1,6 +1,6 @@ -# AI Bridge Grafana Dashboard +# AI Gateway Grafana Dashboard -![AI Bridge example Grafana Dashboard](./grafana_dashboard.png)A sample Grafana dashboard for monitoring AI Bridge token usage, costs, and cache hit rates in Coder. +![AI Gateway example Grafana Dashboard](./grafana_dashboard.png)A sample Grafana dashboard for monitoring AI Gateway token usage, costs, and cache hit rates in Coder. The dashboard includes four main sections with multiple visualization panels: