mirror of
https://github.com/coder/coder.git
synced 2026-06-02 20:48:20 +00:00
fb788530b3
## Description Adds `provider_name` to aibridge interceptions to store the provider instance name alongside the provider type. This allows distinguishing between multiple instances of the same provider type (e.g. `copilot` vs `copilot-business`). ## Changes * Add `provider_name` column to `aibridge_interceptions` table with backfill from `provider`. * Add `provider_name` field to the proto `RecordInterceptionRequest` message. * Add `ProviderName` to the `codersdk.AIBridgeInterception` API response. _Disclaimer: initially produced by Claude Opus 4.6, modified and reviewed by @ssncferreira ._
7 lines
423 B
SQL
7 lines
423 B
SQL
ALTER TABLE aibridge_interceptions ADD COLUMN provider_name TEXT NOT NULL DEFAULT '';
|
|
|
|
COMMENT ON COLUMN aibridge_interceptions.provider_name IS 'The provider instance name which may differ from provider when multiple instances of the same provider type exist.';
|
|
|
|
-- Backfill existing records with the provider type as the provider name.
|
|
UPDATE aibridge_interceptions SET provider_name = provider WHERE provider_name = '';
|