Repository navigation
fix: show configured provider icons and names in AI settings - #31033
Draft
tracyjohnsonux wants to merge 1 commit into
Draft
tracyjohnsonux wants to merge 1 commit into
tracyjohnsonux wants to merge 1 commit into
Conversation
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
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
ListOrganizationAISpendUsersaggregatedai.providerwhile its filter matchedai.provider_name. It now aggregatesprovider_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.providersnow 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
<ProviderIcon provider={type} />without the descriptor'sicon; nothing was stale.viewAnyAIBridgeInterception); other viewers see names formatted like provider types.ProvidersBadgewith an optionalprovidersByNamemap instead of adding a Spend-specific badge, so the Sessions fix can reuse it.providerTypeByIDFromUserConfigs, which became unused once compaction settings usedproviderInfoByIDFromUserConfigs.Generated by Coder Agents on behalf of @tracyjohnsonux.