From e5afeb98d80a059b66562f5bb5e5be391ec182a1 Mon Sep 17 00:00:00 2001 From: Peter Dave Hello Date: Sun, 30 Aug 2026 02:28:27 +0800 Subject: [PATCH] Add OpenRouter Fusion Flash model support Add Fusion Flash to the OpenRouter API model picker and verify that requests send the documented model ID through the existing compatible adapter. Reference: - https://openrouter.ai/docs/guides/routing/routers/fusion-router#fast-preset-model-openrouter/fusion-flash --- src/config/index.mjs | 5 +++++ tests/unit/services/apis/thin-adapters.test.mjs | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/config/index.mjs b/src/config/index.mjs index abd174a67..1b9ad9ebc 100644 --- a/src/config/index.mjs +++ b/src/config/index.mjs @@ -152,6 +152,7 @@ export const openRouterApiModelKeys = [ 'openRouter_openai_o3', 'openRouter_openai_gpt_4_1_mini', 'openRouter_fusion', + 'openRouter_fusion_flash', 'openRouter_openai_gpt_chat_latest', 'openRouter_openai_gpt_5_5', 'openRouter_openai_gpt_5_5_pro', @@ -516,6 +517,10 @@ export const Models = { value: 'openrouter/fusion', desc: 'OpenRouter (Fusion)', }, + openRouter_fusion_flash: { + value: 'openrouter/fusion-flash', + desc: 'OpenRouter (Fusion Flash)', + }, openRouter_openai_gpt_chat_latest: { value: 'openai/gpt-chat-latest', desc: 'OpenRouter (GPT Chat Latest)', diff --git a/tests/unit/services/apis/thin-adapters.test.mjs b/tests/unit/services/apis/thin-adapters.test.mjs index 4a41d2f11..618629207 100644 --- a/tests/unit/services/apis/thin-adapters.test.mjs +++ b/tests/unit/services/apis/thin-adapters.test.mjs @@ -68,10 +68,11 @@ const adapters = [ }, { name: 'openrouter-api', - apiMode: { groupName: 'openRouterApiModelKeys', itemName: 'openRouter_openai_o3' }, + apiMode: { groupName: 'openRouterApiModelKeys', itemName: 'openRouter_fusion_flash' }, providerId: 'openrouter', expectedBaseUrl: 'https://openrouter.ai/api/v1', expectedApiKey: 'or-key', + expectedModel: 'openrouter/fusion-flash', }, { name: 'chatglm-api', @@ -116,6 +117,9 @@ for (const adapter of adapters) { assert.equal(capturedInput, `${adapter.expectedBaseUrl}/chat/completions`) // Verify API key reaches the Authorization header assert.equal(capturedInit.headers.Authorization, `Bearer ${adapter.expectedApiKey}`) + if (adapter.expectedModel) { + assert.equal(JSON.parse(capturedInit.body).model, adapter.expectedModel) + } }) test(`${adapter.name}: delegates to compat layer and produces output`, async (t) => {