feat(site): infer model family icon from model name in AI Bridge logs#22022
feat(site): infer model family icon from model name in AI Bridge logs#22022ssncferreira merged 1 commit intomainfrom
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
ee0b77d to
902fb19
Compare
902fb19 to
29697ea
Compare
| // See official model naming docs: | ||
| // - Anthropic: https://docs.anthropic.com/en/docs/about-claude/models/all-models | ||
| // - OpenAI: https://platform.openai.com/docs/models | ||
| function inferModelFamily(model: string): string { |
There was a problem hiding this comment.
We should probably move this logic to the backend and infer and store the model family in the database. The model family is currently inferred from the model name using substring matching, which is not the best approach as new models are introduced. For OpenAI and Anthropic providers, the model family is always known since each provider only serves its own models. For Copilot (and other future providers), it is trickier, since it forwards to different providers, so we would still need some form of model family inference similar to what we do here.
dannykopping
left a comment
There was a problem hiding this comment.
LGTM as an interim measure; longer-term we should move this to the backend.
Thanks for the initiative here
Merge activity
|

Problem
Previously, the AI Bridge model column icon was derived from the provider field. This worked because each provider only served its own models: OpenAI interceptions always used OpenAI models, and Anthropic interceptions always used Anthropic models.
With the introduction of the Copilot provider, this assumption no longer holds. Copilot can forward requests to both OpenAI and Anthropic models, so the provider field alone is not enough to determine the correct model icon. This caused Copilot interceptions to display a fallback question mark icon for the model.
Changes
AIBridgeModelIconcomponent that infers the model family (Claude, OpenAI) from the model name string and renders the appropriate icon.RequestLogsRowto useAIBridgeModelIconinstead ofAIBridgeProviderIconin both the table row and the expanded detail view.