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:
Susana Ferreira
2026-04-02 10:58:13 +01:00
committed by GitHub
parent f4dc8f6b11
commit fb788530b3
21 changed files with 453 additions and 283 deletions
+1
View File
@@ -80,6 +80,7 @@ curl -X GET http://coder-server:8080/api/v2/aibridge/interceptions \
},
"model": "string",
"provider": "string",
"provider_name": "string",
"started_at": "2019-08-24T14:15:22Z",
"token_usages": [
{
+3
View File
@@ -498,6 +498,7 @@
},
"model": "string",
"provider": "string",
"provider_name": "string",
"started_at": "2019-08-24T14:15:22Z",
"token_usages": [
{
@@ -559,6 +560,7 @@
| » `[any property]` | any | false | | |
| `model` | string | false | | |
| `provider` | string | false | | |
| `provider_name` | string | false | | |
| `started_at` | string | false | | |
| `token_usages` | array of [codersdk.AIBridgeTokenUsage](#codersdkaibridgetokenusage) | false | | |
| `tool_usages` | array of [codersdk.AIBridgeToolUsage](#codersdkaibridgetoolusage) | false | | |
@@ -587,6 +589,7 @@
},
"model": "string",
"provider": "string",
"provider_name": "string",
"started_at": "2019-08-24T14:15:22Z",
"token_usages": [
{