Skip to content

feat: add UnoRouter as a chat completion source - #5837

Open
0-don wants to merge 1 commit into
SillyTavern:stagingfrom
0-don:feat/unorouter-chat-completion-source
Open

feat: add UnoRouter as a chat completion source#5837
0-don wants to merge 1 commit into
SillyTavern:stagingfrom
0-don:feat/unorouter-chat-completion-source

Conversation

@0-don

@0-don 0-don commented Jul 9, 2026

Copy link
Copy Markdown

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 (:free suffix, 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 settingsToUpdate load/save, generic OpenAI-compatible backend path):

  • src/constants.js + src/endpoints/secrets.js: source + secret key
  • src/endpoints/backends/chat-completions.js: /status (dynamic /v1/models list) and /generate branches through the generic OpenAI-compatible path (streaming, tools, json_schema inherited); reasoning_effort passed through
  • public/scripts/openai.js: settings binding, dynamic model dropdown (aggregator-style, no hardcoded catalog; default deepseek-v4-flash:free), reasoning effort + reasoning_content streaming extraction, max-context via the unlocked/128k aggregator pattern
  • public/index.html: source option + API key form (key link: https://unorouter.com/token) + added to the data-source feature blocks matching CometAPI capabilities
  • Icon public/img/unorouter.svg (own logo, currentColor)
  • Kept lean: no tokenizer entry (aggregator default estimation), no SD/caption extension wiring, no endpoint selector (fixed URL)

Diff: 11 files, +95/-11.

Testing

Real end-to-end against this branch (node server.js, clean default-user):

  1. API Connections -> Chat Completion -> UnoRouter, pasted key, Connect -> status "Valid", model dropdown populated with 335 models fetched live from /v1/models.
  2. Selected step-3.7-flash:free, sent a message in the default chat -> streamed assistant reply received.
  3. npm run lint clean on all changed files; node --check passes on backend files.

@0-don

0-don commented Jul 9, 2026

Copy link
Copy Markdown
Author

Companion docs PR: SillyTavern/SillyTavern-Docs#210 (UnoRouter section on the Chat Completions page, Electron Hub format).

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant