Repository navigation
feat: allow specifying presets for openrouter provider by id - #243
Merged
Merged
Conversation
antonbabenko
enabled auto-merge (squash)
October 11, 2026 17:00
antonbabenko
disabled auto-merge
October 11, 2026 17:02
Contributor
|
This PR is included in v3.30.0 🎉 Claude Code If the update still shows the old version, the marketplace re-pin is a few minutes behind; run it again shortly. Codex, Kiro, Cursor, OpenCode plugins: update deliberation from your host's plugin manager. MCP server (any host): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Allows specifying OpenRouter presets by ID/slug (e.g.
cheapest-firstor@preset/cheapest-first) for the OpenRouter provider across configuration and tool calls:providers.openrouter.presetorproviders.openrouter.defaults.presetmodels.<id>.preset(supports specifyingpresetalone, or combined with an explicitmodel)presetargument onask-openrouter,ask-one, andconsensusMotivation & Benefits
"sort": { "by": "price" }) with automatic failover ("allow_fallbacks": true), dramatically reducing inference costs without manual endpoint tracking."data_collection": "deny".Pre-PR Cross-Model Consensus Review
A consensus code review was run across Gemini (arbiter), Grok 4.7, and OpenRouter GLM-5.3-flash with the
code-reviewerpersona:defaultModel: Fixed incore/registry.jsandcore/providers/openai-compatible.jsso preset-only models pass empty string models and do not inheritdefaultModel.allowRawModel: false: Fixed inserver/openrouter/index.jsresolveDelegateby checking against configured presets.server/openrouter/config.js: Reverted unmotivatedmakeConfigReaderchanges and export expansions back to master baseline.config.default.json: Addedcheapest-presettoconfig/config.default.json.README.md,SETUP.md,TECHNICAL.md, anddocs/tool-guide.md, followed bynpm run sync.Verification
npm run sync:checkpassesnpm run test:contractspasses (19/19)npm run typecheckpasses (0 errors)npm testpasses (1192/1192)