fix: display model name instead of ID in Telegram model selector (#56165) (#56175)

* fix: display model name instead of ID in Telegram model selector (#56165)

* fix(telegram): scope model display names by provider

Signed-off-by: sallyom <somalley@redhat.com>

---------

Signed-off-by: sallyom <somalley@redhat.com>
Co-authored-by: sallyom <somalley@redhat.com>
This commit is contained in:
Saurabh Mishra
2026-03-28 18:53:09 +05:30
committed by GitHub
parent e999f2aae3
commit 90e82fabb3
13 changed files with 96 additions and 7 deletions

View File

@@ -23,6 +23,7 @@ const data = {
provider: "anthropic",
model: "claude-opus-4-5",
},
modelNames: new Map<string, string>(),
};
describe("Mattermost model picker", () => {
@@ -154,6 +155,7 @@ describe("Mattermost model picker", () => {
provider: "openai",
model: "gpt-5",
},
modelNames: new Map<string, string>(),
};
expect(

View File

@@ -16,7 +16,7 @@ const mockState = vi.hoisted(() => ({
team_id: "team-1",
})),
resolveCommandText: vi.fn((_trigger: string, text: string) => text),
buildModelsProviderData: vi.fn(async () => ({ providers: [] })),
buildModelsProviderData: vi.fn(async () => ({ providers: [], modelNames: new Map() })),
resolveMattermostModelPickerEntry: vi.fn(() => ({ kind: "summary" })),
authorizeMattermostCommandInvocation: vi.fn(() => ({
ok: true,