Skip to content

Conversation

@jakehwll
Copy link
Contributor

@jakehwll jakehwll commented Dec 13, 2025

Warning

This was mismerged and incorrectly closed. Its been recreated in #21340

This implements a simple filter for querying against AI Bridge with a given model to the frontend UI. With a simple set of backend changes to return back the models which are filterable against.

Furthermore, I made a few changes to ensure that the imports of /filter are more understandable/scoped, they now live under RequestLogsFilter.

Preview

aibridge-model-filter.mp4
Position Pull-request
fix: improve AI Bridge request logs UI/UX
feat: add AI Bridge request logs model filter
chore!: promote AIBridge from ExperimentalHandler
feat: implement request log collapsing prompt (<RequestLogsPrompt />)
feat: add <SyntaxHighlighter /> for AI Bridge Token Usages Metadata

@codex

@jakehwll jakehwll marked this pull request as ready for review December 15, 2025 05:29
@jakehwll jakehwll force-pushed the jakehwll/ai-bridge-request-logs-model branch from 66b1342 to f933ea4 Compare December 15, 2025 13:56
@jakehwll jakehwll force-pushed the jakehwll/ai-bridge-request-logs-model branch from 9e4336d to 6078455 Compare December 15, 2025 14:29
jakehwll added a commit that referenced this pull request Dec 17, 2025
Addressing feedback found in #21252

> [!IMPORTANT]
> This pull-request removes endpoints from `ExperimentalHandler` from
`coderd.go` and promotes the endpoints within the frontend. This means
that we will no longer be serving AI Bridge under the
`/api/experimental/` prefix now that things reached release in
[`v2.29.0`](https://github.com/coder/coder/releases/tag/v2.29.0).
>
> ### Migration 
>
> The `/api/experimental/aibridge` prefix has been removed. Any clients,
scripts, or integrations that previously called AI Bridge endpoints
under `/api/experimental/aibridge` must be updated to use the
`/api/v2/aibridge` stable API routes introduced in v2.29.0.

| Position | Pull-request |
| -------- | ------------ |
| | [fix: improve AI Bridge request logs
UI/UX](#21252) |
| | [feat: add AI Bridge request logs model
filter](#21259) |
| ✅ | [fix: promote AIBridge from
`ExperimentalHandler`](#21278) |

---------

Co-authored-by: Susana Ferreira <susana@coder.com>
@jakehwll jakehwll requested a review from pawbana December 18, 2025 04:29
jakehwll added a commit that referenced this pull request Dec 18, 2025
Closes #21052 and is related to #21218 

This pull request implements a bunch of changes the team requested to
improve the overall user experience when navigating to the Request Logs
page. Since these are mostly UI changes, screenshots do a much better
job of showing what's different than me trying to explain everything in
words, so I've included them below.

> [!WARNING]  
> More globally we've changed how we're rendering `<PaginationHeader
/>`, therefore we've renamed it to `<PaginationAmount />`. This will
effect multiple layouts however its a global improvement we're
intentionally looking to make.

### Preview 


![ai-bridge-improvements](https://github.com/user-attachments/assets/ce92852e-d0fc-4268-b52b-9aefd431033b)

### Changes

1. Date formatting set to a standardised way including the month as a
`MMM` (i.e `Dec`)
2. Names and avatars are now rendered larger, furthermore they render
the `.name` field falling back on `.username`.
3. Font-size increased from `text-xs` to `text-sm` to increase overall
legibility globally.
4. Initiator is now rendered inside of a `<Badge />` and gives longer
names a chance to render.
5. Models are now rendered in a `<Badge />` alongside their icons.
6. Input/Output tokens are in a shared `<Badge />`-group alongside
truncation (when necessary).
7. Badge from `5` is rendered with the proper name being visible on
hover (for use if truncated).
8. Move globally the `Showing X of X` counts to the bottom of the tables
(effects other components outside of AI Bridge).
9. Icons are now included within the dropdown for the `Provider` filter.
10. Truncation of elements is now handled so larger prompts don't cause
the table to require further scrolling.
11. New merged Input/Output `<dt>` element with the badge 

| Position | Pull-request |
| -------- | ------------ |
| ✅ | [fix: improve AI Bridge request logs
UI/UX](#21252) |
| | [feat: add AI Bridge request logs model
filter](#21259) |
| | [chore!: promote AIBridge from
`ExperimentalHandler`](#21278) |
| | [feat: implement request log collapsing prompt (`<RequestLogsPrompt
/>`)](#21313) |

---------

Co-authored-by: ケイラ <mckayla@hey.com>
Base automatically changed from jakehwll/ai-bridge-request-logs-improvements to main December 18, 2025 13:47
@jakehwll jakehwll requested a review from Emyrk as a code owner December 19, 2025 14:05
jakehwll added a commit that referenced this pull request Dec 19, 2025
Closes #21052 and is related to #21218

This pull request implements a bunch of changes the team requested to
improve the overall user experience when navigating to the Request Logs
page. Since these are mostly UI changes, screenshots do a much better
job of showing what's different than me trying to explain everything in
words, so I've included them below.

> [!WARNING]
> More globally we've changed how we're rendering `<PaginationHeader
/>`, therefore we've renamed it to `<PaginationAmount />`. This will
effect multiple layouts however its a global improvement we're
intentionally looking to make.

![ai-bridge-improvements](https://github.com/user-attachments/assets/ce92852e-d0fc-4268-b52b-9aefd431033b)

1. Date formatting set to a standardised way including the month as a
`MMM` (i.e `Dec`)
2. Names and avatars are now rendered larger, furthermore they render
the `.name` field falling back on `.username`.
3. Font-size increased from `text-xs` to `text-sm` to increase overall
legibility globally.
4. Initiator is now rendered inside of a `<Badge />` and gives longer
names a chance to render.
5. Models are now rendered in a `<Badge />` alongside their icons.
6. Input/Output tokens are in a shared `<Badge />`-group alongside
truncation (when necessary).
7. Badge from `5` is rendered with the proper name being visible on
hover (for use if truncated).
8. Move globally the `Showing X of X` counts to the bottom of the tables
(effects other components outside of AI Bridge).
9. Icons are now included within the dropdown for the `Provider` filter.
10. Truncation of elements is now handled so larger prompts don't cause
the table to require further scrolling.
11. New merged Input/Output `<dt>` element with the badge

| Position | Pull-request |
| -------- | ------------ |
| ✅ | [fix: improve AI Bridge request logs
UI/UX](#21252) |
| | [feat: add AI Bridge request logs model
filter](#21259) |
| | [chore!: promote AIBridge from
`ExperimentalHandler`](#21278) |
| | [feat: implement request log collapsing prompt (`<RequestLogsPrompt
/>`)](#21313) |

---------

Co-authored-by: ケイラ <mckayla@hey.com>
@github-actions
Copy link

github-actions bot commented Dec 19, 2025

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@jakehwll jakehwll removed the request for review from Emyrk December 19, 2025 14:06
@jakehwll jakehwll closed this Dec 19, 2025
@jakehwll jakehwll force-pushed the jakehwll/ai-bridge-request-logs-model branch from c177a31 to ca971dd Compare December 19, 2025 14:06
@github-actions github-actions bot locked and limited conversation to collaborators Dec 19, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants