From 6ff4b116883df8168dac147ab77b55f606775eea Mon Sep 17 00:00:00 2001 From: Guillaume Gay Date: Wed, 12 Aug 2026 04:37:18 +0000 Subject: [PATCH] feat: add mistral/zai-glm-5-2 --- models/mistral/zai-glm-5-2.yaml | 85 +++++++++++++ packages/modelparams/src/generated/data.ts | 115 ++++++++++++++++++ .../modelparams/src/generated/defaults.ts | 7 ++ .../modelparams/src/generated/model-ids.ts | 1 + .../modelparams/src/generated/params-by-id.ts | 12 ++ 5 files changed, 220 insertions(+) create mode 100644 models/mistral/zai-glm-5-2.yaml diff --git a/models/mistral/zai-glm-5-2.yaml b/models/mistral/zai-glm-5-2.yaml new file mode 100644 index 0000000..23f67b7 --- /dev/null +++ b/models/mistral/zai-glm-5-2.yaml @@ -0,0 +1,85 @@ +# yaml-language-server: $schema=https://modelparams.dev/api/v1/schema.json +provider: mistral +authType: api_key +model: zai-glm-5-2 +params: + - path: max_tokens + type: integer + label: Max tokens + description: Maximum number of tokens to generate in the completion. + range: + min: 1 + group: generation_length + - path: stop + type: string + label: Stop sequence + description: Stops generation when this string is detected. + group: generation_length + - path: temperature + type: number + label: Temperature + description: Controls randomness. Lower values make outputs more focused; higher values make them more varied. + range: + min: 0 + max: 1.5 + step: 0.1 + group: sampling + - path: top_p + type: number + label: Top P + description: Controls nucleus sampling by limiting generation to tokens within the selected cumulative probability. + default: 1 + range: + min: 0 + max: 1 + step: 0.01 + group: sampling + - path: random_seed + type: integer + label: Random seed + description: Seed used for deterministic sampling when reproducible outputs are desired. + range: + min: 0 + group: sampling + - path: presence_penalty + type: number + label: Presence penalty + description: Penalizes repeated words or phrases to encourage a wider variety of generated content. + default: 0 + range: + min: -2 + max: 2 + step: 0.1 + group: sampling + - path: frequency_penalty + type: number + label: Frequency penalty + description: Penalizes words based on how often they already appear in the generated text. + default: 0 + range: + min: -2 + max: 2 + step: 0.1 + group: sampling + - path: prompt_mode + type: enum + label: Prompt mode + description: Enables Mistral's reasoning system prompt; leave unset to disable the default reasoning behavior. + values: + - reasoning + group: reasoning + - path: response_format.type + type: enum + label: Response format + description: Controls whether the model returns normal text or JSON mode output. + default: text + values: + - text + - json_object + group: output_format + - path: safe_prompt + type: boolean + label: Safe prompt + description: Controls whether Mistral injects its safety prompt before the conversation. + default: false + group: provider_metadata diff --git a/packages/modelparams/src/generated/data.ts b/packages/modelparams/src/generated/data.ts index a4b02f8..5959f9c 100644 --- a/packages/modelparams/src/generated/data.ts +++ b/packages/modelparams/src/generated/data.ts @@ -11300,6 +11300,121 @@ export const CATALOG = [ } ] }, + { + "provider": "mistral", + "authType": "api_key", + "model": "zai-glm-5-2", + "params": [ + { + "path": "max_tokens", + "label": "Max tokens", + "description": "Maximum number of tokens to generate in the completion.", + "group": "generation_length", + "type": "integer", + "range": { + "min": 1 + } + }, + { + "path": "stop", + "label": "Stop sequence", + "description": "Stops generation when this string is detected.", + "group": "generation_length", + "type": "string" + }, + { + "path": "temperature", + "label": "Temperature", + "description": "Controls randomness. Lower values make outputs more focused; higher values make them more varied.", + "group": "sampling", + "type": "number", + "range": { + "min": 0, + "max": 1.5, + "step": 0.1 + } + }, + { + "path": "top_p", + "label": "Top P", + "description": "Controls nucleus sampling by limiting generation to tokens within the selected cumulative probability.", + "group": "sampling", + "type": "number", + "default": 1, + "range": { + "min": 0, + "max": 1, + "step": 0.01 + } + }, + { + "path": "random_seed", + "label": "Random seed", + "description": "Seed used for deterministic sampling when reproducible outputs are desired.", + "group": "sampling", + "type": "integer", + "range": { + "min": 0 + } + }, + { + "path": "presence_penalty", + "label": "Presence penalty", + "description": "Penalizes repeated words or phrases to encourage a wider variety of generated content.", + "group": "sampling", + "type": "number", + "default": 0, + "range": { + "min": -2, + "max": 2, + "step": 0.1 + } + }, + { + "path": "frequency_penalty", + "label": "Frequency penalty", + "description": "Penalizes words based on how often they already appear in the generated text.", + "group": "sampling", + "type": "number", + "default": 0, + "range": { + "min": -2, + "max": 2, + "step": 0.1 + } + }, + { + "path": "prompt_mode", + "label": "Prompt mode", + "description": "Enables Mistral's reasoning system prompt; leave unset to disable the default reasoning behavior.", + "group": "reasoning", + "type": "enum", + "values": [ + "reasoning" + ] + }, + { + "path": "response_format.type", + "label": "Response format", + "description": "Controls whether the model returns normal text or JSON mode output.", + "group": "output_format", + "type": "enum", + "default": "text", + "values": [ + "text", + "json_object" + ] + }, + { + "path": "safe_prompt", + "label": "Safe prompt", + "description": "Controls whether Mistral injects its safety prompt before the conversation.", + "group": "provider_metadata", + "type": "boolean", + "default": false + } + ] + }, { "provider": "moonshot", "authType": "api_key", diff --git a/packages/modelparams/src/generated/defaults.ts b/packages/modelparams/src/generated/defaults.ts index b5744db..caf97c0 100644 --- a/packages/modelparams/src/generated/defaults.ts +++ b/packages/modelparams/src/generated/defaults.ts @@ -834,6 +834,13 @@ export const DEFAULTS = { "response_format.type": "text", safe_prompt: false, }, + "mistral/zai-glm-5-2": { + top_p: 1, + presence_penalty: 0, + frequency_penalty: 0, + "response_format.type": "text", + safe_prompt: false, + }, "moonshot/kimi-k2.5": { "response_format.type": "text", }, diff --git a/packages/modelparams/src/generated/model-ids.ts b/packages/modelparams/src/generated/model-ids.ts index 80b3264..c4bbb71 100644 --- a/packages/modelparams/src/generated/model-ids.ts +++ b/packages/modelparams/src/generated/model-ids.ts @@ -127,6 +127,7 @@ export const MODEL_IDS = [ "mistral/mistral-medium-latest", "mistral/mistral-small-latest", "mistral/open-mistral-nemo", + "mistral/zai-glm-5-2", "moonshot/kimi-k2.5", "moonshot/kimi-k2.6", "moonshot/kimi-k2.6-subscription", diff --git a/packages/modelparams/src/generated/params-by-id.ts b/packages/modelparams/src/generated/params-by-id.ts index 7076264..5c86a49 100644 --- a/packages/modelparams/src/generated/params-by-id.ts +++ b/packages/modelparams/src/generated/params-by-id.ts @@ -1060,6 +1060,18 @@ export type ParamsById = { "response_format.type": "text" | "json_object"; safe_prompt: boolean; }; + "mistral/zai-glm-5-2": { + max_tokens: number; + stop: string; + temperature: number; + top_p: number; + random_seed: number; + presence_penalty: number; + frequency_penalty: number; + prompt_mode: "reasoning"; + "response_format.type": "text" | "json_object"; + safe_prompt: boolean; + }; "moonshot/kimi-k2.5": { max_completion_tokens: number; "thinking.type": "enabled" | "disabled";