Skip to content

feat(site): infer model family icon from model name in AI Bridge logs#22022

Merged
ssncferreira merged 1 commit intomainfrom
ssncf/site-aibridge-model-icon
Feb 11, 2026
Merged

feat(site): infer model family icon from model name in AI Bridge logs#22022
ssncferreira merged 1 commit intomainfrom
ssncf/site-aibridge-model-icon

Conversation

@ssncferreira
Copy link
Contributor

@ssncferreira ssncferreira commented Feb 10, 2026

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.

Screenshot 2026-02-10 at 09 10 34

Changes

  • Added AIBridgeModelIcon component that infers the model family (Claude, OpenAI) from the model name string and renders the appropriate icon.
  • Updated RequestLogsRow to use AIBridgeModelIcon instead of AIBridgeProviderIcon in both the table row and the expanded detail view.

Copy link
Contributor Author

ssncferreira commented Feb 10, 2026

@ssncferreira ssncferreira force-pushed the ssncf/site-aibridge-model-icon branch from 902fb19 to 29697ea Compare February 10, 2026 08:49
// 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 {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Created issue: coder/aibridge#183

@ssncferreira ssncferreira marked this pull request as ready for review February 10, 2026 09:34
Copy link
Contributor

@dannykopping dannykopping left a comment

Choose a reason for hiding this comment

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

LGTM as an interim measure; longer-term we should move this to the backend.

Thanks for the initiative here

Copy link
Contributor Author

ssncferreira commented Feb 11, 2026

Merge activity

  • Feb 11, 2:31 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Feb 11, 2:32 PM UTC: @ssncferreira merged this pull request with Graphite.

@ssncferreira ssncferreira merged commit 8e9638c into main Feb 11, 2026
36 checks passed
@ssncferreira ssncferreira deleted the ssncf/site-aibridge-model-icon branch February 11, 2026 14:32
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.

2 participants