add provider name before indicate model #2957
Replies: 3 comments 6 replies
-
SummaryCurrently, only the model name is shown across the app (selector, status bar, chat header, etc.). Proposed solution (simple & robust)Instead of refactoring every display component, we can save the provider info when a model is selected — and reuse it everywhere. At model selection time, store this structure in the app state: {
providerTop: 'anthropic' | 'openai' | 'kilocode' | 'local' | ...,
via?: 'openrouter' | 'ollama' | 'lmstudio' | ...,
modelId: 'claude-3-7-sonnet',
displayName?: 'Claude 3.7 Sonnet'
} Then, use a shared label formatter: formatModelLabel(sel) ➜
"Kilo Code → OpenRouter → GLM 4.6 Turbo"
"Anthropic → Claude 3.7 Sonnet"
"Local → Ollama → llama3.1:8b" Why this approach?
Affected areas
Implementation sketch
Expected result
Optional future improvements
💡 Example screenshots (to add later)Add screenshots showing the label in:
✅ Summary: map → save → reuseThe simplest and fastest way to show 1️⃣ Map (infer the provider chain)Create a small utility that figures out which provider(s) are involved when a model is selected. // inferProviderChainFromContext.ts
export function inferProviderChain(ctx: any) {
if (ctx.runtime === 'local')
return { providerTop: 'local', via: ctx.provider }; // ollama / lmstudio
if (/openrouter/i.test(ctx.baseUrl || ''))
return { providerTop: 'kilocode', via: 'openrouter' };
if (/litelmm|lite-?llm/i.test(ctx.baseUrl || ''))
return { providerTop: 'kilocode', via: 'litelmm' };
// direct vendor (Anthropic, OpenAI, etc.)
return { providerTop: ctx.provider || 'kilocode' };
} 2️⃣ Save (when the user selects a model)Store the provider info together with the model in your app state. // modelSelectionStore.ts (Redux or Zustand)
type ActiveModel = {
providerTop: string;
via?: string;
modelId: string;
displayName?: string;
};
// Example handler
function onModelSelected({
modelId,
displayName,
context,
}: {
modelId: string;
displayName?: string;
context: any;
}) {
const { providerTop, via } = inferProviderChain(context);
setActiveModel({ providerTop, via, modelId, displayName });
} Now you have a single source of truth ( 3️⃣ Reuse everywhere (with one formatter)Create one display function for a consistent label across the whole UI. // formatModelLabel.ts
const PRETTY: Record<string, string> = {
kilocode: 'Kilo Code',
openai: 'OpenAI',
anthropic: 'Anthropic',
google: 'Google',
openrouter: 'OpenRouter',
litelmm: 'LiteLLM',
local: 'Local',
ollama: 'Ollama',
lmstudio: 'LM Studio',
};
export function formatModelLabel(sel?: ActiveModel) {
if (!sel) return '(no model selected)';
const top = PRETTY[sel.providerTop] ?? sel.providerTop;
const via = sel.via ? PRETTY[sel.via] ?? sel.via : '';
const model = sel.displayName || sel.modelId || '(unknown model)';
return via ? `${top} → ${via} → ${model}` : `${top} → ${model}`;
} 4️⃣ Hook it up (UI integration)Use
That ensures a single unified label, e.g.:
5️⃣ Quick tests
🧩 TL;DR
✅ Simple |
Beta Was this translation helpful? Give feedback.
-
I'm curious where you think this would be shown/needed? Reviewing the UI, I only see 2 places where the model slug (glm-4.6 or similar) is shown:
In all other locations, we show the user supplied name for the profile, which I think is optimal - if the user chooses to name something, we should respect that. So I think to address the user experience you mention, I'd recommend naming your profiles in a way that makes sense to you. If you have GLM from multiple sources, you could use my naming schemes: GLM 4.6 > Synthetic That way, you always know what you are using and will show up in the UI pretty much everywhere. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
like here. ok it's GLM 4.6, but from what provider? kilocode? openrouter? chutes? someone else? it's change for pricing etc.
need be indicate : Chutes.ai > Z.ai > KLM 4.6 Turbo something like that.
Beta Was this translation helpful? Give feedback.
All reactions