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
3 changes: 3 additions & 0 deletions core/llm/autodetect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ const PROVIDER_HANDLES_TEMPLATING: string[] = [
"nous",
"zAI",
"tensorix",
"api-route",
// TODO add these, change to inverted logic so only the ones that need templating are hardcoded
// Asksage.ts
// Azure.ts
Expand Down Expand Up @@ -133,6 +134,7 @@ const PROVIDER_SUPPORTS_IMAGES: string[] = [
"watsonx",
"zAI",
"tensorix",
"api-route",
];

const MODEL_SUPPORTS_IMAGES: RegExp[] = [
Expand Down Expand Up @@ -253,6 +255,7 @@ const PARALLEL_PROVIDERS: string[] = [
"scaleway",
"minimax",
"tensorix",
"api-route",
];

function llmCanGenerateInParallel(provider: string, model: string): boolean {
Expand Down
14 changes: 14 additions & 0 deletions core/llm/llms/ApiRoute.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 ApiRoute extends OpenAI {
static providerName = "api-route";
static defaultOptions: Partial<LLMOptions> = {
apiBase: "https://global.api-route.com/v1/",
model: "claude-3-7-sonnet-20250219",
useLegacyCompletionsEndpoint: false,
};
}

export default ApiRoute;
2 changes: 2 additions & 0 deletions core/llm/llms/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ import SambaNova from "./SambaNova";
import Scaleway from "./Scaleway";
import SiliconFlow from "./SiliconFlow";
import Tensorix from "./Tensorix";
import ApiRoute from "./ApiRoute";
import TARS from "./TARS";
import TestLLM from "./Test";
import TextGenWebUI from "./TextGenWebUI";
Expand Down Expand Up @@ -125,6 +126,7 @@ export const LLMClasses = [
xAI,
SiliconFlow,
Tensorix,
ApiRoute,
Scaleway,
Relace,
Inception,
Expand Down
93 changes: 93 additions & 0 deletions docs/customize/model-providers/more/apiroute.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
---
title: "API Route"
description: "Configure API Route with Continue to access Claude, GPT, DeepSeek, Gemini, and other models through an aggregated high-concurrency API gateway"
---

[API Route](https://www.api-route.com) is an OpenAI-compatible aggregating API gateway that provides high-availability, low-latency access to Claude, OpenAI, DeepSeek, Google Gemini, and other top-tier models with unified billing and developer tooling.

<Info>
You can obtain your API key from the
[API Route Console](https://www.api-route.com/api-keys).
</Info>

## Chat Model

We recommend configuring **claude-3-7-sonnet-20250219** or **gpt-4o** as your chat model.

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

models:
- name: Claude 3.7 Sonnet
provider: api-route
model: claude-3-7-sonnet-20250219
apiKey: <YOUR_API_ROUTE_API_KEY>
roles:
- chat
```
</Tab>
<Tab title="JSON">
```json title="config.json"
{
"models": [
{
"title": "Claude 3.7 Sonnet",
"provider": "api-route",
"model": "claude-3-7-sonnet-20250219",
"apiKey": "<YOUR_API_ROUTE_API_KEY>"
}
]
}
```
</Tab>
</Tabs>

## Autocomplete Model

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

models:
- name: DeepSeek V3
provider: api-route
model: deepseek-chat
apiKey: <YOUR_API_ROUTE_API_KEY>
roles:
- autocomplete
```
</Tab>
<Tab title="JSON">
```json title="config.json"
{
"models": [
{
"title": "DeepSeek V3",
"provider": "api-route",
"model": "deepseek-chat",
"apiKey": "<YOUR_API_ROUTE_API_KEY>"
}
],
"tabAutocompleteModel": {
"title": "DeepSeek V3",
"provider": "api-route",
"model": "deepseek-chat",
"apiKey": "<YOUR_API_ROUTE_API_KEY>"
}
}
```
</Tab>
</Tabs>

## Embeddings Model

API Route provides access to OpenAI and open-weight embedding models (e.g. `text-embedding-3-small`, `text-embedding-3-large`).

[View the source](https://github.com/continuedev/continue/blob/main/core/llm/llms/ApiRoute.ts)
1 change: 1 addition & 0 deletions docs/docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@
{
"group": "More Providers",
"pages": [
"customize/model-providers/more/apiroute",
"customize/model-providers/more/asksage",
"customize/model-providers/more/clawrouter",
"customize/model-providers/more/deepseek",
Expand Down
12 changes: 8 additions & 4 deletions extensions/vscode/config_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,8 @@
"ovhcloud",
"venice",
"inception",
"tars"
"tars",
"api-route"
],
"markdownEnumDescriptions": [
"### OpenAI\nUse gpt-4, gpt-3.5-turbo, or any other OpenAI model. See [here](https://openai.com/product#made-for-developers) to obtain an API key.\n\n> [Reference](https://docs.continue.dev/reference/Model%20Providers/openai)",
Expand Down Expand Up @@ -289,7 +290,8 @@
"### OVHcloud AI Endpoints is a serverless inference API that provides access to a curated selection of models (e.g., Llama, Mistral, Qwen, Deepseek). It is designed with security and data privacy in mind and is compliant with GDPR. To get started, create an API key on the OVHcloud [AI Endpoints website](https://endpoints.ai.cloud.ovh.net/). For more information, including pricing, visit the OVHcloud [AI Endpoints product page](https://www.ovhcloud.com/en/public-cloud/ai-endpoints/).",
"### Venice\n Venice.AI is a privacy-focused generative AI platform, allowing users to interact with open-source LLMs without storing any private user data.\nHosted models support the OpenAI API standard, providing seamless integration for users seeking privacy and flexibility.\nTo get started with the Venice API, either purchase a pro account, stake $VVV for daily inference allotments, or fund your account with USD.\nVisit the [API settings page](https://venice.ai/settings/api) or learn more at the [Venice API documentation](https://venice.ai/api).",
"### Inception\n Inception Labs offer a new generation of diffusion-based LLMs.\nVisit the [API settings page](https://platform.inceptionlabs.ai/) or learn more at the [Inception docs](https://platform.inceptionlabs.ai/docs).",
"### TARS\nTARS is an OpenAI-compatible proxy router. To get started, obtain an API key and configure the provider in your config.json."
"### TARS\nTARS is an OpenAI-compatible proxy router. To get started, obtain an API key and configure the provider in your config.json.",
"### API Route\nAPI Route is an enterprise-grade OpenAI-compatible API aggregation platform providing access to Claude 3.7, DeepSeek V3/R1, GPT-4o, Gemini 2.5, Qwen, and more with global routing acceleration.\nTo get started, create an account and get an API key at [api-route.com](https://www.api-route.com).\n> [Models](https://www.api-route.com)"
],
"type": "string"
},
Expand Down Expand Up @@ -2873,7 +2875,8 @@
"tensorix",
"function-network",
"scaleway",
"ovhcloud"
"ovhcloud",
"api-route"
]
},
"model": {
Expand Down Expand Up @@ -2937,7 +2940,8 @@
"nvidia",
"gemini",
"siliconflow",
"tensorix"
"tensorix",
"api-route"
]
}
},
Expand Down
Binary file added gui/public/logos/apiroute.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions gui/src/pages/AddNewModel/configs/providers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1270,6 +1270,27 @@ To get started, [register](https://dataplatform.cloud.ibm.com/registration/stepo
packages: [{ ...models.AUTODETECT }],
apiKeyUrl: "https://app.tensorix.ai",
},
apiroute: {
title: "API Route",
provider: "api-route",
icon: "apiroute.png",
description:
"API Route is an OpenAI-compatible API gateway providing access to Claude, GPT, DeepSeek, Gemini, and more.",
longDescription:
"To get started with API Route, create an account and obtain an API key from [API Route](https://www.api-route.com/api-keys).",
tags: [ModelProviderTags.RequiresApiKey, ModelProviderTags.OpenSource],
collectInputFor: [
{
inputType: "text",
key: "apiKey",
label: "API Key",
placeholder: "Enter your API Route key",
required: true,
},
],
packages: [{ ...models.AUTODETECT }],
apiKeyUrl: "https://www.api-route.com/api-keys",
},
venice: {
title: "Venice",
provider: "venice",
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 @@ -176,6 +176,8 @@ export function constructLlmApi(config: LLMConfig): BaseLlmApi | undefined {
return openAICompatible("https://api.function.network/v1/", config);
case "tensorix":
return openAICompatible("https://api.tensorix.ai/v1/", config);
case "api-route":
return openAICompatible("https://global.api-route.com/v1/", config);
case "openrouter":
return new OpenRouterApi(config);
case "clawrouter":
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 @@ -60,6 +60,7 @@ export const OpenAIConfigSchema = BasePlusConfig.extend({
z.literal("zAI"),
z.literal("scaleway"),
z.literal("tensorix"),
z.literal("api-route"),
z.literal("ncompass"),
z.literal("relace"),
z.literal("huggingface-inference-api"),
Expand Down
Loading