feat: add UnoRouter as a chat completion source - #5837
Open
0-don wants to merge 1 commit into
Open
Conversation
Author
|
Companion docs PR: SillyTavern/SillyTavern-Docs#210 (UnoRouter section on the Chat Completions page, Electron Hub format). |
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.
Checklist:
Summary
Adds UnoRouter as a Chat Completion source. UnoRouter is a fully open-source OpenAI-compatible gateway (github.com/unorouter) serving 200+ models, most with a genuine free tier (
:freesuffix, no card needed) - which makes it a natural fit for SillyTavern users.Follows the shape of the recent MiniMax (#5452) and AI/ML API (#4135) additions, implemented against current staging conventions (generic
settingsToUpdateload/save, generic OpenAI-compatible backend path):src/constants.js+src/endpoints/secrets.js: source + secret keysrc/endpoints/backends/chat-completions.js:/status(dynamic/v1/modelslist) and/generatebranches through the generic OpenAI-compatible path (streaming, tools, json_schema inherited);reasoning_effortpassed throughpublic/scripts/openai.js: settings binding, dynamic model dropdown (aggregator-style, no hardcoded catalog; defaultdeepseek-v4-flash:free), reasoning effort +reasoning_contentstreaming extraction, max-context via the unlocked/128k aggregator patternpublic/index.html: source option + API key form (key link: https://unorouter.com/token) + added to thedata-sourcefeature blocks matching CometAPI capabilitiespublic/img/unorouter.svg(own logo,currentColor)Diff: 11 files, +95/-11.
Testing
Real end-to-end against this branch (
node server.js, clean default-user):/v1/models.step-3.7-flash:free, sent a message in the default chat -> streamed assistant reply received.npm run lintclean on all changed files;node --checkpasses on backend files.