From 24fc0b0e5fe6950da4b4bc0974e25619f8b2dc67 Mon Sep 17 00:00:00 2001 From: meridah7 <149539994+meridah7@users.noreply.github.com> Date: Tue, 4 Aug 2026 16:21:55 -0700 Subject: [PATCH] fix(ai-chat): infron default model is dropped by the aggregator alias rule (#3506) * fix(ai-chat): use a resolvable default model for the infron provider * test(ai-chat): assert the infron default model is in the served catalog --- .../providers/infron/InfronProvider.test.ts | 15 ++++++++++++--- .../ai-chat/providers/infron/InfronProvider.ts | 2 +- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/backend/drivers/ai-chat/providers/infron/InfronProvider.test.ts b/src/backend/drivers/ai-chat/providers/infron/InfronProvider.test.ts index c8d69bcbd..3358fb3cb 100644 --- a/src/backend/drivers/ai-chat/providers/infron/InfronProvider.test.ts +++ b/src/backend/drivers/ai-chat/providers/infron/InfronProvider.test.ts @@ -100,6 +100,16 @@ const SAMPLE_API_MODELS = [ min_prompt_price: 10, min_completion_price: 30, }, + { + id: 'qwen/qwen3.5-flash', + display_name: 'Qwen: Qwen 3.5 Flash', + category_type: 'LLM', + supported_endpoint_types: ['openai'], + context_length: 1000000, + max_output_tokens: 64000, + min_prompt_price: 0.1, + min_completion_price: 0.4, + }, { id: 'anthropic/claude-haiku-4.5', display_name: 'Anthropic: Claude Haiku 4.5', @@ -221,9 +231,7 @@ describe('InfronProvider construction', () => { describe('InfronProvider model catalog', () => { it('returns the infron-prefixed default model id', () => { const { provider } = makeProvider(); - expect(provider.getDefaultModel()).toBe( - 'infron:deepseek/deepseek-v4-flash', - ); + expect(provider.getDefaultModel()).toBe('infron:qwen/qwen3.5-flash'); }); it('sends the API key as a bearer token on the catalog fetch', async () => { @@ -240,6 +248,7 @@ describe('InfronProvider model catalog', () => { const { provider } = makeProvider(); const ids = await provider.list(); expect(ids).toContain('infron:deepseek/deepseek-v4-flash'); + expect(ids).toContain(provider.getDefaultModel()); expect(ids).toContain('infron:anthropic/claude-haiku-4.5'); expect(ids).not.toContain('infron:black-forest-labs/flux-2.1'); expect(ids).not.toContain('infron:example/display-only-model'); diff --git a/src/backend/drivers/ai-chat/providers/infron/InfronProvider.ts b/src/backend/drivers/ai-chat/providers/infron/InfronProvider.ts index 9b7e4eb3c..b46fa97ec 100644 --- a/src/backend/drivers/ai-chat/providers/infron/InfronProvider.ts +++ b/src/backend/drivers/ai-chat/providers/infron/InfronProvider.ts @@ -80,7 +80,7 @@ export class InfronProvider implements IChatProvider { } getDefaultModel() { - return 'infron:deepseek/deepseek-v4-flash'; + return 'infron:qwen/qwen3.5-flash'; } /**