Skip to content

Conversation

@jakehwll
Copy link
Contributor

@jakehwll jakehwll commented Dec 13, 2025

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

@codex

@jakehwll jakehwll marked this pull request as ready for review December 15, 2025 05:29
WHEN @model::text != '' THEN aibridge_interceptions.model ILIKE '%' || @model::text || '%'
ELSE true
END
-- Authorize Filter clause will be injected below in ListAIBridgeModelsAuthorized
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not really sure why this needs to be authorized. There's nothing sensitive about listing which models have been intercepted. What was your reasoning here?

Copy link
Contributor Author

@jakehwll jakehwll Dec 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We scope down the interceptions to only render for a specific user at the moment (if they lack a larger permission set), I don't want to show a user models for an interception that they can't see.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gotcha 👍 good thinking. Please add a comment to this effect.

}

values, errors := searchTerms(query, func(term string, values url.Values) error {
// Default to the model
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment needs some more clarity.


getAIBridgeModels = async (options: SearchParamOptions) => {
const url = getURLWithSearchParams(
"/api/experimental/aibridge/models",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be v2 now not experimental. Same applies for the other methods; can you please update? Better yet, define a const for the URL base for all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants