mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat: add provider_name column to aibridge interceptions (#23960)
## 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 ._
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
-- name: InsertAIBridgeInterception :one
|
||||
INSERT INTO aibridge_interceptions (
|
||||
id, api_key_id, initiator_id, provider, model, metadata, started_at, client, client_session_id, thread_parent_id, thread_root_id
|
||||
id, api_key_id, initiator_id, provider, provider_name, model, metadata, started_at, client, client_session_id, thread_parent_id, thread_root_id
|
||||
) VALUES (
|
||||
@id, @api_key_id, @initiator_id, @provider, @model, COALESCE(@metadata::jsonb, '{}'::jsonb), @started_at, @client, sqlc.narg('client_session_id'), sqlc.narg('thread_parent_interception_id')::uuid, sqlc.narg('thread_root_interception_id')::uuid
|
||||
@id, @api_key_id, @initiator_id, @provider, @provider_name, @model, COALESCE(@metadata::jsonb, '{}'::jsonb), @started_at, @client, sqlc.narg('client_session_id'), sqlc.narg('thread_parent_interception_id')::uuid, sqlc.narg('thread_root_interception_id')::uuid
|
||||
)
|
||||
RETURNING *;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user