Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/config/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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)',
Expand Down
6 changes: 5 additions & 1 deletion tests/unit/services/apis/thin-adapters.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,11 @@ const adapters = [
},
{
name: 'openrouter-api',
apiMode: { groupName: 'openRouterApiModelKeys', itemName: 'openRouter_openai_o3' },
apiMode: { groupName: 'openRouterApiModelKeys', itemName: 'openRouter_fusion_flash' },

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remediation recommended

1. Preserve existing fusion coverage 🐞 Bug ⚙ Maintainability

The OpenRouter thin-adapter fixture replaces the existing openRouter_fusion case with
openRouter_fusion_flash, so the test suite no longer verifies that the already-supported Fusion
model resolves to and sends openrouter/fusion. Both models remain independently registered, making
this a coverage regression rather than a deliberate consolidation.
Agent Prompt
## Issue description
The OpenRouter adapter fixture was changed from `openRouter_fusion` to `openRouter_fusion_flash`, which removes request-path coverage for the existing Fusion model.

## Issue Context
Both model keys remain independently registered in `src/config/index.mjs`, and the model assertion is conditional on each fixture's `expectedModel`. Preserve the original fixture and add a second OpenRouter fixture for Fusion Flash.

## Fix Focus Areas
- tests/unit/services/apis/thin-adapters.test.mjs[70-75]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

providerId: 'openrouter',
expectedBaseUrl: 'https://openrouter.ai/api/v1',
expectedApiKey: 'or-key',
expectedModel: 'openrouter/fusion-flash',
},
{
name: 'chatglm-api',
Expand Down Expand Up @@ -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) => {
Expand Down