From 5ed6dc6c55c8e039949293a2cf54c4c2369aa216 Mon Sep 17 00:00:00 2001 From: Guillaume Gay Date: Thu, 6 Aug 2026 04:37:04 +0000 Subject: [PATCH] feat: add mistral/codestral-2508 --- models/mistral/codestral-2508.yaml | 78 +++++++++++++ packages/modelparams/src/generated/data.ts | 105 ++++++++++++++++++ .../modelparams/src/generated/defaults.ts | 7 ++ .../modelparams/src/generated/model-ids.ts | 1 + .../modelparams/src/generated/params-by-id.ts | 11 ++ 5 files changed, 202 insertions(+) create mode 100644 models/mistral/codestral-2508.yaml diff --git a/models/mistral/codestral-2508.yaml b/models/mistral/codestral-2508.yaml new file mode 100644 index 0000000..0a33b72 --- /dev/null +++ b/models/mistral/codestral-2508.yaml @@ -0,0 +1,78 @@ +# yaml-language-server: $schema=https://modelparams.dev/api/v1/schema.json +provider: mistral +authType: api_key +model: codestral-2508 +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: 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 874005f..a4b02f8 100644 --- a/packages/modelparams/src/generated/data.ts +++ b/packages/modelparams/src/generated/data.ts @@ -9810,6 +9810,111 @@ export const CATALOG = [ } ] }, + { + "provider": "mistral", + "authType": "api_key", + "model": "codestral-2508", + "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": "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": "mistral", "authType": "api_key", diff --git a/packages/modelparams/src/generated/defaults.ts b/packages/modelparams/src/generated/defaults.ts index 2ac9bd7..b5744db 100644 --- a/packages/modelparams/src/generated/defaults.ts +++ b/packages/modelparams/src/generated/defaults.ts @@ -736,6 +736,13 @@ export const DEFAULTS = { temperature: 1, top_p: 0.95, }, + "mistral/codestral-2508": { + top_p: 1, + presence_penalty: 0, + frequency_penalty: 0, + "response_format.type": "text", + safe_prompt: false, + }, "mistral/codestral-latest": { top_p: 1, presence_penalty: 0, diff --git a/packages/modelparams/src/generated/model-ids.ts b/packages/modelparams/src/generated/model-ids.ts index 8748522..80b3264 100644 --- a/packages/modelparams/src/generated/model-ids.ts +++ b/packages/modelparams/src/generated/model-ids.ts @@ -113,6 +113,7 @@ export const MODEL_IDS = [ "minimax/MiniMax-M2.7-subscription", "minimax/minimax-m3", "minimax/MiniMax-M3-subscription", + "mistral/codestral-2508", "mistral/codestral-latest", "mistral/devstral-2512", "mistral/devstral-latest", diff --git a/packages/modelparams/src/generated/params-by-id.ts b/packages/modelparams/src/generated/params-by-id.ts index 240f87c..7076264 100644 --- a/packages/modelparams/src/generated/params-by-id.ts +++ b/packages/modelparams/src/generated/params-by-id.ts @@ -904,6 +904,17 @@ export type ParamsById = { temperature: number; top_p: number; }; + "mistral/codestral-2508": { + max_tokens: number; + stop: string; + temperature: number; + top_p: number; + random_seed: number; + presence_penalty: number; + frequency_penalty: number; + "response_format.type": "text" | "json_object"; + safe_prompt: boolean; + }; "mistral/codestral-latest": { max_tokens: number; stop: string;