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/Tokenmix.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 Tokenmix extends OpenAI {
static providerName = "tokenmix";
static defaultOptions: Partial<LLMOptions> = {
apiBase: "https://api.tokenmix.ai/v1/",
model: "deepseek/deepseek-v4-pro",
useLegacyCompletionsEndpoint: false,
};
}

export default Tokenmix;
2 changes: 2 additions & 0 deletions core/llm/llms/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ import TARS from "./TARS";
import TestLLM from "./Test";
import TextGenWebUI from "./TextGenWebUI";
import Together from "./Together";
import Tokenmix from "./Tokenmix";
import Venice from "./Venice";
import VertexAI from "./VertexAI";
import Vllm from "./Vllm";
Expand Down Expand Up @@ -125,6 +126,7 @@ export const LLMClasses = [
xAI,
SiliconFlow,
Tensorix,
Tokenmix,
Scaleway,
Relace,
Inception,
Expand Down
93 changes: 93 additions & 0 deletions docs/customize/model-providers/more/tokenmix.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
---
title: "TokenMix"
description: "Configure TokenMix with Continue to access DeepSeek, Qwen, Kimi, GLM, MiniMax, and other models through a single OpenAI-compatible API gateway"
---

[TokenMix](https://tokenmix.ai) is an OpenAI-compatible API gateway that provides access to DeepSeek, Qwen, Kimi, GLM, MiniMax, and other models through one endpoint and one API key. Pay-as-you-go with no subscription required.

<Info>
You can get an API key from
[tokenmix.ai](https://tokenmix.ai).
</Info>

## Chat Model

We recommend configuring **deepseek/deepseek-v4-pro** as your chat model.

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

models:
- name: DeepSeek V4 Pro
provider: tokenmix
model: deepseek/deepseek-v4-pro
apiKey: <YOUR_TOKENMIX_API_KEY>
roles:
- chat
```
</Tab>
<Tab title="JSON">
```json title="config.json"
{
"models": [
{
"title": "DeepSeek V4 Pro",
"provider": "tokenmix",
"model": "deepseek/deepseek-v4-pro",
"apiKey": "<YOUR_TOKENMIX_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 V4 Pro
provider: tokenmix
model: deepseek/deepseek-v4-pro
apiKey: <YOUR_TOKENMIX_API_KEY>
roles:
- autocomplete
```
</Tab>
<Tab title="JSON">
```json title="config.json"
{
"models": [
{
"title": "DeepSeek V4 Pro",
"provider": "tokenmix",
"model": "deepseek/deepseek-v4-pro",
"apiKey": "<YOUR_TOKENMIX_API_KEY>"
}
],
"tabAutocompleteModel": {
"title": "DeepSeek V4 Pro",
"provider": "tokenmix",
"model": "deepseek/deepseek-v4-pro",
"apiKey": "<YOUR_TOKENMIX_API_KEY>"
}
}
```
</Tab>
</Tabs>

## Embeddings Model

TokenMix provides access to various models. [Click here](https://tokenmix.ai/models) to see a list of available models.

[View the source](https://github.com/continuedev/continue/blob/main/core/llm/llms/Tokenmix.ts)
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/tokenmix",
"customize/model-providers/more/xAI",
"customize/model-providers/more/zai"
]
Expand Down
20 changes: 20 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,26 @@ To get started, [register](https://dataplatform.cloud.ibm.com/registration/stepo
packages: [{ ...models.AUTODETECT }],
apiKeyUrl: "https://app.tensorix.ai",
},
tokenmix: {
title: "TokenMix",
provider: "tokenmix",
description:
"TokenMix is an OpenAI-compatible API gateway with access to DeepSeek, Qwen, Kimi, GLM, MiniMax, and other models.",
longDescription:
"To get started with TokenMix, create an account and get an API key at [tokenmix.ai](https://tokenmix.ai).",
tags: [ModelProviderTags.RequiresApiKey],
collectInputFor: [
{
inputType: "text",
key: "apiKey",
label: "API Key",
placeholder: "Enter your TokenMix API key",
required: true,
},
],
packages: [{ ...models.AUTODETECT }],
apiKeyUrl: "https://tokenmix.ai",
},
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 "tokenmix":
return openAICompatible("https://api.tokenmix.ai/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("tokenmix"),
z.literal("ncompass"),
z.literal("relace"),
z.literal("huggingface-inference-api"),
Expand Down
Loading