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-air-subscription.yaml b/models/z-ai/glm-4.5-air-subscription.yaml index 39f70c5..12d6261 100644 --- a/models/z-ai/glm-4.5-air-subscription.yaml +++ b/models/z-ai/glm-4.5-air-subscription.yaml @@ -20,6 +20,9 @@ params: max: 1 step: 0.1 group: sampling + applicability: + except: + do_sample: false - path: top_p type: number label: Top P @@ -30,6 +33,15 @@ params: max: 1 step: 0.01 group: sampling + applicability: + except: + do_sample: false + - path: do_sample + type: boolean + label: Do sample + description: When false, the model uses greedy decoding and ignores temperature and top_p. + default: true + group: sampling - path: thinking.type type: enum label: Thinking mode @@ -39,3 +51,12 @@ params: - enabled - disabled group: reasoning + - path: response_format.type + type: enum + label: Response format + description: Forces the response into plain text or a JSON object. + default: text + values: + - text + - json_object + group: output_format 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..88ccb86 --- /dev/null +++ b/models/z-ai/glm-4.5-subscription.yaml @@ -0,0 +1,62 @@ +# 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: 0.6 + range: + min: 0 + max: 1 + step: 0.1 + group: sampling + applicability: + except: + do_sample: false + - 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 + applicability: + except: + do_sample: false + - path: do_sample + type: boolean + label: Do sample + description: When false, the model uses greedy decoding and ignores temperature and top_p. + default: true + 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 + - path: response_format.type + type: enum + label: Response format + description: Forces the response into plain text or a JSON object. + default: text + values: + - text + - json_object + group: output_format 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..e243956 --- /dev/null +++ b/models/z-ai/glm-4.6-subscription.yaml @@ -0,0 +1,62 @@ +# 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 + applicability: + except: + do_sample: false + - 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 + applicability: + except: + do_sample: false + - path: do_sample + type: boolean + label: Do sample + description: When false, the model uses greedy decoding and ignores temperature and top_p. + default: true + 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 + - path: response_format.type + type: enum + label: Response format + description: Forces the response into plain text or a JSON object. + default: text + values: + - text + - json_object + group: output_format diff --git a/models/z-ai/glm-4.7-subscription.yaml b/models/z-ai/glm-4.7-subscription.yaml index eb5280f..6ea2795 100644 --- a/models/z-ai/glm-4.7-subscription.yaml +++ b/models/z-ai/glm-4.7-subscription.yaml @@ -20,6 +20,9 @@ params: max: 1 step: 0.1 group: sampling + applicability: + except: + do_sample: false - path: top_p type: number label: Top P @@ -30,6 +33,15 @@ params: max: 1 step: 0.01 group: sampling + applicability: + except: + do_sample: false + - path: do_sample + type: boolean + label: Do sample + description: When false, the model uses greedy decoding and ignores temperature and top_p. + default: true + group: sampling - path: thinking.type type: enum label: Thinking mode @@ -39,3 +51,12 @@ params: - enabled - disabled group: reasoning + - path: response_format.type + type: enum + label: Response format + description: Forces the response into plain text or a JSON object. + default: text + values: + - text + - json_object + group: output_format diff --git a/models/z-ai/glm-5-subscription.yaml b/models/z-ai/glm-5-subscription.yaml new file mode 100644 index 0000000..c4614c7 --- /dev/null +++ b/models/z-ai/glm-5-subscription.yaml @@ -0,0 +1,62 @@ +# 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 + applicability: + except: + do_sample: false + - 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 + applicability: + except: + do_sample: false + - path: do_sample + type: boolean + label: Do sample + description: When false, the model uses greedy decoding and ignores temperature and top_p. + default: true + 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 + - path: response_format.type + type: enum + label: Response format + description: Forces the response into plain text or a JSON object. + default: text + values: + - text + - json_object + group: output_format diff --git a/models/z-ai/glm-5-turbo-subscription.yaml b/models/z-ai/glm-5-turbo-subscription.yaml index 7b02ec6..befa470 100644 --- a/models/z-ai/glm-5-turbo-subscription.yaml +++ b/models/z-ai/glm-5-turbo-subscription.yaml @@ -20,6 +20,9 @@ params: max: 1 step: 0.1 group: sampling + applicability: + except: + do_sample: false - path: top_p type: number label: Top P @@ -30,6 +33,15 @@ params: max: 1 step: 0.01 group: sampling + applicability: + except: + do_sample: false + - path: do_sample + type: boolean + label: Do sample + description: When false, the model uses greedy decoding and ignores temperature and top_p. + default: true + group: sampling - path: thinking.type type: enum label: Thinking mode @@ -39,3 +51,12 @@ params: - enabled - disabled group: reasoning + - path: response_format.type + type: enum + label: Response format + description: Forces the response into plain text or a JSON object. + default: text + values: + - text + - json_object + group: output_format diff --git a/models/z-ai/glm-5.1-subscription.yaml b/models/z-ai/glm-5.1-subscription.yaml index cf6b8d5..c59e1de 100644 --- a/models/z-ai/glm-5.1-subscription.yaml +++ b/models/z-ai/glm-5.1-subscription.yaml @@ -20,6 +20,9 @@ params: max: 1 step: 0.1 group: sampling + applicability: + except: + do_sample: false - path: top_p type: number label: Top P @@ -30,6 +33,15 @@ params: max: 1 step: 0.01 group: sampling + applicability: + except: + do_sample: false + - path: do_sample + type: boolean + label: Do sample + description: When false, the model uses greedy decoding and ignores temperature and top_p. + default: true + group: sampling - path: thinking.type type: enum label: Thinking mode @@ -39,3 +51,12 @@ params: - enabled - disabled group: reasoning + - path: response_format.type + type: enum + label: Response format + description: Forces the response into plain text or a JSON object. + default: text + values: + - text + - json_object + group: output_format 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/catalog.test.ts b/tests/catalog.test.ts index 29b9474..fcdfae3 100644 --- a/tests/catalog.test.ts +++ b/tests/catalog.test.ts @@ -2,6 +2,8 @@ import { describe, it, expect } from "vitest"; import { buildCapabilityFacets, buildCatalog, uniqueProviders } from "../src/data/catalog.js"; import { describeApplicability } from "../src/data/applicability.js"; import { modelLabel, providerLabel } from "../src/data/display.js"; +import { loadAllModels } from "../src/data/load.js"; +import { modelId } from "../src/schema/model.js"; import type { Model } from "../src/schema/model.js"; function makeModel(overrides: Partial = {}): Model { @@ -113,3 +115,30 @@ describe("describeApplicability", () => { expect(out.except[0]).toBe("temperature ≠ 1"); }); }); + +describe("provider catalog rows", () => { + it("keeps Z.ai Coding Plan params aligned with the API-key rows", async () => { + const { models, issues } = await loadAllModels(); + expect(issues).toEqual([]); + + const byId = new Map(models.map((model) => [modelId(model), model])); + const sharedModels = [ + "glm-5.1", + "glm-5-turbo", + "glm-5", + "glm-4.7", + "glm-4.6", + "glm-4.5", + "glm-4.5-air", + ]; + + for (const model of sharedModels) { + const apiKey = byId.get(`z-ai/${model}`); + const subscription = byId.get(`z-ai/${model}-subscription`); + + expect(subscription?.params.map((param) => param.path)).toEqual( + apiKey?.params.map((param) => param.path), + ); + } + }); +}); 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,