From 11651c80df4e4c4d8dae0ad768bba8f10c2b01b6 Mon Sep 17 00:00:00 2001 From: Cathryn Lavery Date: Mon, 12 Oct 2026 16:21:15 -0500 Subject: [PATCH] feat: add Mixlayer as an LLM provider --- core/llm/autodetect.ts | 7 ++ core/llm/llms/Mixlayer.ts | 14 ++++ core/llm/llms/OpenAI-compatible.vitest.ts | 6 ++ core/llm/llms/index.ts | 2 + .../model-providers/more/mixlayer.mdx | 62 ++++++++++++++++ docs/customize/model-providers/overview.mdx | 1 + docs/docs.json | 1 + gui/src/pages/AddNewModel/configs/models.ts | 74 +++++++++++++++++++ .../pages/AddNewModel/configs/providers.ts | 34 +++++++++ packages/config-types/src/index.ts | 1 + packages/llm-info/src/index.ts | 2 + packages/llm-info/src/providers/mixlayer.ts | 66 +++++++++++++++++ packages/openai-adapters/src/index.ts | 2 + packages/openai-adapters/src/types.ts | 1 + 14 files changed, 273 insertions(+) create mode 100644 core/llm/llms/Mixlayer.ts create mode 100644 docs/customize/model-providers/more/mixlayer.mdx create mode 100644 packages/llm-info/src/providers/mixlayer.ts diff --git a/core/llm/autodetect.ts b/core/llm/autodetect.ts index c8511554b8b..d5028a7a336 100644 --- a/core/llm/autodetect.ts +++ b/core/llm/autodetect.ts @@ -68,6 +68,7 @@ const PROVIDER_HANDLES_TEMPLATING: string[] = [ "deepseek", "xAI", "minimax", + "mixlayer", "groq", "gemini", "docker", @@ -133,6 +134,7 @@ const PROVIDER_SUPPORTS_IMAGES: string[] = [ "watsonx", "zAI", "tensorix", + "mixlayer", ]; const MODEL_SUPPORTS_IMAGES: RegExp[] = [ @@ -153,6 +155,10 @@ const MODEL_SUPPORTS_IMAGES: RegExp[] = [ /\bgemma-?[34](?!n)/, // gemma3/gemma4 support vision, but gemma3n doesn't! /\b(pali|med)gemma/, /qwen(.*)vl/, + /qwen\/qwen3\.8-27b$/, + /qwen\/qwen3\.6-35b-a3b$/, + /qwen\/qwen3\.5-9b$/, + /qwen\/qwen3\.5-4b-free$/, /mistral-small/, /mistral-medium/, ]; @@ -252,6 +258,7 @@ const PARALLEL_PROVIDERS: string[] = [ "function-network", "scaleway", "minimax", + "mixlayer", "tensorix", ]; diff --git a/core/llm/llms/Mixlayer.ts b/core/llm/llms/Mixlayer.ts new file mode 100644 index 00000000000..a387c3b634a --- /dev/null +++ b/core/llm/llms/Mixlayer.ts @@ -0,0 +1,14 @@ +import { LLMOptions } from "../../index.js"; + +import OpenAI from "./OpenAI.js"; + +class Mixlayer extends OpenAI { + static providerName = "mixlayer"; + static defaultOptions: Partial = { + apiBase: "https://mixlayer.ai/v1/", + model: "z-ai/glm-5.3", + useLegacyCompletionsEndpoint: false, + }; +} + +export default Mixlayer; diff --git a/core/llm/llms/OpenAI-compatible.vitest.ts b/core/llm/llms/OpenAI-compatible.vitest.ts index 402fb7e7585..1628a0c9289 100644 --- a/core/llm/llms/OpenAI-compatible.vitest.ts +++ b/core/llm/llms/OpenAI-compatible.vitest.ts @@ -10,6 +10,7 @@ import OpenRouter from "./OpenRouter.js"; import xAI from "./xAI.js"; import Mistral from "./Mistral.js"; import Mimo from "./Mimo.js"; +import Mixlayer from "./Mixlayer.js"; import LMStudio from "./LMStudio.js"; import Cerebras from "./Cerebras.js"; import DeepInfra from "./DeepInfra.js"; @@ -306,6 +307,11 @@ createOpenAISubclassTests(Mimo, { defaultApiBase: "https://api.xiaomimimo.com/v1/", }); +createOpenAISubclassTests(Mixlayer, { + providerName: "mixlayer", + defaultApiBase: "https://mixlayer.ai/v1/", +}); + createOpenAISubclassTests(LMStudio, { providerName: "lmstudio", defaultApiBase: "http://localhost:1234/v1/", diff --git a/core/llm/llms/index.ts b/core/llm/llms/index.ts index 4978f0617f2..cfe5be3c357 100644 --- a/core/llm/llms/index.ts +++ b/core/llm/llms/index.ts @@ -39,6 +39,7 @@ import LMStudio from "./LMStudio"; import Mistral from "./Mistral"; import Mimo from "./Mimo"; import MiniMax from "./MiniMax"; +import Mixlayer from "./Mixlayer"; import MockLLM from "./Mock"; import Moonshot from "./Moonshot"; import Msty from "./Msty"; @@ -95,6 +96,7 @@ export const LLMClasses = [ Mistral, Mimo, MiniMax, + Mixlayer, Bedrock, BedrockImport, SageMaker, diff --git a/docs/customize/model-providers/more/mixlayer.mdx b/docs/customize/model-providers/more/mixlayer.mdx new file mode 100644 index 00000000000..73eccc733b2 --- /dev/null +++ b/docs/customize/model-providers/more/mixlayer.mdx @@ -0,0 +1,62 @@ +--- +title: "How to Configure Mixlayer with Continue" +sidebarTitle: "Mixlayer" +--- + + + Get your API key from the [Mixlayer console](https://console.mixlayer.com/app/api-keys) + + +[Mixlayer](https://mixlayer.com) serves open-source models (Qwen, DeepSeek, GLM) behind an OpenAI-compatible API, with zero data retention. + +## Configuration + + + + ```yaml title="config.yaml" + name: My Config + version: 0.0.1 + schema: v1 + + models: + - name: GLM 5.3 + provider: mixlayer + model: z-ai/glm-5.3 + apiKey: ${{ secrets.MIXLAYER_API_KEY }} + ``` + + + ```json title="config.json" + { + "models": [ + { + "title": "GLM 5.3", + "provider": "mixlayer", + "model": "z-ai/glm-5.3", + "apiKey": "" + } + ] + } + ``` + + + +## Available Models + +| Model | Context | Input | Notes | +| :---- | :------ | :---- | :---- | +| `z-ai/glm-5.3` | 262,144 | text | Tools. Reasoning is always on (Low/High/Max; `none` is rejected). | +| `qwen/qwen3.8-27b` | 262,144 | text, image | Tools. Optional thinking (default on; `none` disables). | +| `qwen/qwen3.6-35b-a3b` | 131,072 | text, image | Tools. Optional thinking (default on; `none` disables). | +| `deepseek/deepseek-v4.1-flash` | 262,144 | text | Tools. Optional thinking (default High; `none` disables). | +| `qwen/qwen3.5-9b` | 131,072 | text, image | Tools. Optional thinking (default on; `none` disables). | +| `qwen/qwen3.5-4b-free` | 131,072 | text, image | Free. Tools. Optional thinking (default on; `none` disables). | + +## Notes + +- OpenAI-compatible API at `https://mixlayer.ai/v1` (nearest edge). Set `apiBase` to `https://.mixlayer.ai/v1` for a specific region. +- In `config.yaml`, reference the key with `${{ secrets.MIXLAYER_API_KEY }}`. Continue resolves that from a `.env` file, or from the process environment when using the CLI. +- Prompts and outputs are processed in memory and discarded after inference (zero data retention). They are not stored or used for training. +- Chat Completions does not support `tool_choice`. +- Max output tokens per model are not published. +- Pricing: [mixlayer.com/pricing](https://mixlayer.com/pricing) diff --git a/docs/customize/model-providers/overview.mdx b/docs/customize/model-providers/overview.mdx index 7ba030dcb4d..2759344d1b9 100644 --- a/docs/customize/model-providers/overview.mdx +++ b/docs/customize/model-providers/overview.mdx @@ -40,6 +40,7 @@ Beyond the top-level providers, Continue supports many other options: | [NVIDIA](/customize/model-providers/more/nvidia) | GPU-accelerated model hosting | | [Cloudflare](/customize/model-providers/more/cloudflare) | Edge-based AI inference services | | [MiniMax](/customize/model-providers/more/minimax) | High-performance models with 200K+ context window | +| [Mixlayer](/customize/model-providers/more/mixlayer) | OpenAI-compatible inference for open-source models, with zero data retention | ### Local Model Options diff --git a/docs/docs.json b/docs/docs.json index b7a1d83f13a..27d2628f388 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -114,6 +114,7 @@ "customize/model-providers/more/llamastack", "customize/model-providers/more/mimo", "customize/model-providers/more/mistral", + "customize/model-providers/more/mixlayer", "customize/model-providers/more/moonshot", "customize/model-providers/more/nous", "customize/model-providers/more/nvidia", diff --git a/gui/src/pages/AddNewModel/configs/models.ts b/gui/src/pages/AddNewModel/configs/models.ts index 7065248d68f..45d5a5ac1a0 100644 --- a/gui/src/pages/AddNewModel/configs/models.ts +++ b/gui/src/pages/AddNewModel/configs/models.ts @@ -3327,4 +3327,78 @@ export const models: { [key: string]: ModelPackage } = { icon: "inception.png", isOpenSource: false, }, + + // Mixlayer models + mixlayerGlm53: { + title: "GLM 5.3", + description: + "Text model with tool calling. Reasoning is always on. 262,144 token context window.", + params: { + title: "GLM 5.3", + model: "z-ai/glm-5.3", + contextLength: 262_144, + }, + providerOptions: ["mixlayer"], + isOpenSource: true, + }, + mixlayerQwen3827b: { + title: "Qwen3.8 27B", + description: + "Text and image model with tool calling and optional thinking. 262,144 token context window.", + params: { + title: "Qwen3.8 27B", + model: "qwen/qwen3.8-27b", + contextLength: 262_144, + }, + providerOptions: ["mixlayer"], + isOpenSource: true, + }, + mixlayerQwen3635bA3b: { + title: "Qwen3.6 35B A3B", + description: + "Text and image model with tool calling and optional thinking. 131,072 token context window.", + params: { + title: "Qwen3.6 35B A3B", + model: "qwen/qwen3.6-35b-a3b", + contextLength: 131_072, + }, + providerOptions: ["mixlayer"], + isOpenSource: true, + }, + mixlayerDeepseekV41Flash: { + title: "DeepSeek V4.1 Flash", + description: + "Text model with tool calling and optional thinking. 262,144 token context window.", + params: { + title: "DeepSeek V4.1 Flash", + model: "deepseek/deepseek-v4.1-flash", + contextLength: 262_144, + }, + providerOptions: ["mixlayer"], + isOpenSource: true, + }, + mixlayerQwen359b: { + title: "Qwen3.5 9B", + description: + "Text and image model with tool calling and optional thinking. 131,072 token context window.", + params: { + title: "Qwen3.5 9B", + model: "qwen/qwen3.5-9b", + contextLength: 131_072, + }, + providerOptions: ["mixlayer"], + isOpenSource: true, + }, + mixlayerQwen354bFree: { + title: "Qwen3.5 4B (Free)", + description: + "Free text and image model with tool calling and optional thinking. 131,072 token context window.", + params: { + title: "Qwen3.5 4B (Free)", + model: "qwen/qwen3.5-4b-free", + contextLength: 131_072, + }, + providerOptions: ["mixlayer"], + isOpenSource: true, + }, }; diff --git a/gui/src/pages/AddNewModel/configs/providers.ts b/gui/src/pages/AddNewModel/configs/providers.ts index 9e2aba08c5c..eb754d73f77 100644 --- a/gui/src/pages/AddNewModel/configs/providers.ts +++ b/gui/src/pages/AddNewModel/configs/providers.ts @@ -589,6 +589,40 @@ Select the \`GPT-4o\` model below to complete your provider configuration, but n ], apiKeyUrl: "https://platform.minimax.io", }, + mixlayer: { + title: "Mixlayer", + provider: "mixlayer", + description: + "OpenAI-compatible inference for open-source models, with zero data retention.", + longDescription: + "Mixlayer serves Qwen, DeepSeek, and GLM models at https://mixlayer.ai/v1. Get an API key from the [Mixlayer console](https://console.mixlayer.com/app/api-keys). A free Qwen 3.5 4B model is available.", + tags: [ModelProviderTags.RequiresApiKey], + collectInputFor: [ + { + inputType: "text", + key: "apiKey", + label: "API Key", + placeholder: "Enter your Mixlayer API key", + required: true, + }, + ], + packages: [ + models.mixlayerGlm53, + models.mixlayerQwen3827b, + models.mixlayerQwen3635bA3b, + models.mixlayerDeepseekV41Flash, + models.mixlayerQwen359b, + models.mixlayerQwen354bFree, + { + ...models.AUTODETECT, + params: { + ...models.AUTODETECT.params, + title: "Mixlayer", + }, + }, + ], + apiKeyUrl: "https://console.mixlayer.com/app/api-keys", + }, inception: { title: "Inception Labs", provider: "inception", diff --git a/packages/config-types/src/index.ts b/packages/config-types/src/index.ts index c73c4f5142b..f0538e7805c 100644 --- a/packages/config-types/src/index.ts +++ b/packages/config-types/src/index.ts @@ -61,6 +61,7 @@ export const modelDescriptionSchema = z.object({ "scaleway", "watsonx", "minimax", + "mixlayer", ]), model: z.string(), apiKey: z.string().optional(), diff --git a/packages/llm-info/src/index.ts b/packages/llm-info/src/index.ts index 0ea14a5ab47..ec9c9f74f11 100644 --- a/packages/llm-info/src/index.ts +++ b/packages/llm-info/src/index.ts @@ -6,6 +6,7 @@ import { CometAPI } from "./providers/cometapi.js"; import { Gemini } from "./providers/gemini.js"; import { Inception } from "./providers/inception.js"; import { MiniMax } from "./providers/minimax.js"; +import { Mixlayer } from "./providers/mixlayer.js"; import { Mistral } from "./providers/mistral.js"; import { Ollama } from "./providers/ollama.js"; import { OpenAi } from "./providers/openai.js"; @@ -29,6 +30,7 @@ export const allModelProviders: ModelProvider[] = [ CometAPI, Inception, MiniMax, + Mixlayer, xAI, zAI, ]; diff --git a/packages/llm-info/src/providers/mixlayer.ts b/packages/llm-info/src/providers/mixlayer.ts new file mode 100644 index 00000000000..345880c8df3 --- /dev/null +++ b/packages/llm-info/src/providers/mixlayer.ts @@ -0,0 +1,66 @@ +import { MediaType, ModelProvider } from "../types.js"; + +export const Mixlayer: ModelProvider = { + models: [ + { + model: "z-ai/glm-5.3", + displayName: "GLM 5.3", + contextLength: 262144, + description: + "Text model with tool calling. Reasoning is always on (Low/High/Max; none is rejected).", + regex: /^z-ai\/glm-5\.3$/, + recommendedFor: ["chat"], + }, + { + model: "qwen/qwen3.8-27b", + displayName: "Qwen3.8 27B", + contextLength: 262144, + description: + "Text and image model with tool calling. Optional thinking (default on; none disables).", + regex: /^qwen\/qwen3\.8-27b$/, + mediaTypes: [MediaType.Text, MediaType.Image], + recommendedFor: ["chat"], + }, + { + model: "qwen/qwen3.6-35b-a3b", + displayName: "Qwen3.6 35B A3B", + contextLength: 131072, + description: + "Text and image model with tool calling. Optional thinking (default on; none disables).", + regex: /^qwen\/qwen3\.6-35b-a3b$/, + mediaTypes: [MediaType.Text, MediaType.Image], + recommendedFor: ["chat"], + }, + { + model: "deepseek/deepseek-v4.1-flash", + displayName: "DeepSeek V4.1 Flash", + contextLength: 262144, + description: + "Text model with tool calling. Optional thinking (default High; none disables).", + regex: /^deepseek\/deepseek-v4\.1-flash$/, + recommendedFor: ["chat"], + }, + { + model: "qwen/qwen3.5-9b", + displayName: "Qwen3.5 9B", + contextLength: 131072, + description: + "Text and image model with tool calling. Optional thinking (default on; none disables).", + regex: /^qwen\/qwen3\.5-9b$/, + mediaTypes: [MediaType.Text, MediaType.Image], + recommendedFor: ["chat"], + }, + { + model: "qwen/qwen3.5-4b-free", + displayName: "Qwen3.5 4B (Free)", + contextLength: 131072, + description: + "Free text and image model with tool calling. Optional thinking (default on; none disables).", + regex: /^qwen\/qwen3\.5-4b-free$/, + mediaTypes: [MediaType.Text, MediaType.Image], + recommendedFor: ["chat"], + }, + ], + id: "mixlayer", + displayName: "Mixlayer", +}; diff --git a/packages/openai-adapters/src/index.ts b/packages/openai-adapters/src/index.ts index 52fb2d33a0c..409673f0376 100644 --- a/packages/openai-adapters/src/index.ts +++ b/packages/openai-adapters/src/index.ts @@ -135,6 +135,8 @@ export function constructLlmApi(config: LLMConfig): BaseLlmApi | undefined { return openAICompatible("https://api.voyageai.com/v1/", config); case "mistral": return openAICompatible("https://api.mistral.ai/v1/", config); + case "mixlayer": + return openAICompatible("https://mixlayer.ai/v1/", config); case "deepinfra": return openAICompatible("https://api.deepinfra.com/v1/openai/", config); case "vllm": diff --git a/packages/openai-adapters/src/types.ts b/packages/openai-adapters/src/types.ts index 14b9512f75b..a8990ff8cba 100644 --- a/packages/openai-adapters/src/types.ts +++ b/packages/openai-adapters/src/types.ts @@ -34,6 +34,7 @@ export const OpenAIConfigSchema = BasePlusConfig.extend({ provider: z.union([ z.literal("openai"), z.literal("mistral"), + z.literal("mixlayer"), z.literal("voyage"), z.literal("deepinfra"), z.literal("groq"),