From 500e02e5f4d51b262b55c3d7e89df64b47462769 Mon Sep 17 00:00:00 2001 From: Guillaume Gay Date: Mon, 25 May 2026 13:43:10 +0200 Subject: [PATCH] fix: add MiniMax and Z.ai subscription params --- docs/model-parameters-schema.md | 4 +- ...tion.yaml => MiniMax-M2-subscription.yaml} | 2 +- ... MiniMax-M2.1-highspeed-subscription.yaml} | 2 +- models/minimax/MiniMax-M2.1-subscription.yaml | 34 +++++++++++++++ .../MiniMax-M2.5-highspeed-subscription.yaml | 34 +++++++++++++++ models/minimax/MiniMax-M2.5-subscription.yaml | 34 +++++++++++++++ .../MiniMax-M2.7-highspeed-subscription.yaml | 34 +++++++++++++++ models/minimax/MiniMax-M2.7-subscription.yaml | 34 +++++++++++++++ models/z-ai/glm-4.5-subscription.yaml | 41 +++++++++++++++++++ models/z-ai/glm-4.6-subscription.yaml | 41 +++++++++++++++++++ models/z-ai/glm-5-subscription.yaml | 41 +++++++++++++++++++ src/schema/model.ts | 2 +- tests/schema.test.ts | 5 +++ 13 files changed, 303 insertions(+), 5 deletions(-) rename models/minimax/{minimax-m2.7-subscription.yaml => MiniMax-M2-subscription.yaml} (97%) rename models/minimax/{minimax-m2.7-highspeed-subscription.yaml => MiniMax-M2.1-highspeed-subscription.yaml} (96%) create mode 100644 models/minimax/MiniMax-M2.1-subscription.yaml create mode 100644 models/minimax/MiniMax-M2.5-highspeed-subscription.yaml create mode 100644 models/minimax/MiniMax-M2.5-subscription.yaml create mode 100644 models/minimax/MiniMax-M2.7-highspeed-subscription.yaml create mode 100644 models/minimax/MiniMax-M2.7-subscription.yaml create mode 100644 models/z-ai/glm-4.5-subscription.yaml create mode 100644 models/z-ai/glm-4.6-subscription.yaml create mode 100644 models/z-ai/glm-5-subscription.yaml diff --git a/docs/model-parameters-schema.md b/docs/model-parameters-schema.md index d3e5048..212c207 100644 --- a/docs/model-parameters-schema.md +++ b/docs/model-parameters-schema.md @@ -46,8 +46,8 @@ Conventions: - `provider`, `authType`, and `model` identify exactly one model route. - `provider` is a kebab-case slug. -- `model` is the provider-native model id without path separators. It may - contain dots or colons when the upstream model id does. +- `model` is the provider-native model id without path separators. Preserve + upstream casing; it may contain dots or colons when the upstream model id does. - `authType` is `api_key` or `subscription`. - `params` is the non-empty list of parameters for that exact route. - `path` is the exact provider API request parameter path in dot notation. Use diff --git a/models/minimax/minimax-m2.7-subscription.yaml b/models/minimax/MiniMax-M2-subscription.yaml similarity index 97% rename from models/minimax/minimax-m2.7-subscription.yaml rename to models/minimax/MiniMax-M2-subscription.yaml index 9596634..3fe1a0f 100644 --- a/models/minimax/minimax-m2.7-subscription.yaml +++ b/models/minimax/MiniMax-M2-subscription.yaml @@ -1,7 +1,7 @@ # yaml-language-server: $schema=https://modelparams.dev/api/v1/schema.json provider: minimax authType: subscription -model: minimax-m2.7 +model: MiniMax-M2 params: - path: max_tokens type: integer diff --git a/models/minimax/minimax-m2.7-highspeed-subscription.yaml b/models/minimax/MiniMax-M2.1-highspeed-subscription.yaml similarity index 96% rename from models/minimax/minimax-m2.7-highspeed-subscription.yaml rename to models/minimax/MiniMax-M2.1-highspeed-subscription.yaml index 6fe7b8d..fb1742f 100644 --- a/models/minimax/minimax-m2.7-highspeed-subscription.yaml +++ b/models/minimax/MiniMax-M2.1-highspeed-subscription.yaml @@ -1,7 +1,7 @@ # yaml-language-server: $schema=https://modelparams.dev/api/v1/schema.json provider: minimax authType: subscription -model: minimax-m2.7-highspeed +model: MiniMax-M2.1-highspeed params: - path: max_tokens type: integer diff --git a/models/minimax/MiniMax-M2.1-subscription.yaml b/models/minimax/MiniMax-M2.1-subscription.yaml new file mode 100644 index 0000000..6b19a79 --- /dev/null +++ b/models/minimax/MiniMax-M2.1-subscription.yaml @@ -0,0 +1,34 @@ +# yaml-language-server: $schema=https://modelparams.dev/api/v1/schema.json +provider: minimax +authType: subscription +model: MiniMax-M2.1 +params: + - path: max_tokens + type: integer + label: Max tokens + description: Maximum number of tokens to generate in the response. + range: + min: 1 + group: generation_length + - path: temperature + type: number + label: Temperature + description: >- + Controls randomness. Lower values make outputs more focused; higher values make them more + varied. Values must be greater than 0 and at most 1. + default: 1 + range: + min: 0.01 + max: 1 + step: 0.01 + 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: 0.95 + range: + min: 0.01 + max: 1 + step: 0.01 + group: sampling diff --git a/models/minimax/MiniMax-M2.5-highspeed-subscription.yaml b/models/minimax/MiniMax-M2.5-highspeed-subscription.yaml new file mode 100644 index 0000000..81f27b8 --- /dev/null +++ b/models/minimax/MiniMax-M2.5-highspeed-subscription.yaml @@ -0,0 +1,34 @@ +# yaml-language-server: $schema=https://modelparams.dev/api/v1/schema.json +provider: minimax +authType: subscription +model: MiniMax-M2.5-highspeed +params: + - path: max_tokens + type: integer + label: Max tokens + description: Maximum number of tokens to generate in the response. + range: + min: 1 + group: generation_length + - path: temperature + type: number + label: Temperature + description: >- + Controls randomness. Lower values make outputs more focused; higher values make them more + varied. Values must be greater than 0 and at most 1. + default: 1 + range: + min: 0.01 + max: 1 + step: 0.01 + 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: 0.95 + range: + min: 0.01 + max: 1 + step: 0.01 + group: sampling diff --git a/models/minimax/MiniMax-M2.5-subscription.yaml b/models/minimax/MiniMax-M2.5-subscription.yaml new file mode 100644 index 0000000..812fa03 --- /dev/null +++ b/models/minimax/MiniMax-M2.5-subscription.yaml @@ -0,0 +1,34 @@ +# yaml-language-server: $schema=https://modelparams.dev/api/v1/schema.json +provider: minimax +authType: subscription +model: MiniMax-M2.5 +params: + - path: max_tokens + type: integer + label: Max tokens + description: Maximum number of tokens to generate in the response. + range: + min: 1 + group: generation_length + - path: temperature + type: number + label: Temperature + description: >- + Controls randomness. Lower values make outputs more focused; higher values make them more + varied. Values must be greater than 0 and at most 1. + default: 1 + range: + min: 0.01 + max: 1 + step: 0.01 + 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: 0.95 + range: + min: 0.01 + max: 1 + step: 0.01 + group: sampling diff --git a/models/minimax/MiniMax-M2.7-highspeed-subscription.yaml b/models/minimax/MiniMax-M2.7-highspeed-subscription.yaml new file mode 100644 index 0000000..c1528e8 --- /dev/null +++ b/models/minimax/MiniMax-M2.7-highspeed-subscription.yaml @@ -0,0 +1,34 @@ +# yaml-language-server: $schema=https://modelparams.dev/api/v1/schema.json +provider: minimax +authType: subscription +model: MiniMax-M2.7-highspeed +params: + - path: max_tokens + type: integer + label: Max tokens + description: Maximum number of tokens to generate in the response. + range: + min: 1 + group: generation_length + - path: temperature + type: number + label: Temperature + description: >- + Controls randomness. Lower values make outputs more focused; higher values make them more + varied. Values must be greater than 0 and at most 1. + default: 1 + range: + min: 0.01 + max: 1 + step: 0.01 + 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: 0.95 + range: + min: 0.01 + max: 1 + step: 0.01 + group: sampling diff --git a/models/minimax/MiniMax-M2.7-subscription.yaml b/models/minimax/MiniMax-M2.7-subscription.yaml new file mode 100644 index 0000000..5ab7341 --- /dev/null +++ b/models/minimax/MiniMax-M2.7-subscription.yaml @@ -0,0 +1,34 @@ +# yaml-language-server: $schema=https://modelparams.dev/api/v1/schema.json +provider: minimax +authType: subscription +model: MiniMax-M2.7 +params: + - path: max_tokens + type: integer + label: Max tokens + description: Maximum number of tokens to generate in the response. + range: + min: 1 + group: generation_length + - path: temperature + type: number + label: Temperature + description: >- + Controls randomness. Lower values make outputs more focused; higher values make them more + varied. Values must be greater than 0 and at most 1. + default: 1 + range: + min: 0.01 + max: 1 + step: 0.01 + 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: 0.95 + range: + min: 0.01 + max: 1 + step: 0.01 + group: sampling diff --git a/models/z-ai/glm-4.5-subscription.yaml b/models/z-ai/glm-4.5-subscription.yaml new file mode 100644 index 0000000..edd0c92 --- /dev/null +++ b/models/z-ai/glm-4.5-subscription.yaml @@ -0,0 +1,41 @@ +# yaml-language-server: $schema=https://modelparams.dev/api/v1/schema.json +provider: z-ai +authType: subscription +model: glm-4.5 +params: + - path: max_tokens + type: integer + label: Max tokens + description: Maximum number of tokens to generate in the response. + range: + min: 1 + group: generation_length + - path: temperature + type: number + label: Temperature + description: Controls randomness. Lower values make outputs more focused; higher values make them more varied. + default: 1 + range: + min: 0 + max: 1 + 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: 0.95 + range: + min: 0.01 + max: 1 + step: 0.01 + group: sampling + - path: thinking.type + type: enum + label: Thinking mode + description: Toggles the model's extended reasoning before it produces the final answer. + default: enabled + values: + - enabled + - disabled + group: reasoning diff --git a/models/z-ai/glm-4.6-subscription.yaml b/models/z-ai/glm-4.6-subscription.yaml new file mode 100644 index 0000000..f2482c3 --- /dev/null +++ b/models/z-ai/glm-4.6-subscription.yaml @@ -0,0 +1,41 @@ +# yaml-language-server: $schema=https://modelparams.dev/api/v1/schema.json +provider: z-ai +authType: subscription +model: glm-4.6 +params: + - path: max_tokens + type: integer + label: Max tokens + description: Maximum number of tokens to generate in the response. + range: + min: 1 + group: generation_length + - path: temperature + type: number + label: Temperature + description: Controls randomness. Lower values make outputs more focused; higher values make them more varied. + default: 1 + range: + min: 0 + max: 1 + 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: 0.95 + range: + min: 0.01 + max: 1 + step: 0.01 + group: sampling + - path: thinking.type + type: enum + label: Thinking mode + description: Toggles the model's extended reasoning before it produces the final answer. + default: enabled + values: + - enabled + - disabled + group: reasoning diff --git a/models/z-ai/glm-5-subscription.yaml b/models/z-ai/glm-5-subscription.yaml new file mode 100644 index 0000000..18172a2 --- /dev/null +++ b/models/z-ai/glm-5-subscription.yaml @@ -0,0 +1,41 @@ +# yaml-language-server: $schema=https://modelparams.dev/api/v1/schema.json +provider: z-ai +authType: subscription +model: glm-5 +params: + - path: max_tokens + type: integer + label: Max tokens + description: Maximum number of tokens to generate in the response. + range: + min: 1 + group: generation_length + - path: temperature + type: number + label: Temperature + description: Controls randomness. Lower values make outputs more focused; higher values make them more varied. + default: 1 + range: + min: 0 + max: 1 + 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: 0.95 + range: + min: 0.01 + max: 1 + step: 0.01 + group: sampling + - path: thinking.type + type: enum + label: Thinking mode + description: Toggles the model's extended reasoning before it produces the final answer. + default: enabled + values: + - enabled + - disabled + group: reasoning diff --git a/src/schema/model.ts b/src/schema/model.ts index 731d363..31030cf 100644 --- a/src/schema/model.ts +++ b/src/schema/model.ts @@ -18,7 +18,7 @@ export const ParameterGroup = z.enum([ export type ParameterGroup = z.infer; const PROVIDER_SLUG = /^[a-z0-9][a-z0-9-]*$/; -const MODEL_ID = /^[a-z0-9][a-z0-9._:-]*$/; +const MODEL_ID = /^[A-Za-z0-9][A-Za-z0-9._:-]*$/; const PARAM_PATH = /^[A-Za-z][A-Za-z0-9_]*(\.[A-Za-z][A-Za-z0-9_]*)*$/; const BLOCKED_PARAM_PATHS = new Set(["stream"]); diff --git a/tests/schema.test.ts b/tests/schema.test.ts index 54947c9..a6d43a2 100644 --- a/tests/schema.test.ts +++ b/tests/schema.test.ts @@ -43,6 +43,11 @@ describe("Model schema", () => { expect(result.success).toBe(true); }); + it("accepts provider-native model ids with uppercase characters", () => { + const result = Model.safeParse({ ...VALID_MODEL, provider: "minimax", model: "MiniMax-M2.7" }); + expect(result.success).toBe(true); + }); + it("rejects path separators in model ids", () => { const result = Model.safeParse({ ...VALID_MODEL,