feat: model updates and + z.ai (#10638)

* Add latest model definitions across providers

Add new models for OpenAI (gpt-4.1, gpt-5.2, codex-mini, o1/o3/o4-mini),
Gemini (2.5 stable, 2.5-flash-lite, 3-flash-preview), Mistral (devstral,
magistral, ministral, mistral-nemo), xAI (grok-4-fast, grok-4-1-fast,
grok-3-fast), and Bedrock (Claude 4.5/4.6, Nova, Llama 4, DeepSeek).

Update tool support and reasoning detection for the new model families.

* Add Z.ai (GLM) provider, Kimi K2/K2.5 models, and fix OpenRouter tool support bug

- Add Z.ai as a new provider with GLM-5, GLM-4.7, GLM-4-plus, GLM-4.5 models
- Add Kimi K2 and K2.5 model packages to Moonshot provider
- Fix variable shadowing bug in OpenRouter tool support where loop
  variables shadowed the outer model parameter, causing specificModels
  and supportedContains checks to always return true
- Add moonshotai/kimi and zai-org/glm to OpenRouter supported prefixes
- Add Z.ai and Moonshot to docs navigation

* Clean up unnecessary import aliases for zAI

* Add Z.ai Coding Plan endpoint note to docs

* Replace placeholder zai.png icon with proper zAI.svg

* Add zAI provider to openai-adapters

* Fix Z.ai API key URL
This commit is contained in:
Dallin Romney 2026-02-20 00:35:44 -08:00 • committed by GitHub
parent 785a7760a0
commit a2c1fe6897
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
19 changed files with 997 additions and 35 deletions

View file

@ -71,6 +71,7 @@ const PROVIDER_HANDLES_TEMPLATING: string[] = [
"gemini",
"docker",
"nous",
"zAI",
// TODO add these, change to inverted logic so only the ones that need templating are hardcoded
// Asksage.ts
// Azure.ts
@ -128,6 +129,7 @@ const PROVIDER_SUPPORTS_IMAGES: string[] = [
"nebius",
"ovhcloud",
"watsonx",
"zAI",
];
const MODEL_SUPPORTS_IMAGES: RegExp[] = [
@ -209,6 +211,19 @@ function modelSupportsReasoning(
if (model.model.includes("deepseek-r")) {
return true;
}
// o-series reasoning models
if (/^o[134]/.test(model.model)) {
return true;
}
if (model.model.includes("codex")) {
return true;
}
if (model.model.includes("magistral")) {
return true;
}
if (model.model.includes("grok-4")) {
return true;
}
return false;
}
@ -257,6 +272,7 @@ function isProviderHandlesTemplatingOrNoTemplateTypeRequired(
modelName.includes("moonshot") ||
modelName.includes("kimi") ||
modelName.includes("mercury") ||
modelName.includes("glm") ||
/^o\d/.test(modelName)
);
}

View file

@ -67,6 +67,7 @@ import Vllm from "./Vllm";
import Voyage from "./Voyage";
import WatsonX from "./WatsonX";
import xAI from "./xAI";
import zAI from "./zAI";
export const LLMClasses = [
Anthropic,
Cohere,
@ -126,6 +127,7 @@ export const LLMClasses = [
Voyage,
LlamaStack,
TARS,
zAI,
];
export async function llmFromDescription(

13
core/llm/llms/zAI.ts Normal file
View file

@ -0,0 +1,13 @@
import { LLMOptions } from "../../index.js";
import OpenAI from "./OpenAI.js";
class zAI extends OpenAI {
static providerName = "zAI";
static defaultOptions: Partial<LLMOptions> = {
apiBase: "https://api.z.ai/api/paas/v4/",
useLegacyCompletionsEndpoint: false,
};
}
export default zAI;

View file

@ -41,7 +41,11 @@ export const PROVIDER_TOOL_SUPPORT: Record<string, (model: string) => boolean> =
if (
lower.startsWith("gpt-4") ||
lower.startsWith("gpt-5") ||
lower.startsWith("o3")
lower.startsWith("o1") ||
lower.startsWith("o3") ||
lower.startsWith("o4") ||
lower.startsWith("codex") ||
lower.startsWith("gpt-4.1")
) {
return true;
}
@ -114,6 +118,9 @@ export const PROVIDER_TOOL_SUPPORT: Record<string, (model: string) => boolean> =
"nova-micro",
"nova-premier",
"gpt-oss",
"llama4",
"llama-4",
"deepseek",
].some((part) => model.toLowerCase().includes(part))
) {
return true;
@ -133,7 +140,7 @@ export const PROVIDER_TOOL_SUPPORT: Record<string, (model: string) => boolean> =
"pixtral",
"ministral",
"mistral-nemo",
"devstral",
"magistral",
].some((part) => model.toLowerCase().includes(part))
);
},
@ -287,9 +294,11 @@ export const PROVIDER_TOOL_SUPPORT: Record<string, (model: string) => boolean> =
const supportedPrefixes = [
"openai/gpt-3.5",
"openai/gpt-4",
"openai/gpt-5",
"openai/o1",
"openai/o3",
"openai/o4",
"openai/codex",
"openai/gpt-oss",
"anthropic/claude",
"microsoft/phi-3",
@ -316,6 +325,8 @@ export const PROVIDER_TOOL_SUPPORT: Record<string, (model: string) => boolean> =
"meta-llama/llama-4",
"all-hands/openhands-lm-32b",
"lgai-exaone/exaone",
"moonshotai/kimi",
"zai-org/glm",
];
for (const prefix of supportedPrefixes) {
if (model.toLowerCase().startsWith(prefix)) {
@ -333,21 +344,25 @@ export const PROVIDER_TOOL_SUPPORT: Record<string, (model: string) => boolean> =
"nousresearch/hermes-3-llama-3.1-70b",
"moonshotai/kimi-k2",
];
for (const model of specificModels) {
if (model.toLowerCase() === model) {
for (const specificModel of specificModels) {
if (model.toLowerCase() === specificModel) {
return true;
}
}
const supportedContains = ["llama-3.1"];
for (const model of supportedContains) {
if (model.toLowerCase().includes(model)) {
for (const contained of supportedContains) {
if (model.toLowerCase().includes(contained)) {
return true;
}
}
return false;
},
zAI: (model) => {
const lower = model.toLowerCase();
return lower.startsWith("glm-4") || lower.startsWith("glm-5");
},
moonshot: (model) => {
// support moonshot models
// https://platform.moonshot.ai/docs/pricing/chat#concepts
@ -426,7 +441,9 @@ export function isRecommendedAgentModel(modelName: string): boolean {
[/deepseek/, /r1|reasoner/],
[/gemini/, /2\.5/, /pro/],
[/gemini/, /3-pro/],
[/gpt/, /-5|5\.1/],
[/gpt/, /-5|5\.1|5\.2/],
[/gpt-4\.1/],
[/codex/],
[/claude/, /sonnet/, /3\.7|3-7|-4/],
[/claude/, /opus/, /-4/],
[/grok-code/],

View file

@ -1,9 +1,9 @@
---
title: "Moonshot AI"
description: "Configure Moonshot AI's language models with Continue, including setup instructions for their 8K, 32K, and 128K context window models with competitive pricing"
description: "Configure Moonshot AI's language models with Continue, including Kimi K2, Kimi K2.5, and Moonshot v1 models with competitive pricing"
---
[Moonshot AI](https://platform.moonshot.cn/) provides high-quality large language model services with competitive pricing and excellent performance.
[Moonshot AI](https://platform.moonshot.cn/) provides high-quality large language model services with competitive pricing and excellent performance, including the Kimi series of models.
## Configuration
@ -20,20 +20,20 @@ To use Moonshot AI models, you need to:
schema: v1
models:
- name: Moonshot
- name: Kimi K2
provider: moonshot
model: moonshot-v1-8k
model: kimi-k2
apiKey: <YOUR_MOONSHOT_API_KEY>
```
</Tab>
<Tab title="JSON">
<Tab title="JSON (Deprecated)">
```json title="config.json"
{
"models": [
{
"title": "Moonshot",
"title": "Kimi K2",
"provider": "moonshot",
"model": "moonshot-v1-8k",
"model": "kimi-k2",
"apiKey": "<YOUR_MOONSHOT_API_KEY>"
}
]
@ -46,6 +46,8 @@ To use Moonshot AI models, you need to:
Moonshot AI currently provides the following models:
- `kimi-k2`: Kimi K2, a powerful MoE model with 128K context window
- `kimi-k2.5`: Kimi K2.5, the latest generation with enhanced reasoning and 128K context window
- `moonshot-v1-8k`: Base model with 8K context window
- `moonshot-v1-32k`: Base model with 32K context window
- `moonshot-v1-128k`: Base model with 128K context window
@ -70,9 +72,9 @@ Here's a complete configuration example:
schema: v1
models:
- name: Moonshot-8K
- name: Kimi K2
provider: moonshot
model: moonshot-v1-8k
model: kimi-k2
apiKey: <YOUR_MOONSHOT_API_KEY>
defaultCompletionOptions:
temperature: 0.7
@ -80,14 +82,14 @@ Here's a complete configuration example:
maxTokens: 2048
```
</Tab>
<Tab title="JSON">
<Tab title="JSON (Deprecated)">
```json title="config.json"
{
"models": [
{
"title": "Moonshot-8K",
"title": "Kimi K2",
"provider": "moonshot",
"model": "moonshot-v1-8k",
"model": "kimi-k2",
"apiKey": "<YOUR_MOONSHOT_API_KEY>",
"completionOptions": {
"temperature": 0.7,

View file

@ -0,0 +1,59 @@
---
title: "Z.ai"
description: "Configure Z.ai's GLM models with Continue, including GLM-5, GLM-4.7, and GLM-4.5"
---
[Z.ai](https://z.ai/) (formerly Zhipu AI) provides the GLM family of large language models with strong multilingual capabilities.
<Info>Get an API key from the [Z.ai Platform](https://z.ai/manage-apikey/apikey-list)</Info>
## Configuration
<Tabs>
<Tab title="YAML">
```yaml title="config.yaml"
name: My Config
version: 0.0.1
schema: v1
models:
- name: GLM-5
provider: zAI
model: glm-5
apiKey: <YOUR_ZAI_API_KEY>
```
</Tab>
<Tab title="JSON (Deprecated)">
```json title="config.json"
{
"models": [
{
"title": "GLM-5",
"provider": "zAI",
"model": "glm-5",
"apiKey": "<YOUR_ZAI_API_KEY>"
}
]
}
```
</Tab>
</Tabs>
## Available Models
- `glm-5`: Flagship model with 128K context window
- `glm-4.7`: Latest generation model with 128K context window
- `glm-4-plus`: Enhanced GLM-4 model with 128K context window
- `glm-4.5`: GLM-4.5 model with 128K context window
## Configuration Options
| Option | Description | Default |
| --------- | -------------------- | -------------------------------------- |
| `apiKey` | Z.ai API key | Required |
| `apiBase` | API base URL | `https://api.z.ai/api/paas/v4/` |
| `model` | Model name to use | `glm-5` |
<Tip>
Z.ai offers a dedicated [Coding Plan](https://docs.z.ai/api-reference/introduction) with a subscription-based endpoint optimized for coding tasks. To use it, set `apiBase` to `https://api.z.ai/api/coding/paas/v4/`. This endpoint uses prompt-based pricing rather than token-based pricing and may be more cost-effective for coding workflows.
</Tip>

View file

@ -176,10 +176,12 @@
"customize/model-providers/more/llamastack",
"customize/model-providers/more/mimo",
"customize/model-providers/more/mistral",
"customize/model-providers/more/moonshot",
"customize/model-providers/more/nous",
"customize/model-providers/more/nvidia",
"customize/model-providers/more/together",
"customize/model-providers/more/xAI"
"customize/model-providers/more/xAI",
"customize/model-providers/more/zai"
]
}
]

219
gui/public/logos/zai.svg Normal file
View file

@ -0,0 +1,219 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 25.3.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 30 30" style="enable-background:new 0 0 30 30;" xml:space="preserve">
<style type="text/css">
.st0{opacity:0.3;fill:#E2E4E7;}
.st1{opacity:0.8;fill:#E2E4E7;stroke:#FFFFFF;stroke-width:5;stroke-miterlimit:10;}
.st2{fill:url(#SVGID_1_);}
.st3{fill:none;stroke:#E0E4E9;stroke-width:0.25;stroke-miterlimit:10;}
.st4{fill:none;}
.st5{fill:#9DA1A5;}
.st6{fill-rule:evenodd;clip-rule:evenodd;fill:none;}
.st7{fill-rule:evenodd;clip-rule:evenodd;fill:#DFE2E7;}
.st8{fill-rule:evenodd;clip-rule:evenodd;fill:#CDD4DA;}
.st9{fill-rule:evenodd;clip-rule:evenodd;fill:#B3BCC7;}
.st10{fill-rule:evenodd;clip-rule:evenodd;fill:#9DAAB7;}
.st11{fill-rule:evenodd;clip-rule:evenodd;fill:#8698A8;}
.st12{fill-rule:evenodd;clip-rule:evenodd;fill:url(#SVGID_2_);}
.st13{fill-rule:evenodd;clip-rule:evenodd;fill:url(#SVGID_3_);}
.st14{fill:#1F63EC;}
.st15{fill:#2D2D2D;}
.st16{fill:none;stroke:#E0E4E9;stroke-width:0.5;stroke-miterlimit:10;}
.st17{fill-rule:evenodd;clip-rule:evenodd;fill:url(#SVGID_4_);}
.st18{fill-rule:evenodd;clip-rule:evenodd;fill:url(#SVGID_5_);}
.st19{fill:none;stroke:#677380;stroke-width:0.5;stroke-miterlimit:10;}
.st20{fill:none;stroke:url(#SVGID_6_);stroke-width:2;stroke-miterlimit:10;}
.st21{fill-rule:evenodd;clip-rule:evenodd;fill:url(#SVGID_7_);}
.st22{fill-rule:evenodd;clip-rule:evenodd;fill:url(#SVGID_8_);}
.st23{fill:#FFFFFF;}
.st24{fill-rule:evenodd;clip-rule:evenodd;fill:#2D2D2D;}
.st25{clip-path:url(#SVGID_10_);}
.st26{clip-path:url(#SVGID_12_);}
.st27{fill:url(#SVGID_13_);}
.st28{fill-rule:evenodd;clip-rule:evenodd;fill:url(#SVGID_14_);}
.st29{fill-rule:evenodd;clip-rule:evenodd;fill:url(#SVGID_15_);}
.st30{clip-path:url(#SVGID_17_);}
.st31{clip-path:url(#SVGID_19_);}
.st32{fill:url(#SVGID_20_);}
.st33{fill:none;stroke:url(#SVGID_21_);stroke-width:2;stroke-miterlimit:10;}
.st34{fill-rule:evenodd;clip-rule:evenodd;fill:url(#SVGID_22_);}
.st35{fill-rule:evenodd;clip-rule:evenodd;fill:url(#SVGID_23_);}
.st36{clip-path:url(#SVGID_25_);}
.st37{clip-path:url(#SVGID_27_);}
.st38{fill:url(#SVGID_28_);}
.st39{clip-path:url(#SVGID_30_);}
.st40{clip-path:url(#SVGID_32_);}
.st41{fill:url(#SVGID_33_);}
.st42{fill-rule:evenodd;clip-rule:evenodd;fill:#126EF6;}
.st43{fill-rule:evenodd;clip-rule:evenodd;fill:#FFFFFF;}
.st44{clip-path:url(#SVGID_35_);}
.st45{clip-path:url(#SVGID_37_);}
.st46{fill:url(#SVGID_38_);}
.st47{fill-rule:evenodd;clip-rule:evenodd;fill:#9DA1A5;}
.st48{fill-rule:evenodd;clip-rule:evenodd;fill:url(#SVGID_39_);}
.st49{fill-rule:evenodd;clip-rule:evenodd;fill:url(#SVGID_40_);}
.st50{fill-rule:evenodd;clip-rule:evenodd;fill:url(#SVGID_41_);}
.st51{fill-rule:evenodd;clip-rule:evenodd;fill:url(#SVGID_42_);}
.st52{fill:none;stroke:url(#SVGID_43_);stroke-width:2;stroke-miterlimit:10;}
.st53{fill-rule:evenodd;clip-rule:evenodd;fill:none;stroke:#E0E4E9;stroke-width:0.5;stroke-miterlimit:10;}
.st54{fill-rule:evenodd;clip-rule:evenodd;fill:url(#SVGID_44_);}
.st55{fill-rule:evenodd;clip-rule:evenodd;fill:url(#SVGID_45_);}
.st56{fill-rule:evenodd;clip-rule:evenodd;fill:url(#SVGID_46_);}
.st57{fill-rule:evenodd;clip-rule:evenodd;fill:url(#SVGID_47_);}
.st58{fill-rule:evenodd;clip-rule:evenodd;fill:url(#SVGID_48_);}
.st59{fill-rule:evenodd;clip-rule:evenodd;fill:url(#SVGID_49_);}
.st60{fill-rule:evenodd;clip-rule:evenodd;fill:url(#SVGID_50_);}
.st61{fill-rule:evenodd;clip-rule:evenodd;fill:url(#SVGID_51_);}
.st62{fill-rule:evenodd;clip-rule:evenodd;fill:url(#SVGID_52_);}
.st63{fill-rule:evenodd;clip-rule:evenodd;fill:url(#SVGID_53_);}
.st64{clip-path:url(#SVGID_55_);}
.st65{clip-path:url(#SVGID_57_);}
.st66{fill:url(#SVGID_58_);}
.st67{clip-path:url(#SVGID_60_);}
.st68{clip-path:url(#SVGID_62_);}
.st69{fill:url(#SVGID_63_);}
.st70{fill:none;stroke:url(#SVGID_64_);stroke-width:2;stroke-miterlimit:10;}
.st71{clip-path:url(#SVGID_66_);}
.st72{clip-path:url(#SVGID_68_);}
.st73{fill:url(#SVGID_69_);}
.st74{clip-path:url(#SVGID_71_);}
.st75{clip-path:url(#SVGID_73_);}
.st76{fill:url(#SVGID_74_);}
.st77{clip-path:url(#SVGID_76_);}
.st78{clip-path:url(#SVGID_78_);}
.st79{fill:url(#SVGID_79_);}
.st80{fill-rule:evenodd;clip-rule:evenodd;fill:url(#SVGID_80_);}
.st81{fill-rule:evenodd;clip-rule:evenodd;fill:url(#SVGID_81_);}
.st82{clip-path:url(#SVGID_83_);}
.st83{clip-path:url(#SVGID_85_);}
.st84{fill:url(#SVGID_86_);}
.st85{fill-rule:evenodd;clip-rule:evenodd;fill:url(#SVGID_87_);}
.st86{fill-rule:evenodd;clip-rule:evenodd;fill:url(#SVGID_88_);}
.st87{clip-path:url(#SVGID_90_);}
.st88{clip-path:url(#SVGID_92_);}
.st89{fill:url(#SVGID_93_);}
.st90{fill:none;stroke:url(#SVGID_94_);stroke-width:2;stroke-miterlimit:10;}
.st91{fill-rule:evenodd;clip-rule:evenodd;fill:url(#SVGID_95_);}
.st92{fill-rule:evenodd;clip-rule:evenodd;fill:url(#SVGID_96_);}
.st93{clip-path:url(#SVGID_98_);}
.st94{clip-path:url(#SVGID_100_);}
.st95{fill:url(#SVGID_101_);}
.st96{clip-path:url(#SVGID_103_);}
.st97{clip-path:url(#SVGID_105_);}
.st98{fill:url(#SVGID_106_);}
.st99{clip-path:url(#SVGID_108_);}
.st100{clip-path:url(#SVGID_110_);}
.st101{fill:url(#SVGID_111_);}
.st102{fill:#FFFFFF;stroke:#B3BCC7;stroke-width:0.275;stroke-miterlimit:10;}
.st103{clip-path:url(#SVGID_113_);}
.st104{fill:#FDD138;}
.st105{fill:#FCA62F;}
.st106{fill:#FB7927;}
.st107{fill:#F44B22;}
.st108{fill:#D81915;}
.st109{fill:#2D2D2D;stroke:#FFFFFF;stroke-width:0.3354;stroke-miterlimit:10;}
.st110{fill:none;stroke:#65727F;stroke-width:2;stroke-miterlimit:10;}
.st111{fill:none;stroke:#65727F;stroke-width:0.75;stroke-miterlimit:10;}
.st112{fill:url(#SVGID_114_);}
.st113{fill:#D06C50;}
.st114{fill:#2D2D2D;stroke:#B3BCC7;stroke-width:0.275;stroke-miterlimit:10;}
.st115{opacity:0.2;}
.st116{fill:none;stroke:#677380;stroke-width:0.3564;stroke-miterlimit:10;}
.st117{fill:none;stroke:#677380;stroke-width:0.3564;stroke-miterlimit:10;stroke-dasharray:1.0212,1.0212;}
.st118{fill:none;stroke:#677380;stroke-width:0.3564;stroke-miterlimit:10;stroke-dasharray:1.0205,1.0205;}
.st119{opacity:0.2;fill:none;}
.st120{fill:none;stroke:#677380;stroke-width:0.3689;stroke-miterlimit:10;}
.st121{fill:none;stroke:#677380;stroke-width:0.3689;stroke-miterlimit:10;stroke-dasharray:1.0509,1.0509;}
.st122{opacity:0.3;fill:#1F63EC;}
.st123{fill:#2D2D2D;stroke:#FFFFFF;stroke-width:0.3162;stroke-miterlimit:10;}
.st124{fill:#FFFFFF;stroke:#B3BCC7;stroke-width:0.3162;stroke-miterlimit:10;}
.st125{clip-path:url(#SVGID_118_);}
.st126{fill:url(#SVGID_119_);}
.st127{fill:none;stroke:#DFE2E7;stroke-width:0.75;stroke-miterlimit:10;}
.st128{fill:#9DA1A5;stroke:#FFFFFF;stroke-miterlimit:10;}
.st129{fill:url(#SVGID_120_);}
.st130{fill:none;stroke:#677380;stroke-width:0.75;stroke-miterlimit:10;}
.st131{opacity:0.4;}
.st132{clip-path:url(#SVGID_122_);}
.st133{clip-path:url(#SVGID_124_);}
.st134{fill:url(#SVGID_125_);}
.st135{fill:none;stroke:#8392A3;stroke-width:0.35;stroke-miterlimit:10;}
.st136{fill:none;stroke:#8392A3;stroke-width:0.35;stroke-miterlimit:10;stroke-dasharray:0.9951,0.9951;}
.st137{fill:none;stroke:#8392A3;stroke-width:0.35;stroke-miterlimit:10;stroke-dasharray:1.004,1.004;}
.st138{fill:none;stroke:url(#SVGID_126_);stroke-width:1.5;stroke-miterlimit:10;}
.st139{fill:url(#SVGID_127_);}
.st140{fill:none;stroke:#DDE0E4;stroke-width:0.35;stroke-miterlimit:10;}
.st141{fill:#2D2D2D;stroke:#A9B3BE;stroke-width:0.275;stroke-miterlimit:10;}
.st142{fill-rule:evenodd;clip-rule:evenodd;fill:#126EF4;}
.st143{fill:#FFFFFF;stroke:#B1BAC4;stroke-width:0.275;stroke-miterlimit:10;}
.st144{fill:#CE6C50;}
.st145{fill:#5B5B5B;}
.st146{fill:#8392A3;}
.st147{fill:none;stroke:url(#SVGID_128_);stroke-width:1.5;stroke-miterlimit:10;}
.st148{fill:url(#SVGID_129_);}
.st149{fill:none;stroke:#B5BDC4;stroke-width:0.7;stroke-miterlimit:10;}
.st150{opacity:0.6;fill:none;stroke:#78838E;stroke-width:0.35;stroke-miterlimit:10;}
.st151{opacity:0.2;fill:none;stroke:#8392A3;stroke-width:0.35;stroke-miterlimit:10;stroke-dasharray:1,1;}
.st152{fill:none;stroke:#DDE0E4;stroke-width:0.75;stroke-miterlimit:10;}
.st153{fill:none;stroke:#8392A3;stroke-width:0.5;stroke-miterlimit:10;}
.st154{opacity:0.2;fill:none;stroke:#677380;stroke-width:0.3564;stroke-miterlimit:10;stroke-dasharray:1.0182,1.0182;}
.st155{fill:none;stroke:#DDE0E4;stroke-width:0.765;stroke-miterlimit:10;}
.st156{fill:url(#SVGID_130_);}
.st157{fill:url(#SVGID_131_);}
.st158{fill:#B1BAC4;}
.st159{fill:#CBD1D8;}
.st160{fill:#0B1B2B;}
.st161{fill:#91D119;}
.st162{opacity:0.7;}
.st163{fill:#FFFFFF;stroke:#000000;stroke-width:0.4418;stroke-miterlimit:10;}
.st164{fill:none;stroke:#939CAA;stroke-width:0.2209;stroke-miterlimit:10;}
.st165{fill:none;stroke:#FFFFFF;stroke-width:3.0924;stroke-miterlimit:10;}
.st166{fill:url(#SVGID_132_);}
.st167{fill:none;stroke:url(#SVGID_133_);stroke-width:1.714;stroke-miterlimit:10;}
.st168{fill:url(#SVGID_134_);}
.st169{fill:url(#SVGID_135_);}
.st170{fill:url(#SVGID_136_);}
.st171{fill:url(#SVGID_137_);}
.st172{fill:url(#SVGID_138_);}
.st173{fill:url(#SVGID_139_);}
.st174{fill:url(#SVGID_140_);}
.st175{fill:url(#SVGID_141_);}
.st176{fill:url(#SVGID_142_);}
.st177{fill:url(#SVGID_143_);}
.st178{fill:url(#SVGID_144_);}
.st179{fill:none;stroke:#1F63EC;stroke-width:4;stroke-miterlimit:10;}
.st180{fill:none;stroke:#0B1B2B;stroke-width:4;stroke-miterlimit:10;}
.st181{fill:none;stroke:#677380;stroke-width:0.3989;stroke-miterlimit:10;}
.st182{fill:none;stroke:#677380;stroke-width:0.3989;stroke-miterlimit:10;stroke-dasharray:1.14,1.14;}
.st183{fill:#257AF1;}
.st184{opacity:0.3;fill:#FFFFFF;}
.st185{fill:none;stroke:#98A5B2;stroke-width:4;stroke-miterlimit:10;}
.st186{fill:none;stroke:#65727F;stroke-width:0.3989;stroke-miterlimit:10;}
.st187{fill:none;stroke:#65727F;stroke-width:0.3989;stroke-miterlimit:10;stroke-dasharray:1.14,1.14;}
.st188{fill:none;stroke:#DDDFE4;stroke-width:0.75;stroke-miterlimit:10;}
.st189{fill:#9A9EA2;}
.st190{fill-rule:evenodd;clip-rule:evenodd;fill:#3267AC;}
.st191{fill:#FFFFFF;stroke:#AFB8C3;stroke-width:0.275;stroke-miterlimit:10;}
.st192{fill:#C5694E;}
.st193{fill:#8192A2;}
.st194{fill:#2D2D2D;stroke:#FFFFFF;stroke-width:0.6317;stroke-miterlimit:10;}
</style>
<g id="图层_2">
</g>
<g id="图层_1">
<path class="st194" d="M24.51,28.51H5.49c-2.21,0-4-1.79-4-4V5.49c0-2.21,1.79-4,4-4h19.03c2.21,0,4,1.79,4,4v19.03
C28.51,26.72,26.72,28.51,24.51,28.51z"/>
<g>
<g>
<g>
<g>
<path class="st23" d="M15.47,7.1l-1.3,1.85c-0.2,0.29-0.54,0.47-0.9,0.47h-7.1V7.09C6.16,7.1,15.47,7.1,15.47,7.1z"/>
<polygon class="st23" points="24.3,7.1 13.14,22.91 5.7,22.91 16.86,7.1 "/>
<path class="st23" d="M14.53,22.91l1.31-1.86c0.2-0.29,0.54-0.47,0.9-0.47h7.09v2.33H14.53z"/>
</g>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 11 KiB

View file

@ -496,6 +496,73 @@ export const models: { [key: string]: ModelPackage } = {
providerOptions: ["moonshot"],
isOpenSource: false,
},
kimiK2: {
title: "Kimi K2",
description:
"Moonshot AI's Kimi K2, a powerful MoE model with strong coding and tool-use capabilities",
refUrl: "https://platform.moonshot.cn/",
params: {
title: "Kimi K2",
model: "kimi-k2",
contextLength: 128000,
},
icon: "moonshot.png",
providerOptions: ["moonshot"],
isOpenSource: false,
},
kimiK25: {
title: "Kimi K2.5",
description:
"Moonshot AI's Kimi K2.5, the latest generation model with enhanced reasoning",
refUrl: "https://platform.moonshot.cn/",
params: {
title: "Kimi K2.5",
model: "kimi-k2.5",
contextLength: 128000,
},
icon: "moonshot.png",
providerOptions: ["moonshot"],
isOpenSource: false,
},
glm5: {
title: "GLM-5",
description: "Z.ai's flagship GLM-5 model with 128k context",
refUrl: "https://z.ai/model-api",
params: {
title: "GLM-5",
model: "glm-5",
contextLength: 128000,
},
icon: "zai.svg",
providerOptions: ["zAI"],
isOpenSource: false,
},
glm47: {
title: "GLM-4.7",
description: "Z.ai's latest GLM-4.7 model with 128k context",
refUrl: "https://z.ai/model-api",
params: {
title: "GLM-4.7",
model: "glm-4.7",
contextLength: 128000,
},
icon: "zai.svg",
providerOptions: ["zAI"],
isOpenSource: false,
},
glm45: {
title: "GLM-4.5",
description: "Z.ai's GLM-4.5 model with 128k context",
refUrl: "https://z.ai/model-api",
params: {
title: "GLM-4.5",
model: "glm-4.5",
contextLength: 128000,
},
icon: "zai.svg",
providerOptions: ["zAI"],
isOpenSource: false,
},
mistralOs: {
title: "Mistral",
description:
@ -2181,6 +2248,218 @@ export const models: { [key: string]: ModelPackage } = {
providerOptions: ["xAI"],
isOpenSource: false,
},
gpt41: {
title: "GPT-4.1",
description:
"OpenAI's current flagship model with 1M token context window.",
params: {
model: "gpt-4.1",
contextLength: 1_047_576,
title: "GPT-4.1",
},
providerOptions: ["openai"],
icon: "openai.png",
isOpenSource: false,
},
gpt41Mini: {
title: "GPT-4.1 Mini",
description: "Cost-effective GPT-4.1 variant with 1M context window.",
params: {
model: "gpt-4.1-mini",
contextLength: 1_047_576,
title: "GPT-4.1 Mini",
},
providerOptions: ["openai"],
icon: "openai.png",
isOpenSource: false,
},
gpt5Mini: {
title: "GPT-5 Mini",
description: "Smaller GPT-5 variant with reasoning capabilities.",
params: {
model: "gpt-5-mini",
contextLength: 400_000,
title: "GPT-5 Mini",
},
providerOptions: ["openai"],
icon: "openai.png",
isOpenSource: false,
},
gpt5_2: {
title: "GPT-5.2",
description: "OpenAI's latest generation model with advanced reasoning.",
params: {
model: "gpt-5.2",
contextLength: 400_000,
title: "GPT-5.2",
},
providerOptions: ["openai"],
icon: "openai.png",
isOpenSource: false,
},
codexMini: {
title: "Codex Mini",
description:
"OpenAI's code-focused reasoning model optimized for programming tasks.",
params: {
model: "codex-mini-latest",
contextLength: 200_000,
title: "Codex Mini",
},
providerOptions: ["openai"],
icon: "openai.png",
isOpenSource: false,
},
o3: {
title: "o3",
description: "OpenAI's full o3 reasoning model for complex tasks.",
params: {
model: "o3",
contextLength: 200_000,
title: "o3",
},
providerOptions: ["openai"],
icon: "openai.png",
isOpenSource: false,
},
o4Mini: {
title: "o4 Mini",
description:
"OpenAI's latest o-series reasoning model, compact and efficient.",
params: {
model: "o4-mini",
contextLength: 200_000,
title: "o4 Mini",
},
providerOptions: ["openai"],
icon: "openai.png",
isOpenSource: false,
},
gemini25Flash: {
title: "Gemini 2.5 Flash",
description:
"Google's fast, token-efficient model with reasoning and 1M context.",
params: {
title: "Gemini 2.5 Flash",
model: "gemini-2.5-flash",
contextLength: 1_048_576,
apiKey: "<API_KEY>",
},
icon: "gemini.png",
providerOptions: ["gemini"],
isOpenSource: false,
},
gemini25FlashLite: {
title: "Gemini 2.5 Flash Lite",
description: "Lightweight Gemini model optimized for low-latency tasks.",
params: {
title: "Gemini 2.5 Flash Lite",
model: "gemini-2.5-flash-lite",
contextLength: 1_048_576,
apiKey: "<API_KEY>",
},
icon: "gemini.png",
providerOptions: ["gemini"],
isOpenSource: false,
},
gemini3FlashPreview: {
title: "Gemini 3 Flash Preview",
description: "Google's next-generation Flash model with strong reasoning.",
params: {
title: "Gemini 3 Flash Preview",
model: "gemini-3-flash-preview",
contextLength: 1_048_576,
apiKey: "<API_KEY>",
},
icon: "gemini.png",
providerOptions: ["gemini"],
isOpenSource: false,
},
devstralSmall: {
title: "Devstral Small",
description: "Mistral's small code-focused model for development tasks.",
params: {
title: "Devstral Small",
model: "devstral-small-2505",
contextLength: 128_000,
},
icon: "mistral.png",
providerOptions: ["mistral"],
isOpenSource: false,
},
devstralMedium: {
title: "Devstral Medium",
description:
"Mistral's medium-sized code-focused model with extended context.",
params: {
title: "Devstral Medium",
model: "devstral-medium-latest",
contextLength: 262_144,
},
icon: "mistral.png",
providerOptions: ["mistral"],
isOpenSource: false,
},
magistralMedium: {
title: "Magistral Medium",
description: "Mistral's reasoning model for complex step-by-step tasks.",
params: {
title: "Magistral Medium",
model: "magistral-medium-latest",
contextLength: 128_000,
},
icon: "mistral.png",
providerOptions: ["mistral"],
isOpenSource: false,
},
ministral8b: {
title: "Ministral 8B",
description: "Mistral's small model balancing capability and efficiency.",
params: {
title: "Ministral 8B",
model: "ministral-8b-latest",
contextLength: 128_000,
},
icon: "mistral.png",
providerOptions: ["mistral"],
isOpenSource: false,
},
grok4Fast: {
title: "Grok 4 Fast",
description: "xAI's fast Grok 4 model with 2M context window.",
params: {
title: "Grok 4 Fast",
model: "grok-4-fast",
contextLength: 2_000_000,
},
icon: "xAI.png",
providerOptions: ["xAI"],
isOpenSource: false,
},
grok41Fast: {
title: "Grok 4.1 Fast",
description: "xAI's upgraded fast model with 2M context window.",
params: {
title: "Grok 4.1 Fast",
model: "grok-4-1-fast",
contextLength: 2_000_000,
},
icon: "xAI.png",
providerOptions: ["xAI"],
isOpenSource: false,
},
grok3Fast: {
title: "Grok 3 Fast",
description: "Fast variant of Grok 3 for efficient inference.",
params: {
title: "Grok 3 Fast",
model: "grok-3-fast",
contextLength: 131_072,
},
icon: "xAI.png",
providerOptions: ["xAI"],
isOpenSource: false,
},
gemma2_2b: {
title: "Gemma 2 2b IT",
description:

View file

@ -152,9 +152,16 @@ export const providers: Partial<Record<string, ProviderInfo>> = {
icon: "openai.png",
tags: [ModelProviderTags.RequiresApiKey],
packages: [
models.gpt5,
models.gpt5_2,
models.gpt5_1,
models.gpt5,
models.gpt5Mini,
models.gpt5Codex,
models.gpt41,
models.gpt41Mini,
models.codexMini,
models.o3,
models.o4Mini,
models.gpt4o,
models.gpt4omini,
models.gpt4turbo,
@ -246,7 +253,7 @@ export const providers: Partial<Record<string, ProviderInfo>> = {
tags: [ModelProviderTags.RequiresApiKey],
refPage: "moonshot",
apiKeyUrl: "https://docs.moonshot.cn/docs/getting-started",
packages: [models.moonshotChat],
packages: [models.kimiK2, models.kimiK25, models.moonshotChat],
collectInputFor: [
{
inputType: "text",
@ -258,6 +265,27 @@ export const providers: Partial<Record<string, ProviderInfo>> = {
...completionParamsInputsConfigs,
],
},
zAI: {
title: "Z.ai",
provider: "zAI",
description: "Use Z.ai's GLM models for chat and coding tasks",
longDescription:
"Z.ai (formerly Zhipu AI) provides the GLM family of large language models. Get your API key from the [Z.ai platform](https://z.ai/manage-apikey/apikey-list).",
icon: "zai.svg",
tags: [ModelProviderTags.RequiresApiKey],
packages: [models.glm5, models.glm47, models.glm45],
collectInputFor: [
{
inputType: "text",
key: "apiKey",
label: "API Key",
placeholder: "Enter your Z.ai API key",
required: true,
},
...completionParamsInputsConfigs,
],
apiKeyUrl: "https://z.ai/manage-apikey/apikey-list",
},
"function-network": {
title: "Function Network",
provider: "function-network",
@ -423,6 +451,10 @@ Select the \`GPT-4o\` model below to complete your provider configuration, but n
...completionParamsInputsConfigs,
],
packages: [
models.devstralMedium,
models.devstralSmall,
models.magistralMedium,
models.ministral8b,
models.codestral,
models.codestralMamba,
models.mistralLarge,
@ -689,10 +721,11 @@ Select the \`GPT-4o\` model below to complete your provider configuration, but n
},
],
packages: [
models.gemini20Flash,
models.gemini20FlashLite,
models.gemini20FlashImageGeneration,
models.gemini3ProPreview,
models.gemini3FlashPreview,
models.gemini25Pro,
models.gemini25Flash,
models.gemini25FlashLite,
],
apiKeyUrl: "https://aistudio.google.com/app/apikey",
},
@ -716,12 +749,15 @@ Select the \`GPT-4o\` model below to complete your provider configuration, but n
],
packages: [
models.grokCodeFast1,
models.grok4Fast,
models.grok4FastReasoning,
models.grok4FastNonReasoning,
models.grok41Fast,
models.grok41FastReasoning,
models.grok41FastNonReasoning,
models.grok4,
models.grok3,
models.grok3Fast,
models.grok3Mini,
],
apiKeyUrl: "https://console.x.ai/",

View file

@ -10,6 +10,7 @@ import { OpenAi } from "./providers/openai.js";
import { Vllm } from "./providers/vllm.js";
import { Voyage } from "./providers/voyage.js";
import { xAI } from "./providers/xAI.js";
import { zAI } from "./providers/zai.js";
import { LlmInfoWithProvider, ModelProvider, UseCase } from "./types.js";
export const allModelProviders: ModelProvider[] = [
@ -25,6 +26,7 @@ export const allModelProviders: ModelProvider[] = [
Cohere,
CometAPI,
xAI,
zAI,
];
export const allLlms: LlmInfoWithProvider[] = allModelProviders.flatMap(

View file

@ -3,22 +3,64 @@ import { ModelProvider } from "../types.js";
export const Bedrock: ModelProvider = {
models: [
{
model: "anthropic.claude-3-5-sonnet-20240620-v1:0",
displayName: "Claude 3.5 Sonnet",
model: "anthropic.claude-sonnet-4-5-20250929-v1:0",
displayName: "Claude Sonnet 4.5",
contextLength: 200000,
maxCompletionTokens: 64000,
},
{
model: "anthropic.claude-opus-4-6-v1",
displayName: "Claude Opus 4.6",
contextLength: 1000000,
maxCompletionTokens: 128000,
},
{
model: "anthropic.claude-haiku-4-5-20251001-v1:0",
displayName: "Claude Haiku 4.5",
contextLength: 200000,
maxCompletionTokens: 64000,
},
{
model: "amazon.nova-pro-v1:0",
displayName: "Amazon Nova Pro",
contextLength: 300000,
maxCompletionTokens: 8192,
},
{
model: "meta.llama3-1-405b-instruct-v1:0",
displayName: "Llama 3.1 405B",
model: "amazon.nova-lite-v1:0",
displayName: "Amazon Nova Lite",
contextLength: 300000,
maxCompletionTokens: 8192,
},
{
model: "meta.llama3-2-90b-instruct-v1:0",
displayName: "Llama 3.2 90B",
model: "amazon.nova-micro-v1:0",
displayName: "Amazon Nova Micro",
contextLength: 128000,
maxCompletionTokens: 8192,
},
{
model: "mistral.mistral-large-2407-v1:0",
displayName: "Mistral Large 2",
model: "meta.llama4-maverick-17b-instruct-v1:0",
displayName: "Llama 4 Maverick 17B",
contextLength: 1000000,
maxCompletionTokens: 16384,
},
{
model: "deepseek.r1-v1:0",
displayName: "DeepSeek R1",
contextLength: 128000,
maxCompletionTokens: 32768,
},
{
model: "deepseek.v3-v1:0",
displayName: "DeepSeek V3",
contextLength: 163840,
maxCompletionTokens: 81920,
},
{
model: "deepseek.v3.2-v1:0",
displayName: "DeepSeek V3.2",
contextLength: 163840,
maxCompletionTokens: 81920,
},
],
id: "bedrock",

View file

@ -14,6 +14,28 @@ export const Gemini: ModelProvider = {
regex: /gemini-3-pro-preview/i,
recommendedFor: ["chat"],
},
{
model: "gemini-3-flash-preview",
displayName: "Gemini 3 Flash Preview",
description:
"Next-generation Flash model with strong reasoning and fast inference.",
contextLength: 1048576,
maxCompletionTokens: 65536,
mediaTypes: AllMediaTypes,
regex: /gemini-3-flash-preview/i,
recommendedFor: ["chat"],
},
{
model: "gemini-2.5-pro",
displayName: "Gemini 2.5 Pro",
description:
"Google's advanced model with strong reasoning, multimodal capabilities, and advanced coding skills",
contextLength: 1048576,
maxCompletionTokens: 65536,
mediaTypes: AllMediaTypes,
regex: /^gemini-2\.5-pro$/i,
recommendedFor: ["chat"],
},
{
model: "gemini-2.5-pro-preview-05-06",
displayName: "Gemini 2.5 Pro Preview",
@ -25,7 +47,17 @@ export const Gemini: ModelProvider = {
regex: /gemini-2\.5-pro-preview/i,
recommendedFor: ["chat"],
},
{
model: "gemini-2.5-flash",
displayName: "Gemini 2.5 Flash",
description:
"Fast, token-efficient multimodal model for complex tasks with 1M context window",
contextLength: 1048576,
maxCompletionTokens: 65536,
mediaTypes: AllMediaTypes,
regex: /^gemini-2\.5-flash$/i,
recommendedFor: ["chat"],
},
{
model: "gemini-2.5-flash-preview-05-20",
displayName: "Gemini 2.5 Flash Preview",
@ -37,6 +69,17 @@ export const Gemini: ModelProvider = {
regex: /gemini-2\.5-flash-preview/i,
recommendedFor: ["chat"],
},
{
model: "gemini-2.5-flash-lite",
displayName: "Gemini 2.5 Flash Lite",
description:
"Lightweight, fast model optimized for low-latency tasks with 1M context window",
contextLength: 1048576,
maxCompletionTokens: 65536,
mediaTypes: AllMediaTypes,
regex: /gemini-2\.5-flash-lite/i,
recommendedFor: ["chat"],
},
{
model: "gemini-2.0-flash", // stable gemini-2.0-flash-001
displayName: "Gemini 2.0 Flash",

View file

@ -60,6 +60,89 @@ export const Mistral: ModelProvider = {
regex: /mistral-embed/i,
recommendedFor: ["embed"],
},
// devstral family
{
model: "devstral-small-2505",
displayName: "Devstral Small",
contextLength: 128000,
maxCompletionTokens: 128000,
description:
"A small code-focused model from Mistral AI, optimized for development tasks.",
regex: /devstral-small/i,
recommendedFor: ["chat"],
},
{
model: "devstral-medium-latest",
displayName: "Devstral Medium",
contextLength: 262144,
maxCompletionTokens: 262144,
description:
"A medium-sized code-focused model from Mistral AI with extended context.",
regex: /devstral-medium/i,
recommendedFor: ["chat"],
},
{
model: "devstral-2512",
displayName: "Devstral",
contextLength: 262144,
maxCompletionTokens: 262144,
description:
"The latest devstral model from Mistral AI for code generation.",
regex: /^devstral-2512$/i,
recommendedFor: ["chat"],
},
// magistral family
{
model: "magistral-medium-latest",
displayName: "Magistral Medium",
contextLength: 128000,
maxCompletionTokens: 16384,
description:
"Mistral's reasoning model for complex tasks requiring step-by-step thinking.",
regex: /magistral-medium/i,
recommendedFor: ["chat"],
},
{
model: "magistral-small",
displayName: "Magistral Small",
contextLength: 128000,
maxCompletionTokens: 128000,
description:
"A smaller reasoning model from Mistral AI for efficient step-by-step thinking.",
regex: /magistral-small/i,
recommendedFor: ["chat"],
},
// ministral family
{
model: "ministral-3b-latest",
displayName: "Ministral 3B",
contextLength: 128000,
maxCompletionTokens: 128000,
description:
"Mistral's tiny model for lightweight tasks and edge deployments.",
regex: /ministral-3b/i,
recommendedFor: ["chat"],
},
{
model: "ministral-8b-latest",
displayName: "Ministral 8B",
contextLength: 128000,
maxCompletionTokens: 128000,
description: "Mistral's small model balancing capability and efficiency.",
regex: /ministral-8b/i,
recommendedFor: ["chat"],
},
// mistral-nemo
{
model: "mistral-nemo",
displayName: "Mistral Nemo",
contextLength: 128000,
maxCompletionTokens: 128000,
description:
"An open-weight model from Mistral AI and NVIDIA with strong performance.",
regex: /mistral-nemo/i,
recommendedFor: ["chat"],
},
{
model: "codestral-mamba-latest",
displayName: "Codestral Mamba",

View file

@ -100,6 +100,90 @@ export const OpenAi: ModelProvider = {
regex: /^gpt-5\.1$/,
recommendedFor: ["chat"],
},
// gpt-4.1
{
model: "gpt-4.1",
displayName: "GPT-4.1",
contextLength: 1047576,
maxCompletionTokens: 32768,
regex: /^gpt-4\.1$/,
recommendedFor: ["chat"],
},
{
model: "gpt-4.1-mini",
displayName: "GPT-4.1 Mini",
contextLength: 1047576,
maxCompletionTokens: 32768,
regex: /gpt-4\.1-mini/,
recommendedFor: ["chat"],
},
{
model: "gpt-4.1-nano",
displayName: "GPT-4.1 Nano",
contextLength: 1047576,
maxCompletionTokens: 32768,
regex: /gpt-4\.1-nano/,
recommendedFor: ["chat"],
},
// gpt-5 variants
{
model: "gpt-5-mini",
displayName: "GPT-5 Mini",
contextLength: 400000,
maxCompletionTokens: 128000,
regex: /gpt-5-mini/,
recommendedFor: ["chat"],
},
{
model: "gpt-5-pro",
displayName: "GPT-5 Pro",
contextLength: 400000,
maxCompletionTokens: 272000,
regex: /gpt-5-pro/,
recommendedFor: ["chat"],
},
{
model: "gpt-5.2",
displayName: "GPT-5.2",
contextLength: 400000,
maxCompletionTokens: 128000,
regex: /^gpt-5\.2$/,
recommendedFor: ["chat"],
},
// codex
{
model: "codex-mini-latest",
displayName: "Codex Mini",
contextLength: 200000,
maxCompletionTokens: 100000,
regex: /codex-mini/,
recommendedFor: ["chat"],
},
// o-series
{
model: "o1",
displayName: "o1",
contextLength: 200000,
maxCompletionTokens: 100000,
regex: /^o1$/,
recommendedFor: ["chat"],
},
{
model: "o3",
displayName: "o3",
contextLength: 200000,
maxCompletionTokens: 100000,
regex: /^o3$/,
recommendedFor: ["chat"],
},
{
model: "o4-mini",
displayName: "o4 Mini",
contextLength: 200000,
maxCompletionTokens: 100000,
regex: /o4-mini/,
recommendedFor: ["chat"],
},
// gpt-4o
{
model: "gpt-4o",

View file

@ -29,7 +29,23 @@ export const xAI: ModelProvider = {
displayName: "Grok 3",
contextLength: 131072,
recommendedFor: ["chat"],
regex: /grok-3/,
regex: /^grok-3$/,
},
{
model: "grok-3-fast",
displayName: "Grok 3 Fast",
contextLength: 131072,
maxCompletionTokens: 8192,
recommendedFor: ["chat"],
regex: /grok-3-fast/,
},
{
model: "grok-4-fast",
displayName: "Grok 4 Fast",
contextLength: 2000000,
maxCompletionTokens: 30000,
recommendedFor: ["chat"],
regex: /^grok-4-fast$/,
},
{
model: "grok-4-fast-reasoning",
@ -54,6 +70,14 @@ export const xAI: ModelProvider = {
recommendedFor: ["chat"],
regex: /^grok-4$/,
},
{
model: "grok-4-1-fast",
displayName: "Grok 4.1 Fast",
contextLength: 2000000,
maxCompletionTokens: 30000,
recommendedFor: ["chat"],
regex: /^grok-4-1-fast$/,
},
{
model: "grok-4-1-fast-reasoning",
displayName: "Grok 4.1 Fast Reasoning",

View file

@ -0,0 +1,36 @@
import { ModelProvider } from "../types.js";
export const zAI: ModelProvider = {
models: [
{
model: "glm-5",
displayName: "GLM-5",
contextLength: 128000,
recommendedFor: ["chat"],
regex: /glm-5/,
},
{
model: "glm-4.7",
displayName: "GLM-4.7",
contextLength: 128000,
recommendedFor: ["chat"],
regex: /glm-4\.7/,
},
{
model: "glm-4-plus",
displayName: "GLM-4 Plus",
contextLength: 128000,
recommendedFor: ["chat"],
regex: /glm-4-plus/,
},
{
model: "glm-4.5",
displayName: "GLM-4.5",
contextLength: 128000,
recommendedFor: ["chat"],
regex: /glm-4\.5/,
},
],
id: "zAI",
displayName: "Z.ai",
};

View file

@ -101,6 +101,8 @@ export function constructLlmApi(config: LLMConfig): BaseLlmApi | undefined {
return new ContinueProxyApi(config);
case "xAI":
return openAICompatible("https://api.x.ai/v1/", config);
case "zAI":
return openAICompatible("https://api.z.ai/api/paas/v4/", config);
case "voyage":
return openAICompatible("https://api.voyageai.com/v1/", config);
case "mistral":

View file

@ -55,6 +55,7 @@ export const OpenAIConfigSchema = BasePlusConfig.extend({
z.literal("text-gen-webui"),
z.literal("vllm"),
z.literal("xAI"),
z.literal("zAI"),
z.literal("scaleway"),
z.literal("ncompass"),
z.literal("relace"),