Skip to content

Add OpenRouter Fusion Flash model support - #1059

Open
PeterDaveHello wants to merge 1 commit into
ChatGPTBox-dev:masterfrom
PeterDaveHello:addOpenRouterFusionFlash
Open

Add OpenRouter Fusion Flash model support#1059
PeterDaveHello wants to merge 1 commit into
ChatGPTBox-dev:masterfrom
PeterDaveHello:addOpenRouterFusionFlash

Conversation

@PeterDaveHello

@PeterDaveHello PeterDaveHello commented Aug 29, 2026

Copy link
Copy Markdown
Member

Summary

  • Add openrouter/fusion-flash to the OpenRouter API model picker.
  • Verify the exact model ID reaches the OpenRouter Chat Completions request body.

Validation

  • npm test
  • npm run lint
  • npm run build
  • Manual browser smoke test not run: no Chromium or Firefox executable is available in this environment.

Summary by CodeRabbit

  • New Features

    • Added support for selecting the OpenRouter Fusion Flash model.
  • Tests

    • Updated OpenRouter coverage to validate Fusion Flash model requests.
    • Added verification that configured model identifiers are included in request payloads.

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
Copilot AI lite review requested due to automatic review settings August 29, 2026 18:29
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for security reviews. Please try again later.

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Your trial has ended. Reactivate Greptile to resume code reviews.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Aug 29, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-08-29T18:31:40.689521Z e5afeb9 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@qodo-code-review

Copy link
Copy Markdown
Contributor

PR Summary by Qodo

Add OpenRouter Fusion Flash model support

✨ Enhancement 🧪 Tests 🕐 Less than 10 minutes

Grey Divider

AI Description

• Add Fusion Flash to the selectable OpenRouter model catalog.
• Verify requests preserve the documented openrouter/fusion-flash model identifier.
Diagram

graph TD
  Picker["Model Picker"] --> Catalog["Model Catalog"] --> Adapter["OpenRouter Adapter"] --> Request["Chat Request"]
  Request --> API["OpenRouter API"]
Loading
High-Level Assessment

The current approach is optimal: register the model in the existing catalog and reuse the established OpenRouter-compatible adapter. A dedicated adapter would duplicate behavior without providing a meaningful benefit.

Files changed (2) +10 / -1

Enhancement (1) +5 / -0
index.mjsRegister OpenRouter Fusion Flash model +5/-0

Register OpenRouter Fusion Flash model

• Adds Fusion Flash to the OpenRouter model key list and maps it to 'openrouter/fusion-flash' with a user-facing label.

src/config/index.mjs

Tests (1) +5 / -1
thin-adapters.test.mjsVerify Fusion Flash request model propagation +5/-1

Verify Fusion Flash request model propagation

• Uses Fusion Flash in the OpenRouter adapter fixture and conditionally checks that the exact model identifier reaches the chat completions request body.

tests/unit/services/apis/thin-adapters.test.mjs

@coderabbitai

coderabbitai Bot commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 69123a0a-e3c4-4e09-97c6-67c6313db2d6

📥 Commits

Reviewing files that changed from the base of the PR and between 890873e and e5afeb9.

📒 Files selected for processing (2)
  • src/config/index.mjs
  • tests/unit/services/apis/thin-adapters.test.mjs

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

The OpenRouter configuration now registers the openRouter_fusion_flash model. Thin-adapter tests use this model and verify that configured adapters send the expected model identifier.

Changes

OpenRouter Fusion Flash support

Layer / File(s) Summary
Register Fusion Flash model
src/config/index.mjs
The OpenRouter model key list includes openRouter_fusion_flash. Its metadata uses openrouter/fusion-flash and the description OpenRouter (Fusion Flash).
Validate adapter model requests
tests/unit/services/apis/thin-adapters.test.mjs
The OpenRouter fixture uses Fusion Flash. The shared adapter test verifies the request body model when an expected model is configured.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to e5afe

This change adds one selectable OpenRouter model and verifies that its exact identifier is sent through the existing request path. No actionable merge-blocking risk remains after normal checks and review.

Suggested reviewers: josstorer

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: adding OpenRouter Fusion Flash model support.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2 files.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@qodo-code-review

Copy link
Copy Markdown
Contributor

Code Review by Qodo

🐞 Bugs (1) 📘 Rule violations (0) 📜 Skill insights (0)

Grey Divider


Remediation recommended

1. Preserve existing Fusion coverage 🐞 Bug ⚙ Maintainability
Description
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.
Code

tests/unit/services/apis/thin-adapters.test.mjs[71]

+    apiMode: { groupName: 'openRouterApiModelKeys', itemName: 'openRouter_fusion_flash' },
Evidence
The configuration retains two distinct OpenRouter model keys and values, while the changed test
array contains only the Flash key and expected ID. The new assertion validates only the model
selected by each fixture, so it cannot preserve coverage for the removed Fusion fixture.

src/config/index.mjs[154-155]
src/config/index.mjs[516-523]
tests/unit/services/apis/thin-adapters.test.mjs[70-75]
tests/unit/services/apis/thin-adapters.test.mjs[117-121]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## 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


Grey Divider

Context sources
✅ Compliance rules (platform): 6 rules
Review mode: 🚀 Fast: This is a small, localized model-picker addition with a focused request-body test and no security, schema, or broad behavioral risk.

Grey Divider

Tip of the day
💡 Did you know, you can group findings by type and pick your Finding display, from Minimal to Full

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

{
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

Copilot AI left a comment

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.

Pull request overview

Adds support for the openrouter/fusion-flash model in the OpenRouter API model picker and strengthens unit coverage to ensure the selected OpenRouter model ID is propagated into the /chat/completions request body.

Changes:

  • Added openRouter_fusion_flash to the openRouterApiModelKeys list and defined its Models entry as openrouter/fusion-flash.
  • Updated the OpenRouter thin-adapter unit test to select the new model and assert the outgoing request body includes the expected model value.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
tests/unit/services/apis/thin-adapters.test.mjs Updates the OpenRouter adapter test case to use Fusion Flash and asserts the serialized request body contains the expected model ID.
src/config/index.mjs Registers the new OpenRouter model key and maps it to the openrouter/fusion-flash model value for the picker/config system.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ No new issues found.

Reviewed changes

  • src/config/index.mjs: registered openRouter_fusion_flash in openRouterApiModelKeys and added its Models entry mapping to openrouter/fusion-flash — one row after the existing openRouter_fusion, matching the established naming and ordering conventions.
  • tests/unit/services/apis/thin-adapters.test.mjs: switched the openrouter-api thin-adapter fixture to openRouter_fusion_flash and added an expectedModel assertion that verifies the exact model ID reaches the /chat/completions request body; the assertion runs only when a fixture declares an expectation, so non-OpenRouter adapters are unaffected.

Mechanically sound: adding the key to the group array surfaces the entry in the OpenRouter picker (ModelGroups value + apiModes derived from Models), the config plumbing resolves openRouter_fusion_flash → openrouter/fusion-flash unchanged, and the new assertion pins exactly the behavior the PR claims. Full suite passes (1040/1040), and the ID matches OpenRouter's own fusion-router documentation.

Pullfrog  | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants