refactor!: remove interceptions API, request logs view, and associated code (#26213)

## Summary

Removes the deprecated `/api/v2/aibridge/interceptions` endpoint and the
Request Logs frontend page, both replaced by the session-based view.

Closes https://linear.app/codercom/issue/AIGOV-266
Closes https://linear.app/codercom/issue/AIGOV-324

## Changes

### Backend
- Remove `GET /api/v2/aibridge/interceptions` HTTP handler and route
- Remove SDK types and client method (`AIBridgeInterception`,
`AIBridgeTokenUsage`, `AIBridgeUserPrompt`, `AIBridgeToolUsage`,
`AIBridgeListInterceptionsResponse`, `AIBridgeListInterceptionsFilter`)
- Remove SQL queries `CountAIBridgeInterceptions` and
`ListAIBridgeInterceptions`
- Remove `searchquery.AIBridgeInterceptions` parser
- Remove dbauthz wrappers, in-memory implementations, metrics, and mocks
for the interceptions list queries
- Remove the `coder aibridge interceptions list` CLI command and golden
files
- Regenerate API docs, swagger, mocks, and metrics

The `/models`, `/clients`, and `/sessions` endpoints stay; the sessions
list page still consumes all three.

### Frontend
- Delete the entire `RequestLogsPage/` directory (page, view, row,
filter, stories, tests)
- Remove the `/aibridge/request-logs` route and its lazy import
- Remove the `getAIBridgeInterceptions` API method,
`paginatedInterceptions` query, and mock interception entities
- `git mv` the shared filter and icon components used by the sessions
pages:
- `RequestLogsPage/RequestLogsFilter/{Client,Model,Provider}Filter.tsx`
→ `AIBridgePage/filters/`
- `RequestLogsPage/icons/AIBridge{Client,Model,Provider}Icon.tsx` →
`AIBridgePage/icons/`
- Drop the `getProviderIconName` hack and the duplicate `anthropic-neue`
icon case now that the FIXME no longer applies

## Commits

1. `refactor: remove interceptions API and request logs view` — the bulk
removal, with explicit renames for the shared filter/icon files.
2. `refactor(site/src/pages/AIBridgePage): drop getProviderIconName
hack` — cleanup of the FIXME that depended on RequestLogsPage existing.

> [!NOTE]
> Generated by Coder Agents on behalf of @dannykopping
This commit is contained in:
Danny Kopping
2026-06-12 07:50:46 +02:00
committed by GitHub
parent b1c6010eb9
commit 4a07f61c50
56 changed files with 36 additions and 4548 deletions
-1
View File
@@ -16,7 +16,6 @@ USAGE:
SUBCOMMANDS:
agent-firewall Network isolation tool for monitoring and restricting
HTTP/HTTPS requests
aibridge Manage AI Bridge.
external-workspaces Create or manage external workspaces
features List Enterprise features
groups Manage groups
-12
View File
@@ -1,12 +0,0 @@
coder v0.0.0-devel
USAGE:
coder aibridge
Manage AI Bridge.
SUBCOMMANDS:
interceptions Manage AI Bridge interceptions.
———
Run `coder --help` for a list of global options.
@@ -1,12 +0,0 @@
coder v0.0.0-devel
USAGE:
coder aibridge interceptions
Manage AI Bridge interceptions.
SUBCOMMANDS:
list List AI Bridge interceptions as JSON.
———
Run `coder --help` for a list of global options.
@@ -1,43 +0,0 @@
coder v0.0.0-devel
USAGE:
coder aibridge interceptions list [flags]
List AI Bridge interceptions as JSON.
OPTIONS:
--after-id string
The ID of the last result on the previous page to use as a pagination
cursor.
--client string
Only return interceptions from this client.
--initiator string
Only return interceptions initiated by this user. Accepts a user ID,
username, or "me".
--limit int (default: 100)
The limit of results to return. Must be between 1 and 1000.
--model string
Only return interceptions from this model.
--provider string
Only return interceptions from this provider.
--provider-name string
Only return interceptions from the named provider.
--started-after string
Only return interceptions started after this time. Must be before
'started-before' if set. Accepts a time in the RFC 3339 format, e.g.
"====[timestamp]=====07:00".
--started-before string
Only return interceptions started before this time. Must be after
'started-after' if set. Accepts a time in the RFC 3339 format, e.g.
"====[timestamp]=====07:00".
———
Run `coder --help` for a list of global options.