Repository navigation
Conversation
A TrustedRouter row on Connect your AI and in Settings, between Unbiased AI and the custom endpoint. TrustedRouter is an OpenAI-compatible gateway in front of many providers and has no sign-in, so the row offers only the API key tab: OpenBot fills in https://api.trustedrouter.com/v1 and the model anthropic/claude-sonnet-5.5, and the person pastes a key. The key travels as a compatible-endpoint key, exactly as a typed Unbiased AI key does, so nothing after the screen changes. The model list reads the gateway's public /models, which the catalogue already does for any compatible endpoint. The row follows the Unbiased AI endpoint path file for file: the catalogue and its tests, the endpoint preset and key link in both apps, the host that names the connection for the server and for Settings, the AiConnectionProvider enum (client regenerated with bun run api:generate), the model check's list of gateways it leaves open, the vendored mark from TrustedRouter's media kit, and the changelog.
jperla
requested review from
MikeRyanDev,
davidmckayv,
dustywusty,
guidovizoso,
mxmzb,
samjulien and
tylerslaton
as code owners
November 19, 2026 22:24
# Conflicts: # CHANGELOG.md
…ed app Adding trustedrouter to AiConnectionProvider put a value in GET and PUT /ai-connection answers that a client built against 1.1.1 has never seen, and oasdiff failed it. The answers now use AiConnectionProviderAnswer, an x-extensible-enum copy with the same values (api/README.md, Enums that grow), as PersonRoleAnswer is for PersonRole. A request still names one of the closed AiConnectionProvider list, so a switch to a provider the server doesn't take is still refused with 400. The four changes oasdiff reports are listed in accepted-breaking-changes.md. The app shows a provider it has no row for by its id, and passes it to Desktop as it came. The new spec test parses an answer naming an unknown provider and refuses a switch to one.
This branch has not been deployed
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.
What this changes
Adds TrustedRouter as a named row on OpenBot Desktop's Connect your AI screen and in Settings where the AI connection is changed, between Unbiased AI and "Any OpenAI-compatible endpoint".
TrustedRouter is an OpenAI-compatible gateway in front of many providers. It has no OAuth sign-in, so the row offers only the API key tab (
logins: ["endpoint"]), like the key half of the xAI and Unbiased AI rows. The person pastes a key; OpenBot fills in the rest:https://api.trustedrouter.com/v1anthropic/claude-sonnet-5.5https://trustedrouter.com/console/api-keysFrom there the key travels exactly as a typed Unbiased AI key does: as a compatible-endpoint credential. Nothing after the screen changes. The model list reads the gateway's public
GET /v1/models, which the catalogue already does for any compatible endpoint (the "Any otherOPENAI_BASE_URL" row in docs/configuration.md).This follows the Unbiased AI row's endpoint path file for file, and leaves out its sign-in (no
provider_oauth.rsor PROVIDER_OAUTH.md changes):desktop/src-tauri/src/provider.rs: the catalogue row, plus the endpoint-row and row-order tests. A small test says the row asks only for a key.desktop/src/ProviderPicker.tsxandapp/src/lib/ai-connection/providers.ts: the endpoint preset and key link in both apps, and the Settings row.ai-connection-providers.test.tskeeps the two in step.desktop/src-tauri/src/ai_connection.rsandapp/src/lib/desktop/ai-connection.ts:api.trustedrouter.comnames the connectiontrustedrouterfor the server, and "TrustedRouter" in Settings.trustedrouter/endpointmaps to the compatible-endpoint intent, andtrustedrouter/oauthmaps to nothing. Both are tested.api/openapi/model-connections.yaml:trustedrouterinAiConnectionProviderand in the two descriptions that list which provider takes which way in.api/openapi.yamland the generated client come frombun run api:generateand are not edited by hand.scripts/model-compat.ts(NOT_CHECKED) anddocs/releasing.md: the model check leaves TrustedRouter open, as it does Unbiased AI, because a gateway is not a provider's own listing.shared/marks/trustedrouter.svgand its README line: TrustedRouter's own monochrome mark from its public media kit (https://trustedrouter.com/static/media-kit/trustedrouter-mono.svg). Verbatim apart from a<title>and1emsizing, and already drawn incurrentColorin a 24-unit box like the lobehub marks.ProviderPicker.test.tsx,setupLayout.browser.test.ts,ai-connection-dialog.test.tsx) andCHANGELOG.md.Why
anthropic/claude-sonnet-5.5. The endpoint form needs a model name, and every preset names one (gemini-3.8-flash,grok-4.7,pareto). In the spirit of "the middle of the provider's current line" (Claude Sonnet among the examples), this is the newest Sonnet in TrustedRouter's live/v1/models, and it liststoolsinsupported_parameters. It also runs over Chat Completions, so the default doesn't depend on the Responses API. It stays editable, and once connected the model picker lists everything the gateway serves. I left out the router aliastrustedrouter/autoso the default is one explicit model.Responses API. TrustedRouter's docs (https://trustedrouter.com/docs) list
POST /v1/responsesbeside/v1/chat/completionson the inference host. So a person who picksopenai/gpt-5.6-*or later, which OpenBot's built-in Bots call through/responses, should be served. I have not run a Bot against it from this branch. The default above does not depend on it either way.One thing outside this repository. Settings saves the connection through
PUT /api/v2/organizations/{organizationId}/ai-connection, and the server that answers it is not in this repo. If that server keeps its own list of providers, it needstrustedrouteradded there the wayunbiasedis. Desktop's setup window doesn't depend on it, because it sends a named endpoint asopenai-compatible.Where it runs
/modelsis read by the existing model-list refresh (start-up, then every six hours), as for any compatible endpoint.Boundary and audit
Changelog
CHANGELOG.mdunderUnreleased, in OpenBot Desktop.Proof
Run on macOS (arm64) with
HTTP_PROXY=http://127.0.0.1:9 HTTPS_PROXY=http://127.0.0.1:9 NO_PROXY=127.0.0.1,localhostset, so nothing reached the network. The test runs below used Bun 1.4.3 (the repo'spackageManager) and passed under Bun 1.3.14 too, except where a single version is named. Biome andtsccome from the lockfile.bun run api:generate(Bun 1.3.14): the generated diff is only the new enum value and the three descriptions inapi/openapi.yaml,aiConnectionProvider.ts,aiConnectionInput.ts,aiConnectionLogin.tsandmodels.zod.ts.bun run api:lintis valid, and a secondbun run api:bundleleaves the tree clean.bunx biome lint --error-on-warnings <touched files>andbunx biome format <touched files>: no fixes.cd app && bunx tsc --noEmitandcd desktop && bunx tsc --noEmit: exit 0.bun test app/tests/ai-connection-providers.test.ts app/tests/settings-ai-connection-desktop.test.tsx app/tests/harness-mark.test.tsx app/tests/admin-providers.test.tsx scripts/model-compat.test.ts scripts/model-lock.test.ts api/openapi-ai-connection.test.ts shared/marks.test.ts shared/harnesses.test.ts shared/model-providers.test.ts tests/no-intelligence-in-user-copy.test.ts tests/plain-setup-words.test.ts tests/no-reload-the-page-in-user-copy.test.ts tests/no-composio-in-user-copy.test.ts: 117 pass, 0 fail.cd desktop && bun test src/ProviderPicker.test.tsx: 60 pass, 0 fail, including the TrustedRouter cases from the preset loop shared with Google, xAI and Unbiased AI. The key link opens externally without sending the typed key, and the preset fills the official address and an editable model.cd desktop && bun test src/(bun 1.3.14): 499 pass, 68 skip (the opt-in browser file), 0 fail.cd desktop && OPENBOT_APP_BROWSER=1 bun test src/setupLayout.browser.test.ts(bun 1.3.14, real Chromium, seven rows on Connect your AI): 67 pass, 1 fail. The failure is "with scrollbars that take room, as Windows draws them > at 1000x800, the background row holds still…" (listing.scrollbarfalse), and it fails the same way on a clean checkout ofmainon this Mac.cd desktop/src-tauri && cargo fmt --check: clean.cargo test --lib -- provider:: ai_connection::: 18 passed, 2 ignored (need Docker), includingtrustedrouter_asks_only_for_a_key,six_named_providers_and_one_custom_endpoint,each_way_in_the_setup_window_offers_is_one_connectionandthe_server_is_told_the_connection_and_never_its_key.cargo clippy --all-targets -- -D warningswith local Rust 1.94.1 stops on twononminimal_boollints insrc/stack.rs, which this change doesn't touch. With that one lint allowed (-A clippy::nonminimal_bool) it finishes clean, so nothing in the touched files trips clippy.OPENBOT_APP_BROWSER=1 bun test app/tests/ai-connection-dialog.test.tsx(Bun 1.4.3; under 1.3.14 its fixture does not bundle) could not reach the provider-list assertion locally. It stops earlier, at line 421 (the Change button's click is intercepted by an inert overlay), and does so identically on cleanmainhere. CI's browser job is the real check for that one line.GET https://api.trustedrouter.com/v1/models(public, no key) listsanthropic/claude-sonnet-5.5withtoolsinsupported_parameters.https://trustedrouter.com/console/api-keysanswers a signed-out visitor with a 302 to sign in. No completion endpoint was called.Disclosure: I work on TrustedRouter.