Repository navigation
Conversation
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
Adds TrustedRouter as a hosted chat preset in the provider picker, plus its endpoint defaults and locale blurbs, wired the same way as the DemonRoute preset (#545).
Closes #581.
Changes
src/common/constants/providers.ts: registerstrustedrouterinOPEN_AI_COMPATIBLE_PROVIDERSand its display name.src/common/provider-validation.ts: chat endpoint defaultsapi.trustedrouter.com,https,/v1(chat only, no FIM or embeddings, as in Add DemonRoute hosted preset (chat) #545).src/webview/providers/presets.tsx: hosted preset using the existingcodicon("plug")glyph, placed after DemonRoute in the hosted group.src/webview/assets/locales/:preset-trustedrouterblurb added to all 14 locale files, translated.No version bump or CHANGELOG entry, since those were done at release time for #545; happy to add them if you prefer.
Usage
Pick TrustedRouter under hosted providers and paste an API key from https://trustedrouter.com/console/api-keys. The default model is
deepseek/deepseek-v4-flash; any id fromGET https://api.trustedrouter.com/v1/models(public, no key) can be used instead, e.g.anthropic/claude-sonnet-4.5, ortrustedrouter/autoto let the gateway pick per request. Docs: https://trustedrouter.com/docs.Verification
Run with
HTTP_PROXY=http://127.0.0.1:9 HTTPS_PROXY=http://127.0.0.1:9 NO_PROXY=127.0.0.1,localhostafternpm ci:npx tsc -p . --outDir out: exit 0node scripts/build.mjs: exit 0npx eslint src: exit 0npx mocha --ui tdd out/test/suite/provider-validation.test.js: 29 passingnpx mocha --ui tdd out/test/suite/provider-discovery.test.js: 13 passingnode -e 'const v=require("./out/common/provider-validation.js"); for (const t of ["chat","fim","embedding"]) console.log(t, JSON.stringify(v.getEndpointDefaults("trustedrouter", t)))': chat{"apiHostname":"api.trustedrouter.com","apiProtocol":"https","apiPath":"/v1"}, fim and embeddingundefinedThe full
npm testsuite (VS Code extension host) was not run here because it downloads VS Code.Disclosure: I work on TrustedRouter.