From 19c3f358317e3d93edba187e1a88e9a0eb8352b4 Mon Sep 17 00:00:00 2001 From: shanemort1982 <156683457+shanemort1982@users.noreply.github.com> Date: Thu, 19 Mar 2026 23:29:45 +0000 Subject: [PATCH] feat: add Tensorix as an LLM provider (#11184) * feat: add Tensorix as an LLM provider Adds Tensorix (https://tensorix.ai) as a new OpenAI-compatible provider, giving users access to DeepSeek, Llama 4, Qwen, GLM, and other models through a single API key. Changes: - New LLM class (core/llm/llms/Tensorix.ts) - Registered in LLM index and config schema - Added to VS Code extension config schema - Added to GUI provider selection with AUTODETECT * Fix missing commas in config_schema.json for tensorix entries Co-authored-by: openhands * feat: address reviewer feedback for Tensorix provider - Add tensorix to openai-adapters (types.ts + index.ts) - Add tensorix to PROVIDER_HANDLES_TEMPLATING, PROVIDER_SUPPORTS_IMAGES, and PARALLEL_PROVIDERS in autodetect.ts - Add docs page for Tensorix under more providers - Add tensorix to docs.json navigation Co-authored-by: openhands --------- Co-authored-by: openhands --- core/control-plane/schema.ts | 2 + core/llm/autodetect.ts | 3 + core/llm/llms/Tensorix.ts | 14 +++ core/llm/llms/index.ts | 2 + .../model-providers/more/tensorix.mdx | 93 +++++++++++++++++++ docs/docs.json | 1 + extensions/vscode/config_schema.json | 9 +- .../pages/AddNewModel/configs/providers.ts | 20 ++++ packages/openai-adapters/src/index.ts | 2 + packages/openai-adapters/src/types.ts | 1 + 10 files changed, 145 insertions(+), 2 deletions(-) create mode 100644 core/llm/llms/Tensorix.ts create mode 100644 docs/customize/model-providers/more/tensorix.mdx diff --git a/core/control-plane/schema.ts b/core/control-plane/schema.ts index 191a34884..02901bda2 100644 --- a/core/control-plane/schema.ts +++ b/core/control-plane/schema.ts @@ -19,6 +19,7 @@ const modelDescriptionSchema = z.object({ "ovhcloud", "nebius", "siliconflow", + "tensorix", "scaleway", "watsonx", ]), @@ -92,6 +93,7 @@ const embeddingsProviderSchema = z.object({ "ovhcloud", "nebius", "siliconflow", + "tensorix", "scaleway", "watsonx", ]), diff --git a/core/llm/autodetect.ts b/core/llm/autodetect.ts index 4085d3798..15707209a 100644 --- a/core/llm/autodetect.ts +++ b/core/llm/autodetect.ts @@ -72,6 +72,7 @@ const PROVIDER_HANDLES_TEMPLATING: string[] = [ "docker", "nous", "zAI", + "tensorix", // TODO add these, change to inverted logic so only the ones that need templating are hardcoded // Asksage.ts // Azure.ts @@ -130,6 +131,7 @@ const PROVIDER_SUPPORTS_IMAGES: string[] = [ "ovhcloud", "watsonx", "zAI", + "tensorix", ]; const MODEL_SUPPORTS_IMAGES: RegExp[] = [ @@ -248,6 +250,7 @@ const PARALLEL_PROVIDERS: string[] = [ "vertexai", "function-network", "scaleway", + "tensorix", ]; function llmCanGenerateInParallel(provider: string, model: string): boolean { diff --git a/core/llm/llms/Tensorix.ts b/core/llm/llms/Tensorix.ts new file mode 100644 index 000000000..0d6878ff5 --- /dev/null +++ b/core/llm/llms/Tensorix.ts @@ -0,0 +1,14 @@ +import OpenAI from "./OpenAI.js"; + +import type { LLMOptions } from "../../index.js"; + +class Tensorix extends OpenAI { + static providerName = "tensorix"; + static defaultOptions: Partial = { + apiBase: "https://api.tensorix.ai/v1/", + model: "deepseek/deepseek-chat-v3.1", + useLegacyCompletionsEndpoint: false, + }; +} + +export default Tensorix; diff --git a/core/llm/llms/index.ts b/core/llm/llms/index.ts index 04f58e393..ebf9b7cf4 100644 --- a/core/llm/llms/index.ts +++ b/core/llm/llms/index.ts @@ -56,6 +56,7 @@ import SageMaker from "./SageMaker"; import SambaNova from "./SambaNova"; import Scaleway from "./Scaleway"; import SiliconFlow from "./SiliconFlow"; +import Tensorix from "./Tensorix"; import ContinueProxy from "./stubs/ContinueProxy"; import TARS from "./TARS"; import TestLLM from "./Test"; @@ -121,6 +122,7 @@ export const LLMClasses = [ VertexAI, xAI, SiliconFlow, + Tensorix, Scaleway, Relace, Inception, diff --git a/docs/customize/model-providers/more/tensorix.mdx b/docs/customize/model-providers/more/tensorix.mdx new file mode 100644 index 000000000..6e2d7c239 --- /dev/null +++ b/docs/customize/model-providers/more/tensorix.mdx @@ -0,0 +1,93 @@ +--- +title: "Tensorix" +description: "Configure Tensorix with Continue to access DeepSeek, Llama, Qwen, GLM, and other models through a single OpenAI-compatible API gateway" +--- + +[Tensorix](https://tensorix.ai) is an OpenAI-compatible API gateway that provides access to DeepSeek, Llama, Qwen, GLM, MiniMax, and other models. Pay-as-you-go with no subscription required. + + + You can get an API key from + [app.tensorix.ai](https://app.tensorix.ai). + + +## Chat Model + +We recommend configuring **deepseek/deepseek-chat-v3.1** as your chat model. + + + + ```yaml title="config.yaml" + name: My Config + version: 0.0.1 + schema: v1 + + models: + - name: DeepSeek Chat + provider: tensorix + model: deepseek/deepseek-chat-v3.1 + apiKey: + roles: + - chat + ``` + + + ```json title="config.json" + { + "models": [ + { + "title": "DeepSeek Chat", + "provider": "tensorix", + "model": "deepseek/deepseek-chat-v3.1", + "apiKey": "" + } + ] + } + ``` + + + +## Autocomplete Model + + + + ```yaml title="config.yaml" + name: My Config + version: 0.0.1 + schema: v1 + + models: + - name: DeepSeek Chat + provider: tensorix + model: deepseek/deepseek-chat-v3.1 + apiKey: + roles: + - autocomplete + ``` + + + ```json title="config.json" + { + "models": [ + { + "title": "DeepSeek Chat", + "provider": "tensorix", + "model": "deepseek/deepseek-chat-v3.1", + "apiKey": "" + } + ], + "tabAutocompleteModel": { + "title": "DeepSeek Chat", + "provider": "tensorix", + "model": "deepseek/deepseek-chat-v3.1", + "apiKey": "" + } + } + ``` + + + +## Embeddings Model + +Tensorix provides access to various embedding models. [Click here](https://tensorix.ai/models) to see a list of available models. + +[View the source](https://github.com/continuedev/continue/blob/main/core/llm/llms/Tensorix.ts) diff --git a/docs/docs.json b/docs/docs.json index 379837394..13f482ea5 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -179,6 +179,7 @@ "customize/model-providers/more/moonshot", "customize/model-providers/more/nous", "customize/model-providers/more/nvidia", + "customize/model-providers/more/tensorix", "customize/model-providers/more/together", "customize/model-providers/more/xAI", "customize/model-providers/more/zai" diff --git a/extensions/vscode/config_schema.json b/extensions/vscode/config_schema.json index c7bd24175..2d5aee801 100644 --- a/extensions/vscode/config_schema.json +++ b/extensions/vscode/config_schema.json @@ -227,6 +227,7 @@ "kindo", "moonshot", "siliconflow", + "tensorix", "function-network", "scaleway", "relace", @@ -278,6 +279,7 @@ "### Secure AI management software that helps enterprises adopt and manage AI across their workforce. To get started, obtain an API key from [the Kindo console](https://app.kindo.ai/settings/api), and see the [website](https://app.kindo.ai//)", "### Moonshot\nTo get started with Moonshot AI, obtain your API key from [Moonshot AI](https://platform.moonshot.cn/). Moonshot AI provides high-quality large language models with competitive pricing.\n> [Reference](https://platform.moonshot.cn/docs/api)", "### SiliconFlow\nTo get started with SiliconFlow, obtain your API key from [SiliconCloud](https://cloud.siliconflow.cn/account/ak). SiliconCloud provides cost-effective GenAI services based on excellent open source basic models.\n> [Models](https://siliconflow.cn/zh-cn/models)", + "### Tensorix\nTensorix is an OpenAI-compatible API gateway with access to DeepSeek, Llama, Qwen, GLM, and other models. Pay-as-you-go with no subscription required.\nTo get started, create an account and get an API key at [app.tensorix.ai](https://app.tensorix.ai).\n> [Models](https://tensorix.ai/models)", "### Function Network offers private, affordable user-owned AI\nTo get started with Function Network, obtain your API key from [Function Network](https://www.function.network/join-waitlist). Function Network provides a variety of models for chat, completion, and embeddings.", "### Scaleway\n Generative APIs are serverless endpoints for the most popular AI models.\nHosted in European data centers and priced competitively per million tokens used, models served by Scaleway are ideal for users requiring low latency, full data privacy, and 100% compliance with EU AI Act. To get access to the Scaleway Generative APIs, read the [Quickstart guide](https://www.scaleway.com/en/docs/ai-data/generative-apis/quickstart/) and get a [valid API key](https://www.scaleway.com/en/docs/identity-and-access-management/iam/how-to/create-api-keys/).", "### Relace\n Relace provides a fast apply model. To get started, obtain an API key from [here](https://app.relace.ai/settings/api-keys).", @@ -2867,6 +2869,7 @@ "watsonx", "lmstudio", "siliconflow", + "tensorix", "function-network", "scaleway", "ovhcloud" @@ -2932,7 +2935,8 @@ "voyage", "nvidia", "gemini", - "siliconflow" + "siliconflow", + "tensorix" ] } }, @@ -3000,7 +3004,8 @@ "watsonx", "llm", "huggingface-tei", - "siliconflow" + "siliconflow", + "tensorix" ] }, "params": { diff --git a/gui/src/pages/AddNewModel/configs/providers.ts b/gui/src/pages/AddNewModel/configs/providers.ts index 5dfb7220b..1b1178d9d 100644 --- a/gui/src/pages/AddNewModel/configs/providers.ts +++ b/gui/src/pages/AddNewModel/configs/providers.ts @@ -1218,6 +1218,26 @@ To get started, [register](https://dataplatform.cloud.ibm.com/registration/stepo ], apiKeyUrl: "https://cloud.siliconflow.cn/account/ak", }, + tensorix: { + title: "Tensorix", + provider: "tensorix", + description: + "Tensorix is an OpenAI-compatible API gateway with access to DeepSeek, Llama, Qwen, GLM, and more.", + longDescription: + "To get started with Tensorix, create an account and get an API key at [app.tensorix.ai](https://app.tensorix.ai).", + tags: [ModelProviderTags.RequiresApiKey, ModelProviderTags.OpenSource], + collectInputFor: [ + { + inputType: "text", + key: "apiKey", + label: "API Key", + placeholder: "Enter your Tensorix API key", + required: true, + }, + ], + packages: [{ ...models.AUTODETECT }], + apiKeyUrl: "https://app.tensorix.ai", + }, venice: { title: "Venice", provider: "venice", diff --git a/packages/openai-adapters/src/index.ts b/packages/openai-adapters/src/index.ts index a00b95b81..9e63cf3d2 100644 --- a/packages/openai-adapters/src/index.ts +++ b/packages/openai-adapters/src/index.ts @@ -172,6 +172,8 @@ export function constructLlmApi(config: LLMConfig): BaseLlmApi | undefined { return openAICompatible("https://api.studio.nebius.ai/v1/", config); case "function-network": return openAICompatible("https://api.function.network/v1/", config); + case "tensorix": + return openAICompatible("https://api.tensorix.ai/v1/", config); case "openrouter": return new OpenRouterApi(config); case "llama.cpp": diff --git a/packages/openai-adapters/src/types.ts b/packages/openai-adapters/src/types.ts index 868a6e8df..4b809ca82 100644 --- a/packages/openai-adapters/src/types.ts +++ b/packages/openai-adapters/src/types.ts @@ -57,6 +57,7 @@ export const OpenAIConfigSchema = BasePlusConfig.extend({ z.literal("xAI"), z.literal("zAI"), z.literal("scaleway"), + z.literal("tensorix"), z.literal("ncompass"), z.literal("relace"), z.literal("huggingface-inference-api"),