refactor!: remove interceptions API, request logs view, and associated code#26213
refactor!: remove interceptions API, request logs view, and associated code#26213dannykopping wants to merge 2 commits into
Conversation
Docs preview📖 View docs preview for |
eaa4780 to
527c0ca
Compare
|
|
||
| const maxInterceptionsLimit = 1000 | ||
|
|
||
| func (r *RootCmd) aibridge() *serpent.Command { |
There was a problem hiding this comment.
We don't query sessions fromt the CLI yet. We can add this back if/when we do, or we add some other feature to the CLI for AI Gateway.
58082df to
52b1854
Compare
Documentation CheckUpdates Needed
Automated review via Coder Agents |
Remove the deprecated /api/v2/aibridge/interceptions endpoint, the Request Logs frontend page, and all supporting code. The sessions-based view replaces them. Closes AIGOV-266 and AIGOV-324. Backend: - /interceptions HTTP handler and CLI command - SDK types and client methods for interceptions - Interceptions list/count SQL queries and search query parser - dbauthz wrappers and in-memory query implementations Frontend: - RequestLogsPage and its row, filter, and view components - Router route and lazy import for /aibridge/request-logs - API client method and query function for interceptions - Mock interception entities The /models and /clients endpoints stay because the sessions list page filter menus still need them. The shared filter and icon components move from RequestLogsPage to AIBridgePage/filters and AIBridgePage/icons so the sessions pages keep working.
The getProviderIconName wrapper existed to remap "anthropic" to "anthropic-neue" so RequestLogsPage rendered the correct icon. With that page removed, the wrapper, the FIXME comment, and the duplicate "anthropic-neue" icon case are no longer needed. Call sites now pass the provider directly.
52b1854 to
eb43282
Compare
Good call; I thought I'd marked these all deprecated but I hadn't. |
|
Oh, in that case WDYT about marking these as deprecated in this release, showing warnings, and removing them in the next? |
|
Not a blocker at all. Just an observation and I would leave the decision to you. Thanks |
The web UI is already hidden. I think it's safe to get rid of the APIs as well. I doubt anybody is using them; they're not useful. And if anyone complains we'll advise them to move over to the new APIs. |
Summary
Removes the deprecated
/api/v2/aibridge/interceptionsendpoint 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
GET /api/v2/aibridge/interceptionsHTTP handler and routeAIBridgeInterception,AIBridgeTokenUsage,AIBridgeUserPrompt,AIBridgeToolUsage,AIBridgeListInterceptionsResponse,AIBridgeListInterceptionsFilter)CountAIBridgeInterceptionsandListAIBridgeInterceptionssearchquery.AIBridgeInterceptionsparsercoder aibridge interceptions listCLI command and golden filesThe
/models,/clients, and/sessionsendpoints stay; the sessions list page still consumes all three.Frontend
RequestLogsPage/directory (page, view, row, filter, stories, tests)/aibridge/request-logsroute and its lazy importgetAIBridgeInterceptionsAPI method,paginatedInterceptionsquery, and mock interception entitiesgit mvthe 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/getProviderIconNamehack and the duplicateanthropic-neueicon case now that the FIXME no longer appliesCommits
refactor: remove interceptions API and request logs view— the bulk removal, with explicit renames for the shared filter/icon files.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