Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions core/llm/llms/TrustedRouter.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import OpenAI from "./OpenAI.js";

import type { LLMOptions } from "../../index.js";

class TrustedRouter extends OpenAI {
static providerName = "trustedrouter";
static defaultOptions: Partial<LLMOptions> = {
apiBase: "https://api.trustedrouter.com/v1/",
model: "trustedrouter/auto",
useLegacyCompletionsEndpoint: false,
};
}

export default TrustedRouter;
2 changes: 2 additions & 0 deletions core/llm/llms/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ import Ollama from "./Ollama";
import OpenAI from "./OpenAI";
import OpenRouter from "./OpenRouter";
import ClawRouter from "./ClawRouter";
import TrustedRouter from "./TrustedRouter";
import OVHcloud from "./OVHcloud";
import { Relace } from "./Relace";
import Replicate from "./Replicate";
Expand Down Expand Up @@ -111,6 +112,7 @@ export const LLMClasses = [
WatsonX,
OpenRouter,
ClawRouter,
TrustedRouter,
Nvidia,
Vllm,
SambaNova,
Expand Down
60 changes: 20 additions & 40 deletions core/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

49 changes: 49 additions & 0 deletions docs/customize/model-providers/more/trustedrouter.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
title: "How to Configure TrustedRouter with Continue"
sidebarTitle: "TrustedRouter"
---

<Info>
Get an API key from [TrustedRouter](https://trustedrouter.com/console/api-keys)
</Info>

TrustedRouter provides an OpenAI-compatible gateway for privacy-sensitive development tasks. It uses an open-source and verifiable attested router with zero prompt and output logging by default. This is useful for workflows involving private codebases, project context, or customer data while keeping the standard Continue model configuration shape.

<Tabs>
<Tab title="YAML">
```yaml title="config.yaml"
name: My Config
version: 0.0.1
schema: v1

models:
- name: TrustedRouter Auto
provider: trustedrouter
model: trustedrouter/auto
apiKey: <YOUR_TRUSTEDROUTER_API_KEY>
```
</Tab>
<Tab title="JSON (Deprecated)">
```json title="config.json"
{
"models": [
{
"title": "TrustedRouter Auto",
"provider": "trustedrouter",
"model": "trustedrouter/auto",
"apiKey": "<YOUR_TRUSTEDROUTER_API_KEY>"
}
]
}
```
</Tab>
</Tabs>

## Routing aliases

TrustedRouter supports standard model IDs plus routing aliases:

- `trustedrouter/auto` chooses a healthy route automatically.
- `trustedrouter/zdr` prefers zero data retention providers.
- `trustedrouter/e2e` prefers end-to-end encrypted providers where available.

1 change: 1 addition & 0 deletions docs/docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@
"customize/model-providers/more/nvidia",
"customize/model-providers/more/tensorix",
"customize/model-providers/more/together",
"customize/model-providers/more/trustedrouter",
"customize/model-providers/more/xAI",
"customize/model-providers/more/zai"
]
Expand Down
2 changes: 2 additions & 0 deletions extensions/vscode/config_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@
"watsonx",
"openrouter",
"clawrouter",
"trustedrouter",
"sambanova",
"nvidia",
"vllm",
Expand Down Expand Up @@ -270,6 +271,7 @@
"### IBM watsonx\nwatsonx, developed by IBM, offers a variety of pre-trained AI foundation models that can be used for natural language processing (NLP), computer vision, and speech recognition tasks.",
"### OpenRouter\nOpenRouter offers a single API to access almost any language model. To get started, obtain an API key from [their console](https://openrouter.ai/settings/keys).",
"### ClawRouter\nClawRouter is an open-source LLM router that automatically selects the cheapest capable model for each request based on prompt complexity, providing 78-96% cost savings. To get started, run `npx clawrouter` to start the router at localhost:1337. A wallet is auto-generated on first run - fund it with USDC (Solana/Base) to access premium models, or use `blockrun/free` tier without payment.\n> [Reference](https://github.com/BlockRunAI/ClawRouter)",
"### TrustedRouter\nTrustedRouter is an attested OpenAI-compatible router with automatic model selection, zero-data-retention routes, and end-to-end encrypted routes. To get started, obtain an API key from [their console](https://trustedrouter.com/console/api-keys).",
"### SambaNova\n SambaNova provides fast inference of open-source language models with zero data retention. To get started, obtain an API key in [SambaNova Cloud](https://cloud.sambanova.ai/apis?utm_source=continue&utm_medium=external&utm_campaign=cloud_signup ).",
"### NVIDIA NIMs\nNVIDIA offers a single API to access almost any language model. To find out more, visit the [LLM APIs Documentation](https://docs.api.nvidia.com/nim/reference/llm-apis).\nFor information specific to getting a key, please check out the [docs here](https://docs.nvidia.com/nim/large-language-models/latest/getting-started.html#option-1-from-api-catalog)",
"### vLLM\nvLLM is a highly performant way of hosting LLMs for a team. To get started, follow their [quickstart](https://docs.vllm.ai/en/latest/getting_started/quickstart.html) to set up your server.",
Expand Down
Binary file added gui/public/logos/trustedrouter.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
41 changes: 41 additions & 0 deletions gui/src/pages/AddNewModel/configs/providers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,47 @@ export const providers: Partial<Record<string, ProviderInfo>> = {
],
},

trustedrouter: {
title: "TrustedRouter",
provider: "trustedrouter",
description:
"TrustedRouter is an attested OpenAI-compatible router with automatic model selection, ZDR routes, and E2E encrypted routes.",
longDescription: `To get started with TrustedRouter, sign in at [trustedrouter.com](https://trustedrouter.com/) and create an API key in the [console](https://trustedrouter.com/console/api-keys).`,
icon: "trustedrouter.png",
tags: [ModelProviderTags.RequiresApiKey],
apiKeyUrl: "https://trustedrouter.com/console/api-keys",
collectInputFor: [
{
inputType: "text",
key: "apiKey",
label: "API Key",
placeholder: "Enter your TrustedRouter API key",
required: true,
},
...completionParamsInputsConfigs,
],
packages: [
{
title: "Auto",
description: "Routes each request across healthy supported providers",
params: { model: "trustedrouter/auto" },
isOpenSource: false,
},
{
title: "ZDR",
description: "Prefers zero-data-retention routes",
params: { model: "trustedrouter/zdr" },
isOpenSource: false,
},
{
title: "E2E",
description: "Uses end-to-end encrypted routes where available",
params: { model: "trustedrouter/e2e" },
isOpenSource: false,
},
],
},

moonshot: {
title: "Moonshot",
provider: "moonshot",
Expand Down
2 changes: 2 additions & 0 deletions packages/openai-adapters/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,8 @@ export function constructLlmApi(config: LLMConfig): BaseLlmApi | undefined {
return new OpenRouterApi(config);
case "clawrouter":
return new ClawRouterApi(config);
case "trustedrouter":
return openAICompatible("https://api.trustedrouter.com/v1/", config);
case "llama.cpp":
case "llamafile":
return openAICompatible("http://localhost:8000/", config);
Expand Down
1 change: 1 addition & 0 deletions packages/openai-adapters/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ export const OpenAIConfigSchema = BasePlusConfig.extend({
z.literal("msty"),
z.literal("openrouter"),
z.literal("clawrouter"),
z.literal("trustedrouter"),
z.literal("sambanova"),
z.literal("text-gen-webui"),
z.literal("vllm"),
Expand Down
Loading