Skip to content

fix: show configured provider icons and names in AI settings - #31033

Draft
tracyjohnsonux wants to merge 1 commit into
mainfrom
tracy/codagt-1421-provider-icon
Draft

tracyjohnsonux wants to merge 1 commit into
mainfrom
tracy/codagt-1421-provider-icon

Conversation

@tracyjohnsonux

Copy link
Copy Markdown
Contributor

Admin-configured provider icons were ignored on the AI Settings Models page (model rows, Add model menu, provider filter, model form header and provider select) and in Agents compaction settings. These views derived the icon only from the provider type, so a provider like DeepSeek on an OpenAI-compatible type showed a generic icon even though the Providers page and chat model selector showed the configured one. They now pass the configured icon to ProviderIcon, which falls back to the type icon.

The Spend page showed provider types (OpenAI) instead of configured providers (DeepSeek) because ListOrganizationAISpendUsers aggregated ai.provider while its filter matched ai.provider_name. It now aggregates provider_name, and the page resolves names to display names and icons from the AI Gateway providers list, which it shares with the provider filter through one query. OrganizationAISpendUser.providers now holds provider names; records from before configured names existed have the type as their name, so they render as before.

AI Gateway Sessions views have the same type-versus-name issue and are left for a separate fix.

Refs CODAGT-1421

Decision log
  • Root cause: callers rendered <ProviderIcon provider={type} /> without the descriptor's icon; nothing was stale.
  • Spend page provider metadata is fetched only for viewers who can already use the provider filter (viewAnyAIBridgeInterception); other viewers see names formatted like provider types.
  • Extended ProvidersBadge with an optional providersByName map instead of adding a Spend-specific badge, so the Sessions fix can reuse it.
  • Removed providerTypeByIDFromUserConfigs, which became unused once compaction settings used providerInfoByIDFromUserConfigs.
  • Visual coverage is in Storybook stories (ModelRow, ModelForm, UserCompactionThresholdSettings, SpendPage) per the repo's FE1 rule.

Generated by Coder Agents on behalf of @tracyjohnsonux.

The Models page, model form, and compaction settings derived provider
icons only from the provider type, so a provider with a configured icon
(for example DeepSeek on an OpenAI-compatible type) showed a generic
icon. They now use the configured icon and fall back to the type icon.

The spend report aggregated provider types instead of configured
provider names, so the Spend page showed OpenAI for DeepSeek. It now
returns provider names, matching its provider_name filter, and the page
resolves them to display names and icons.

Refs CODAGT-1421
@linear-code

linear-code Bot commented Oct 19, 2026

Copy link
Copy Markdown

CODAGT-1421

This branch has not been deployed

No deployments
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.

1 participant