Skip to content

Conversation

@gary149
Copy link
Collaborator

@gary149 gary149 commented Jan 30, 2026

Summary

  • Add ability to select inference provider per model in settings (HuggingChat only)
  • Options include Auto (HF preference order), Fastest, Cheapest, or a specific provider
  • Uses bits-ui Select component to display provider icons in dropdown
  • Shows provider indicator with icons in the model settings nav list

Changes

  • New provider selection dropdown in model settings page
  • Added IconFast and IconCheap icons for selection modes
  • Provider override is passed through to the inference endpoint
  • Settings persisted via providerOverrides in user settings

Test plan

  • Open settings for a non-router model with multiple providers
  • Verify dropdown shows selection modes (Auto, Fastest, Cheapest) with icons
  • Verify dropdown shows specific providers with avatars
  • Select a provider and verify it persists
  • Verify selected provider icon shows in the model nav list
  • Verify feature only appears on HuggingChat (not self-hosted)

Allow users to select their preferred inference provider per model with
options including:
- Auto (respects user's HuggingFace preference order)
- Fastest (highest throughput provider)
- Cheapest (lowest cost per output token)
- Specific providers (together, sambanova, etc.)

The provider preference is appended to the model ID when making inference
requests (e.g., "model:fastest") following HuggingFace's documented API.
Router models (Omni) are excluded from this feature as they handle their
own intelligent routing.

Changes:
- Add providerOverrides setting (Record<string, string>) to user settings
- Add provider dropdown UI on model settings page (hidden for router models)
- Pass provider preference through text generation pipeline
- Support provider suffix in both regular endpoint and MCP tool flow

https://claude.ai/code/session_016q6bhcJrusLKVMLq6x739B
- Add isHuggingChat check to UI dropdown visibility
- Add isHuggingChat check to server-side provider usage

https://claude.ai/code/session_016q6bhcJrusLKVMLq6x739B
- Use optgroups to separate selection modes (Auto/Fastest/Cheapest)
  from specific providers
- Remove redundant "Available:" badges below the dropdown
- Remove unused PROVIDERS_HUB_ORGS import
The providerOverrides field was missing from:
- GET /user/settings response
- POST /user/settings validation schema
- POST /settings validation schema

This prevented the provider selection from being persisted to the database.
Display a small badge next to the model name when a provider override
is set:
- ⚡ for "fastest"
- 💰 for "cheapest"
- Provider name for specific providers

Hidden for router models and when set to "auto".
- Add IconCheap and IconFast from moon-landing
- Use green theme for fastest, blue for cheapest
- Show provider avatar for specific providers
- Only display icons, no text
- Add provider indicator badge in the model navigation sidebar
- Shows fastest (green), cheapest (blue), or provider avatar icons
- Minor styling tweaks to provider select and chat window icon
Replace native select element with bits-ui Select component to display
provider icons in the dropdown options. Includes styled icon containers
for auto (magic wand), fastest (bolt), cheapest (coin), and provider
avatars matching the model nav list styling.
@gary149 gary149 closed this Jan 30, 2026
@gary149 gary149 deleted the claude/add-provider-selection-pDz9O branch January 30, 2026 17:18
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