From 0af7f616f2e0469c39c21730cadadf37fe1477f6 Mon Sep 17 00:00:00 2001 From: Guillaume Gay Date: Wed, 20 May 2026 16:33:50 +0200 Subject: [PATCH 1/4] docs: add model parameters schema convention --- CONTRIBUTING.md | 3 + README.md | 4 + docs/model-parameters-schema.md | 170 ++++++++++++++++++++++++++++++++ 3 files changed, 177 insertions(+) create mode 100644 docs/model-parameters-schema.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b1c1bfd..b7ecfd6 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -2,6 +2,8 @@ Thanks for helping build the catalog. There are two main ways to contribute: **adding/updating model data**, and **improving the site itself**. +The formal catalog convention is the [Model Parameters convention](docs/model-parameters-schema.md). + ## Adding or updating a model 1. **Pick the filename.** API-key models are bare; subscription models get a `-subscription` suffix. @@ -33,6 +35,7 @@ Thanks for helping build the catalog. There are two main ways to contribute: **a - `only`: object (or array of objects) of `path: value-or-array`. The parameter applies only when _all_ listed paths match. - `except`: object (or array of objects) of `path: value-or-array`. The parameter does _not_ apply when any of the listed conditions match. - You can also use `{ not: }` to say "any value except this one". + - See the [schema doc](docs/model-parameters-schema.md#applicability) for the exact rule syntax and evaluation semantics. 6. **Auth-type rules of thumb:** - **`api_key`:** list parameters from the official API reference. Don't invent ones the API doesn't accept. diff --git a/README.md b/README.md index 7651696..bd9bd05 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,10 @@ You can access this data through an API. curl https://modelparameters.dev/api/v1/models.json ``` +The catalog follows the [Model Parameters convention](docs/model-parameters-schema.md). +The generated JSON Schema is available at +`https://modelparameters.dev/api/v1/schema.json`. + ## Adding a model or a parameter See [CONTRIBUTING.md](CONTRIBUTING.md). The short version: diff --git a/docs/model-parameters-schema.md b/docs/model-parameters-schema.md new file mode 100644 index 0000000..3b8a57d --- /dev/null +++ b/docs/model-parameters-schema.md @@ -0,0 +1,170 @@ +# Model Parameters Convention + +The Model Parameters Schema (MPS) convention is the JSON/YAML shape used by +modelparameters.dev to describe the request parameters available for a specific +provider, auth type, and model. + +This catalog is metadata. It describes knobs a consumer can put into an outbound +model request, such as `temperature`, `top_p`, `max_tokens`, or +`thinking.type`. It does not describe API transport capabilities, proxy behavior, +authentication flows, endpoint compatibility, pricing, or UI control types. + +The public runtime sources are: + +- `https://modelparameters.dev/api/v1/models.json` +- `https://modelparameters.dev/api/v1/schema.json` + +## Catalog Entry + +Each entry describes exactly one provider/auth/model tuple and its available +parameters. + +```json +{ + "provider": "anthropic", + "authType": "api_key", + "model": "claude-haiku-4-5", + "params": [ + { + "path": "top_p", + "type": "number", + "label": "Top P", + "description": "Controls nucleus sampling by limiting generation to tokens whose cumulative probability reaches this value.", + "default": 1, + "range": { "min": 0, "max": 1, "step": 0.01 }, + "group": "sampling", + "applicability": { + "except": [{ "thinking.type": ["adaptive", "enabled"] }, { "temperature": { "not": 1 } }] + } + } + ] +} +``` + +Conventions: + +- `provider`, `authType`, and `model` identify exactly one model route. +- `provider` and `model` are kebab-case slugs. +- `authType` is `api_key` or `subscription`. +- `params` is the non-empty list of parameters for that exact route. +- `path` is a snake_case dot path into stored params and outbound request params. +- `type` is the semantic data type, not a UI control kind. +- `label` is user-facing copy. +- `description` explains the raw provider parameter. +- `default` is the provider default to display when known. +- `values` is required for `enum` and is allowed only for finite choices. +- `range` describes numeric bounds and optional step. +- `group` is a semantic grouping for ordering and display. +- `applicability` is optional. Omitted means always available. + +## Parameter Scope + +MPS entries should describe only parameters the user or consumer can configure +for the selected provider/auth/model tuple. + +For `authType: api_key`, list parameters from the official provider API +reference. Do not invent request fields the upstream API does not accept. + +For `authType: subscription`, list user-facing toggles and presets the consumer +can actually set. Skip implementation details needed only by the subscription +adapter. + +Do not model transport or platform capabilities as parameters. Examples that do +not belong in `params`: + +- streaming support +- proxy or passthrough behavior +- OAuth or API key setup details +- fallback behavior +- pricing and rate limits +- UI-only control metadata + +## Applicability + +`applicability` controls whether a parameter is available for the current draft +or request params. + +The convention uses two top-level keys: + +- `only`: the parameter is available only when the rule matches. +- `except`: the parameter is unavailable when the rule matches. + +Use at least one of `only` or `except`. + +## Rule Shape + +A rule is either: + +- one non-empty match object +- a non-empty array of match objects + +Array rules use OR semantics. A single match object uses AND semantics. + +```json +{ + "except": [{ "thinking.type": ["adaptive", "enabled"] }, { "temperature": { "not": 1 } }] +} +``` + +This means: disable the parameter when `thinking.type` is `adaptive` or +`enabled`, or when `temperature` exists and is not `1`. + +## Match Values + +Each match key is a snake_case dot path. Each match value uses one of: + +- JSON primitive: string, number, boolean, or null +- non-empty array of JSON primitives +- `{ "not": }` + +Examples: + +```json +{ "thinking.type": "enabled" } +``` + +```json +{ "thinking.type": ["adaptive", "enabled"] } +``` + +```json +{ "temperature": { "not": 1 } } +``` + +## Evaluation Semantics + +Consumers evaluate rules against the current params object after dot-path +expansion. + +For a normal match: + +- primitive value matches by JSON equality +- array value matches if any primitive item equals the actual value +- missing paths do not match + +For `{ "not": value }`: + +- missing paths do not match +- present paths match when the actual value is not equal to `value` + +For a parameter spec: + +1. If `only` is present and does not match, the parameter is unavailable. +2. If `except` is present and matches, the parameter is unavailable. +3. Otherwise the parameter is available. + +## Adding A New Rule + +Prefer expressing provider behavior with the existing `applicability` syntax. + +Introduce new convention syntax only when a provider rule cannot be represented +with: + +- exact match +- one-of match +- negated match +- OR of match objects +- AND within one match object + +When extending the language, update this document and the generated catalog +format together. From 4108bb75c64a2ddcc4933bf5ef073bd726e98a2f Mon Sep 17 00:00:00 2001 From: Guillaume Gay Date: Wed, 20 May 2026 16:46:09 +0200 Subject: [PATCH 2/4] fix: complete MPS catalog for Manifest --- docs/model-parameters-schema.md | 6 +- .../anthropic/claude-3-5-haiku-20241022.yaml | 62 ++++++ models/anthropic/claude-3-5-haiku-latest.yaml | 62 ++++++ .../anthropic/claude-3-5-sonnet-20241022.yaml | 62 ++++++ .../anthropic/claude-3-5-sonnet-latest.yaml | 62 ++++++ .../anthropic/claude-3-7-sonnet-20250219.yaml | 84 ++++++++ .../anthropic/claude-3-7-sonnet-latest.yaml | 84 ++++++++ models/anthropic/claude-3-opus-20240229.yaml | 62 ++++++ models/anthropic/claude-3-opus-latest.yaml | 62 ++++++ .../anthropic/claude-haiku-4-5-20251001.yaml | 84 ++++++++ .../claude-haiku-4-5-subscription.yaml | 18 -- models/anthropic/claude-haiku-4-5.yaml | 68 ++++--- .../claude-haiku-4-subscription.yaml | 84 ++++++++ models/anthropic/claude-haiku-4.yaml | 84 ++++++++ models/anthropic/claude-opus-4-6.yaml | 85 ++++++++ .../claude-opus-4-7-subscription.yaml | 41 ---- models/anthropic/claude-opus-4-7.yaml | 63 ++---- .../anthropic/claude-opus-4-subscription.yaml | 85 ++++++++ models/anthropic/claude-opus-4.yaml | 85 ++++++++ .../anthropic/claude-sonnet-4-5-20250929.yaml | 85 ++++++++ models/anthropic/claude-sonnet-4-5.yaml | 85 ++++++++ .../claude-sonnet-4-6-subscription.yaml | 30 --- models/anthropic/claude-sonnet-4-6.yaml | 52 +++-- .../claude-sonnet-4-subscription.yaml | 85 ++++++++ models/anthropic/claude-sonnet-4.yaml | 85 ++++++++ models/deepseek/deepseek-chat.yaml | 14 ++ models/deepseek/deepseek-v3.1.yaml | 14 ++ models/deepseek/deepseek-v3.2.yaml | 14 ++ models/deepseek/deepseek-v4.yaml | 14 ++ models/openai/chatgpt-4o-latest.yaml | 37 ++++ models/openai/gpt-3.5-turbo.yaml | 37 ++++ models/openai/gpt-4-turbo-2024-04-09.yaml | 37 ++++ models/openai/gpt-4-turbo.yaml | 37 ++++ models/openai/gpt-4.1-mini.yaml | 37 ++++ models/openai/gpt-4.1-nano.yaml | 37 ++++ models/openai/gpt-4.1.yaml | 37 ++++ models/openai/gpt-4o-2024-11-20.yaml | 37 ++++ models/openai/gpt-4o-mini.yaml | 62 +----- models/openai/gpt-4o-subscription.yaml | 46 ----- models/openai/gpt-4o.yaml | 86 +-------- models/openai/gpt-5-chat-latest.yaml | 48 +++++ models/openai/gpt-5-mini.yaml | 48 +++++ models/openai/gpt-5-nano.yaml | 48 +++++ .../gpt-5.1-codex-max-subscription.yaml | 38 ++++ models/openai/gpt-5.1-codex-subscription.yaml | 37 ++++ models/openai/gpt-5.1.yaml | 48 +++++ models/openai/gpt-5.2-codex-subscription.yaml | 38 ++++ models/openai/gpt-5.2-subscription.yaml | 38 ++++ models/openai/gpt-5.2.yaml | 49 +++++ .../gpt-5.3-codex-spark-subscription.yaml | 38 ++++ models/openai/gpt-5.3-codex-subscription.yaml | 38 ++++ models/openai/gpt-5.4-mini-subscription.yaml | 38 ++++ models/openai/gpt-5.4-mini.yaml | 49 +++++ models/openai/gpt-5.4-subscription.yaml | 38 ++++ models/openai/gpt-5.4.yaml | 49 +++++ models/openai/gpt-5.5-subscription.yaml | 38 ++++ models/openai/gpt-5.5.yaml | 49 +++++ models/openai/gpt-5.yaml | 48 +++++ models/openai/o1-mini.yaml | 24 +++ models/openai/o1-preview.yaml | 24 +++ models/openai/o1-subscription.yaml | 22 --- models/openai/o1.yaml | 29 +-- models/openai/o3-mini.yaml | 35 +--- models/openai/o3.yaml | 24 +++ models/openai/o4-mini.yaml | 24 +++ src/schema/model.ts | 182 ++++++++++++------ tests/catalog.test.ts | 8 +- tests/schema.test.ts | 129 ++++++++++++- 68 files changed, 2998 insertions(+), 491 deletions(-) create mode 100644 models/anthropic/claude-3-5-haiku-20241022.yaml create mode 100644 models/anthropic/claude-3-5-haiku-latest.yaml create mode 100644 models/anthropic/claude-3-5-sonnet-20241022.yaml create mode 100644 models/anthropic/claude-3-5-sonnet-latest.yaml create mode 100644 models/anthropic/claude-3-7-sonnet-20250219.yaml create mode 100644 models/anthropic/claude-3-7-sonnet-latest.yaml create mode 100644 models/anthropic/claude-3-opus-20240229.yaml create mode 100644 models/anthropic/claude-3-opus-latest.yaml create mode 100644 models/anthropic/claude-haiku-4-5-20251001.yaml delete mode 100644 models/anthropic/claude-haiku-4-5-subscription.yaml create mode 100644 models/anthropic/claude-haiku-4-subscription.yaml create mode 100644 models/anthropic/claude-haiku-4.yaml create mode 100644 models/anthropic/claude-opus-4-6.yaml delete mode 100644 models/anthropic/claude-opus-4-7-subscription.yaml create mode 100644 models/anthropic/claude-opus-4-subscription.yaml create mode 100644 models/anthropic/claude-opus-4.yaml create mode 100644 models/anthropic/claude-sonnet-4-5-20250929.yaml create mode 100644 models/anthropic/claude-sonnet-4-5.yaml delete mode 100644 models/anthropic/claude-sonnet-4-6-subscription.yaml create mode 100644 models/anthropic/claude-sonnet-4-subscription.yaml create mode 100644 models/anthropic/claude-sonnet-4.yaml create mode 100644 models/deepseek/deepseek-chat.yaml create mode 100644 models/deepseek/deepseek-v3.1.yaml create mode 100644 models/deepseek/deepseek-v3.2.yaml create mode 100644 models/deepseek/deepseek-v4.yaml create mode 100644 models/openai/chatgpt-4o-latest.yaml create mode 100644 models/openai/gpt-3.5-turbo.yaml create mode 100644 models/openai/gpt-4-turbo-2024-04-09.yaml create mode 100644 models/openai/gpt-4-turbo.yaml create mode 100644 models/openai/gpt-4.1-mini.yaml create mode 100644 models/openai/gpt-4.1-nano.yaml create mode 100644 models/openai/gpt-4.1.yaml create mode 100644 models/openai/gpt-4o-2024-11-20.yaml delete mode 100644 models/openai/gpt-4o-subscription.yaml create mode 100644 models/openai/gpt-5-chat-latest.yaml create mode 100644 models/openai/gpt-5-mini.yaml create mode 100644 models/openai/gpt-5-nano.yaml create mode 100644 models/openai/gpt-5.1-codex-max-subscription.yaml create mode 100644 models/openai/gpt-5.1-codex-subscription.yaml create mode 100644 models/openai/gpt-5.1.yaml create mode 100644 models/openai/gpt-5.2-codex-subscription.yaml create mode 100644 models/openai/gpt-5.2-subscription.yaml create mode 100644 models/openai/gpt-5.2.yaml create mode 100644 models/openai/gpt-5.3-codex-spark-subscription.yaml create mode 100644 models/openai/gpt-5.3-codex-subscription.yaml create mode 100644 models/openai/gpt-5.4-mini-subscription.yaml create mode 100644 models/openai/gpt-5.4-mini.yaml create mode 100644 models/openai/gpt-5.4-subscription.yaml create mode 100644 models/openai/gpt-5.4.yaml create mode 100644 models/openai/gpt-5.5-subscription.yaml create mode 100644 models/openai/gpt-5.5.yaml create mode 100644 models/openai/gpt-5.yaml create mode 100644 models/openai/o1-mini.yaml create mode 100644 models/openai/o1-preview.yaml delete mode 100644 models/openai/o1-subscription.yaml create mode 100644 models/openai/o3.yaml create mode 100644 models/openai/o4-mini.yaml diff --git a/docs/model-parameters-schema.md b/docs/model-parameters-schema.md index 3b8a57d..0d5093d 100644 --- a/docs/model-parameters-schema.md +++ b/docs/model-parameters-schema.md @@ -44,10 +44,14 @@ parameters. Conventions: - `provider`, `authType`, and `model` identify exactly one model route. -- `provider` and `model` are kebab-case slugs. +- `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. - `authType` is `api_key` or `subscription`. - `params` is the non-empty list of parameters for that exact route. - `path` is a snake_case dot path into stored params and outbound request params. +- `stream` is reserved for API-level streaming capability metadata and is not a + valid MPS parameter path. - `type` is the semantic data type, not a UI control kind. - `label` is user-facing copy. - `description` explains the raw provider parameter. diff --git a/models/anthropic/claude-3-5-haiku-20241022.yaml b/models/anthropic/claude-3-5-haiku-20241022.yaml new file mode 100644 index 0000000..96f8fa8 --- /dev/null +++ b/models/anthropic/claude-3-5-haiku-20241022.yaml @@ -0,0 +1,62 @@ +# yaml-language-server: $schema=https://modelparameters.dev/api/v1/schema.json +provider: anthropic +authType: api_key +model: claude-3-5-haiku-20241022 +params: + - path: max_tokens + type: integer + label: Max tokens + description: Maximum number of output tokens the model may generate. + default: 4096 + 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: + thinking.type: + - adaptive + - enabled + - path: top_p + type: number + label: Top P + description: >- + Controls nucleus sampling by limiting generation to tokens whose cumulative probability + reaches this value. + default: 1 + range: + min: 0 + max: 1 + step: 0.01 + group: sampling + applicability: + except: + - thinking.type: + - adaptive + - enabled + - temperature: + not: 1 + - path: top_k + type: integer + label: Top K + description: Limits token sampling to the top K most likely next tokens. + default: 0 + range: + min: 0 + group: sampling + applicability: + except: + thinking.type: + - adaptive + - enabled diff --git a/models/anthropic/claude-3-5-haiku-latest.yaml b/models/anthropic/claude-3-5-haiku-latest.yaml new file mode 100644 index 0000000..05b9584 --- /dev/null +++ b/models/anthropic/claude-3-5-haiku-latest.yaml @@ -0,0 +1,62 @@ +# yaml-language-server: $schema=https://modelparameters.dev/api/v1/schema.json +provider: anthropic +authType: api_key +model: claude-3-5-haiku-latest +params: + - path: max_tokens + type: integer + label: Max tokens + description: Maximum number of output tokens the model may generate. + default: 4096 + 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: + thinking.type: + - adaptive + - enabled + - path: top_p + type: number + label: Top P + description: >- + Controls nucleus sampling by limiting generation to tokens whose cumulative probability + reaches this value. + default: 1 + range: + min: 0 + max: 1 + step: 0.01 + group: sampling + applicability: + except: + - thinking.type: + - adaptive + - enabled + - temperature: + not: 1 + - path: top_k + type: integer + label: Top K + description: Limits token sampling to the top K most likely next tokens. + default: 0 + range: + min: 0 + group: sampling + applicability: + except: + thinking.type: + - adaptive + - enabled diff --git a/models/anthropic/claude-3-5-sonnet-20241022.yaml b/models/anthropic/claude-3-5-sonnet-20241022.yaml new file mode 100644 index 0000000..5696d46 --- /dev/null +++ b/models/anthropic/claude-3-5-sonnet-20241022.yaml @@ -0,0 +1,62 @@ +# yaml-language-server: $schema=https://modelparameters.dev/api/v1/schema.json +provider: anthropic +authType: api_key +model: claude-3-5-sonnet-20241022 +params: + - path: max_tokens + type: integer + label: Max tokens + description: Maximum number of output tokens the model may generate. + default: 4096 + 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: + thinking.type: + - adaptive + - enabled + - path: top_p + type: number + label: Top P + description: >- + Controls nucleus sampling by limiting generation to tokens whose cumulative probability + reaches this value. + default: 1 + range: + min: 0 + max: 1 + step: 0.01 + group: sampling + applicability: + except: + - thinking.type: + - adaptive + - enabled + - temperature: + not: 1 + - path: top_k + type: integer + label: Top K + description: Limits token sampling to the top K most likely next tokens. + default: 0 + range: + min: 0 + group: sampling + applicability: + except: + thinking.type: + - adaptive + - enabled diff --git a/models/anthropic/claude-3-5-sonnet-latest.yaml b/models/anthropic/claude-3-5-sonnet-latest.yaml new file mode 100644 index 0000000..e26bf93 --- /dev/null +++ b/models/anthropic/claude-3-5-sonnet-latest.yaml @@ -0,0 +1,62 @@ +# yaml-language-server: $schema=https://modelparameters.dev/api/v1/schema.json +provider: anthropic +authType: api_key +model: claude-3-5-sonnet-latest +params: + - path: max_tokens + type: integer + label: Max tokens + description: Maximum number of output tokens the model may generate. + default: 4096 + 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: + thinking.type: + - adaptive + - enabled + - path: top_p + type: number + label: Top P + description: >- + Controls nucleus sampling by limiting generation to tokens whose cumulative probability + reaches this value. + default: 1 + range: + min: 0 + max: 1 + step: 0.01 + group: sampling + applicability: + except: + - thinking.type: + - adaptive + - enabled + - temperature: + not: 1 + - path: top_k + type: integer + label: Top K + description: Limits token sampling to the top K most likely next tokens. + default: 0 + range: + min: 0 + group: sampling + applicability: + except: + thinking.type: + - adaptive + - enabled diff --git a/models/anthropic/claude-3-7-sonnet-20250219.yaml b/models/anthropic/claude-3-7-sonnet-20250219.yaml new file mode 100644 index 0000000..8c5f5ab --- /dev/null +++ b/models/anthropic/claude-3-7-sonnet-20250219.yaml @@ -0,0 +1,84 @@ +# yaml-language-server: $schema=https://modelparameters.dev/api/v1/schema.json +provider: anthropic +authType: api_key +model: claude-3-7-sonnet-20250219 +params: + - path: max_tokens + type: integer + label: Max tokens + description: Maximum number of output tokens the model may generate. + default: 4096 + 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: + thinking.type: + - adaptive + - enabled + - path: top_p + type: number + label: Top P + description: >- + Controls nucleus sampling by limiting generation to tokens whose cumulative probability + reaches this value. + default: 1 + range: + min: 0 + max: 1 + step: 0.01 + group: sampling + applicability: + except: + - thinking.type: + - adaptive + - enabled + - temperature: + not: 1 + - path: top_k + type: integer + label: Top K + description: Limits token sampling to the top K most likely next tokens. + default: 0 + range: + min: 0 + group: sampling + applicability: + except: + thinking.type: + - adaptive + - enabled + - path: thinking.type + type: enum + label: Thinking mode + description: Controls the Anthropic thinking mode values supported by this model. + default: disabled + values: + - disabled + - enabled + group: reasoning + - path: thinking.budget_tokens + type: integer + label: Budget tokens + description: >- + Maximum token budget Anthropic may use for extended thinking before producing the final + answer. + default: 4096 + range: + min: 1024 + group: reasoning + applicability: + only: + thinking.type: enabled diff --git a/models/anthropic/claude-3-7-sonnet-latest.yaml b/models/anthropic/claude-3-7-sonnet-latest.yaml new file mode 100644 index 0000000..9a9bdb0 --- /dev/null +++ b/models/anthropic/claude-3-7-sonnet-latest.yaml @@ -0,0 +1,84 @@ +# yaml-language-server: $schema=https://modelparameters.dev/api/v1/schema.json +provider: anthropic +authType: api_key +model: claude-3-7-sonnet-latest +params: + - path: max_tokens + type: integer + label: Max tokens + description: Maximum number of output tokens the model may generate. + default: 4096 + 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: + thinking.type: + - adaptive + - enabled + - path: top_p + type: number + label: Top P + description: >- + Controls nucleus sampling by limiting generation to tokens whose cumulative probability + reaches this value. + default: 1 + range: + min: 0 + max: 1 + step: 0.01 + group: sampling + applicability: + except: + - thinking.type: + - adaptive + - enabled + - temperature: + not: 1 + - path: top_k + type: integer + label: Top K + description: Limits token sampling to the top K most likely next tokens. + default: 0 + range: + min: 0 + group: sampling + applicability: + except: + thinking.type: + - adaptive + - enabled + - path: thinking.type + type: enum + label: Thinking mode + description: Controls the Anthropic thinking mode values supported by this model. + default: disabled + values: + - disabled + - enabled + group: reasoning + - path: thinking.budget_tokens + type: integer + label: Budget tokens + description: >- + Maximum token budget Anthropic may use for extended thinking before producing the final + answer. + default: 4096 + range: + min: 1024 + group: reasoning + applicability: + only: + thinking.type: enabled diff --git a/models/anthropic/claude-3-opus-20240229.yaml b/models/anthropic/claude-3-opus-20240229.yaml new file mode 100644 index 0000000..9de2c57 --- /dev/null +++ b/models/anthropic/claude-3-opus-20240229.yaml @@ -0,0 +1,62 @@ +# yaml-language-server: $schema=https://modelparameters.dev/api/v1/schema.json +provider: anthropic +authType: api_key +model: claude-3-opus-20240229 +params: + - path: max_tokens + type: integer + label: Max tokens + description: Maximum number of output tokens the model may generate. + default: 4096 + 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: + thinking.type: + - adaptive + - enabled + - path: top_p + type: number + label: Top P + description: >- + Controls nucleus sampling by limiting generation to tokens whose cumulative probability + reaches this value. + default: 1 + range: + min: 0 + max: 1 + step: 0.01 + group: sampling + applicability: + except: + - thinking.type: + - adaptive + - enabled + - temperature: + not: 1 + - path: top_k + type: integer + label: Top K + description: Limits token sampling to the top K most likely next tokens. + default: 0 + range: + min: 0 + group: sampling + applicability: + except: + thinking.type: + - adaptive + - enabled diff --git a/models/anthropic/claude-3-opus-latest.yaml b/models/anthropic/claude-3-opus-latest.yaml new file mode 100644 index 0000000..8ebe076 --- /dev/null +++ b/models/anthropic/claude-3-opus-latest.yaml @@ -0,0 +1,62 @@ +# yaml-language-server: $schema=https://modelparameters.dev/api/v1/schema.json +provider: anthropic +authType: api_key +model: claude-3-opus-latest +params: + - path: max_tokens + type: integer + label: Max tokens + description: Maximum number of output tokens the model may generate. + default: 4096 + 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: + thinking.type: + - adaptive + - enabled + - path: top_p + type: number + label: Top P + description: >- + Controls nucleus sampling by limiting generation to tokens whose cumulative probability + reaches this value. + default: 1 + range: + min: 0 + max: 1 + step: 0.01 + group: sampling + applicability: + except: + - thinking.type: + - adaptive + - enabled + - temperature: + not: 1 + - path: top_k + type: integer + label: Top K + description: Limits token sampling to the top K most likely next tokens. + default: 0 + range: + min: 0 + group: sampling + applicability: + except: + thinking.type: + - adaptive + - enabled diff --git a/models/anthropic/claude-haiku-4-5-20251001.yaml b/models/anthropic/claude-haiku-4-5-20251001.yaml new file mode 100644 index 0000000..392ad3b --- /dev/null +++ b/models/anthropic/claude-haiku-4-5-20251001.yaml @@ -0,0 +1,84 @@ +# yaml-language-server: $schema=https://modelparameters.dev/api/v1/schema.json +provider: anthropic +authType: api_key +model: claude-haiku-4-5-20251001 +params: + - path: max_tokens + type: integer + label: Max tokens + description: Maximum number of output tokens the model may generate. + default: 4096 + 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: + thinking.type: + - adaptive + - enabled + - path: top_p + type: number + label: Top P + description: >- + Controls nucleus sampling by limiting generation to tokens whose cumulative probability + reaches this value. + default: 1 + range: + min: 0 + max: 1 + step: 0.01 + group: sampling + applicability: + except: + - thinking.type: + - adaptive + - enabled + - temperature: + not: 1 + - path: top_k + type: integer + label: Top K + description: Limits token sampling to the top K most likely next tokens. + default: 0 + range: + min: 0 + group: sampling + applicability: + except: + thinking.type: + - adaptive + - enabled + - path: thinking.type + type: enum + label: Thinking mode + description: Controls the Anthropic thinking mode values supported by this model. + default: disabled + values: + - disabled + - enabled + group: reasoning + - path: thinking.budget_tokens + type: integer + label: Budget tokens + description: >- + Maximum token budget Anthropic may use for extended thinking before producing the final + answer. + default: 4096 + range: + min: 1024 + group: reasoning + applicability: + only: + thinking.type: enabled diff --git a/models/anthropic/claude-haiku-4-5-subscription.yaml b/models/anthropic/claude-haiku-4-5-subscription.yaml deleted file mode 100644 index e4566c1..0000000 --- a/models/anthropic/claude-haiku-4-5-subscription.yaml +++ /dev/null @@ -1,18 +0,0 @@ -# yaml-language-server: $schema=https://modelparameters.dev/api/v1/schema.json -provider: anthropic -authType: subscription -model: claude-haiku-4-5 -params: - - path: response_style - type: enum - label: Response style - description: Conversation tone preset. - default: normal - values: [normal, concise, explanatory, formal] - group: output_format - - path: artifacts - type: boolean - label: Artifacts - description: Open long outputs in the side panel. - default: true - group: tooling diff --git a/models/anthropic/claude-haiku-4-5.yaml b/models/anthropic/claude-haiku-4-5.yaml index 40ed6be..98ce128 100644 --- a/models/anthropic/claude-haiku-4-5.yaml +++ b/models/anthropic/claude-haiku-4-5.yaml @@ -10,23 +10,31 @@ params: default: 4096 range: min: 1 - max: 8192 group: generation_length - path: temperature type: number label: Temperature - description: Controls randomness in sampling. + 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: + thinking.type: + - adaptive + - enabled - path: top_p type: number label: Top P - description: Nucleus sampling cutoff. - default: 0.999 + description: >- + Controls nucleus sampling by limiting generation to tokens whose cumulative probability + reaches this value. + default: 1 range: min: 0 max: 1 @@ -34,29 +42,43 @@ params: group: sampling applicability: except: - temperature: - not: 1 + - thinking.type: + - adaptive + - enabled + - temperature: + not: 1 - path: top_k type: integer label: Top K - description: Limits sampling to the top K most likely tokens. + description: Limits token sampling to the top K most likely next tokens. default: 0 range: min: 0 group: sampling - - path: stop_sequences - type: string - label: Stop sequences - description: Up to 4 custom stop strings. - group: sampling - - path: stream - type: boolean - label: Stream - description: Stream tokens incrementally. - default: false - group: output_format - - path: system - type: string - label: System prompt - description: System prompt providing context and instructions to the model. - group: provider_metadata + applicability: + except: + thinking.type: + - adaptive + - enabled + - path: thinking.type + type: enum + label: Thinking mode + description: Controls the Anthropic thinking mode values supported by this model. + default: disabled + values: + - disabled + - enabled + group: reasoning + - path: thinking.budget_tokens + type: integer + label: Budget tokens + description: >- + Maximum token budget Anthropic may use for extended thinking before producing the final + answer. + default: 4096 + range: + min: 1024 + group: reasoning + applicability: + only: + thinking.type: enabled diff --git a/models/anthropic/claude-haiku-4-subscription.yaml b/models/anthropic/claude-haiku-4-subscription.yaml new file mode 100644 index 0000000..d231c53 --- /dev/null +++ b/models/anthropic/claude-haiku-4-subscription.yaml @@ -0,0 +1,84 @@ +# yaml-language-server: $schema=https://modelparameters.dev/api/v1/schema.json +provider: anthropic +authType: subscription +model: claude-haiku-4 +params: + - path: max_tokens + type: integer + label: Max tokens + description: Maximum number of output tokens the model may generate. + default: 4096 + 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: + thinking.type: + - adaptive + - enabled + - path: top_p + type: number + label: Top P + description: >- + Controls nucleus sampling by limiting generation to tokens whose cumulative probability + reaches this value. + default: 1 + range: + min: 0 + max: 1 + step: 0.01 + group: sampling + applicability: + except: + - thinking.type: + - adaptive + - enabled + - temperature: + not: 1 + - path: top_k + type: integer + label: Top K + description: Limits token sampling to the top K most likely next tokens. + default: 0 + range: + min: 0 + group: sampling + applicability: + except: + thinking.type: + - adaptive + - enabled + - path: thinking.type + type: enum + label: Thinking mode + description: Controls the Anthropic thinking mode values supported by this model. + default: disabled + values: + - disabled + - enabled + group: reasoning + - path: thinking.budget_tokens + type: integer + label: Budget tokens + description: >- + Maximum token budget Anthropic may use for extended thinking before producing the final + answer. + default: 4096 + range: + min: 1024 + group: reasoning + applicability: + only: + thinking.type: enabled diff --git a/models/anthropic/claude-haiku-4.yaml b/models/anthropic/claude-haiku-4.yaml new file mode 100644 index 0000000..d1ce197 --- /dev/null +++ b/models/anthropic/claude-haiku-4.yaml @@ -0,0 +1,84 @@ +# yaml-language-server: $schema=https://modelparameters.dev/api/v1/schema.json +provider: anthropic +authType: api_key +model: claude-haiku-4 +params: + - path: max_tokens + type: integer + label: Max tokens + description: Maximum number of output tokens the model may generate. + default: 4096 + 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: + thinking.type: + - adaptive + - enabled + - path: top_p + type: number + label: Top P + description: >- + Controls nucleus sampling by limiting generation to tokens whose cumulative probability + reaches this value. + default: 1 + range: + min: 0 + max: 1 + step: 0.01 + group: sampling + applicability: + except: + - thinking.type: + - adaptive + - enabled + - temperature: + not: 1 + - path: top_k + type: integer + label: Top K + description: Limits token sampling to the top K most likely next tokens. + default: 0 + range: + min: 0 + group: sampling + applicability: + except: + thinking.type: + - adaptive + - enabled + - path: thinking.type + type: enum + label: Thinking mode + description: Controls the Anthropic thinking mode values supported by this model. + default: disabled + values: + - disabled + - enabled + group: reasoning + - path: thinking.budget_tokens + type: integer + label: Budget tokens + description: >- + Maximum token budget Anthropic may use for extended thinking before producing the final + answer. + default: 4096 + range: + min: 1024 + group: reasoning + applicability: + only: + thinking.type: enabled diff --git a/models/anthropic/claude-opus-4-6.yaml b/models/anthropic/claude-opus-4-6.yaml new file mode 100644 index 0000000..af30e0c --- /dev/null +++ b/models/anthropic/claude-opus-4-6.yaml @@ -0,0 +1,85 @@ +# yaml-language-server: $schema=https://modelparameters.dev/api/v1/schema.json +provider: anthropic +authType: api_key +model: claude-opus-4-6 +params: + - path: max_tokens + type: integer + label: Max tokens + description: Maximum number of output tokens the model may generate. + default: 4096 + 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: + thinking.type: + - adaptive + - enabled + - path: top_p + type: number + label: Top P + description: >- + Controls nucleus sampling by limiting generation to tokens whose cumulative probability + reaches this value. + default: 1 + range: + min: 0 + max: 1 + step: 0.01 + group: sampling + applicability: + except: + - thinking.type: + - adaptive + - enabled + - temperature: + not: 1 + - path: top_k + type: integer + label: Top K + description: Limits token sampling to the top K most likely next tokens. + default: 0 + range: + min: 0 + group: sampling + applicability: + except: + thinking.type: + - adaptive + - enabled + - path: thinking.type + type: enum + label: Thinking mode + description: Controls the Anthropic thinking mode values supported by this model. + default: disabled + values: + - disabled + - adaptive + - enabled + group: reasoning + - path: thinking.budget_tokens + type: integer + label: Budget tokens + description: >- + Maximum token budget Anthropic may use for extended thinking before producing the final + answer. + default: 4096 + range: + min: 1024 + group: reasoning + applicability: + only: + thinking.type: enabled diff --git a/models/anthropic/claude-opus-4-7-subscription.yaml b/models/anthropic/claude-opus-4-7-subscription.yaml deleted file mode 100644 index f88d2b3..0000000 --- a/models/anthropic/claude-opus-4-7-subscription.yaml +++ /dev/null @@ -1,41 +0,0 @@ -# yaml-language-server: $schema=https://modelparameters.dev/api/v1/schema.json -provider: anthropic -authType: subscription -model: claude-opus-4-7 -params: - - path: response_style - type: enum - label: Response style - description: Preset that nudges Claude's tone and verbosity. Selected from the conversation menu. - default: normal - values: [normal, concise, explanatory, formal] - group: output_format - - path: extended_thinking - type: boolean - label: Extended thinking - description: Toggle visible extended-thinking output in the conversation UI. - default: false - group: reasoning - - path: artifacts - type: boolean - label: Artifacts - description: Render code, documents, and other long-form output in the side panel. - default: true - group: tooling - - path: web_search - type: boolean - label: Web search - description: Allow Claude to search the live web during the conversation. - default: false - group: tooling - - path: projects - type: boolean - label: Projects - description: Attach the conversation to a project with persistent context and uploaded files. - default: false - group: tooling - - path: personal_preferences - type: string - label: Personal preferences - description: Free-form preferences applied to every conversation (set in profile). - group: provider_metadata diff --git a/models/anthropic/claude-opus-4-7.yaml b/models/anthropic/claude-opus-4-7.yaml index f26b70d..b78228d 100644 --- a/models/anthropic/claude-opus-4-7.yaml +++ b/models/anthropic/claude-opus-4-7.yaml @@ -10,12 +10,13 @@ params: default: 4096 range: min: 1 - max: 64000 group: generation_length - path: temperature type: number label: Temperature - description: Controls randomness. Lower values make outputs more focused and deterministic; higher values make outputs more varied. + description: >- + Controls randomness. Lower values make outputs more focused; higher values make them more + varied. default: 1 range: min: 0 @@ -24,12 +25,16 @@ params: group: sampling applicability: except: - thinking.type: [adaptive, enabled] + thinking.type: + - adaptive + - enabled - path: top_p type: number label: Top P - description: Nucleus sampling. Consider tokens whose cumulative probability reaches this value. - default: 0.999 + description: >- + Controls nucleus sampling by limiting generation to tokens whose cumulative probability + reaches this value. + default: 1 range: min: 0 max: 1 @@ -37,7 +42,9 @@ params: group: sampling applicability: except: - - thinking.type: [adaptive, enabled] + - thinking.type: + - adaptive + - enabled - temperature: not: 1 - path: top_k @@ -50,45 +57,15 @@ params: group: sampling applicability: except: - thinking.type: [adaptive, enabled] - - path: stop_sequences - type: string - label: Stop sequences - description: Up to 4 custom strings that, when produced, cause the model to stop generating. - group: sampling - - path: stream - type: boolean - label: Stream - description: Stream the response back incrementally as Server-Sent Events. - default: false - group: output_format - - path: system - type: string - label: System prompt - description: System prompt providing context and instructions to the model. - group: provider_metadata + thinking.type: + - adaptive + - enabled - path: thinking.type type: enum label: Thinking mode - description: Controls whether extended or adaptive thinking is enabled for this model. + description: Controls the Anthropic thinking mode values supported by this model. default: disabled - values: [disabled, adaptive, enabled] - group: reasoning - - path: thinking.budget_tokens - type: integer - label: Thinking budget tokens - description: Maximum token budget Anthropic may use for extended thinking before producing the final answer. - default: 4096 - range: - min: 1024 + values: + - disabled + - adaptive group: reasoning - applicability: - only: - thinking.type: enabled - - path: service_tier - type: enum - label: Service tier - description: Priority tier for the request. `standard_only` avoids priority-tier billing. - default: auto - values: [auto, standard_only] - group: provider_metadata diff --git a/models/anthropic/claude-opus-4-subscription.yaml b/models/anthropic/claude-opus-4-subscription.yaml new file mode 100644 index 0000000..387dfb7 --- /dev/null +++ b/models/anthropic/claude-opus-4-subscription.yaml @@ -0,0 +1,85 @@ +# yaml-language-server: $schema=https://modelparameters.dev/api/v1/schema.json +provider: anthropic +authType: subscription +model: claude-opus-4 +params: + - path: max_tokens + type: integer + label: Max tokens + description: Maximum number of output tokens the model may generate. + default: 4096 + 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: + thinking.type: + - adaptive + - enabled + - path: top_p + type: number + label: Top P + description: >- + Controls nucleus sampling by limiting generation to tokens whose cumulative probability + reaches this value. + default: 1 + range: + min: 0 + max: 1 + step: 0.01 + group: sampling + applicability: + except: + - thinking.type: + - adaptive + - enabled + - temperature: + not: 1 + - path: top_k + type: integer + label: Top K + description: Limits token sampling to the top K most likely next tokens. + default: 0 + range: + min: 0 + group: sampling + applicability: + except: + thinking.type: + - adaptive + - enabled + - path: thinking.type + type: enum + label: Thinking mode + description: Controls the Anthropic thinking mode values supported by this model. + default: disabled + values: + - disabled + - adaptive + - enabled + group: reasoning + - path: thinking.budget_tokens + type: integer + label: Budget tokens + description: >- + Maximum token budget Anthropic may use for extended thinking before producing the final + answer. + default: 4096 + range: + min: 1024 + group: reasoning + applicability: + only: + thinking.type: enabled diff --git a/models/anthropic/claude-opus-4.yaml b/models/anthropic/claude-opus-4.yaml new file mode 100644 index 0000000..7b784ca --- /dev/null +++ b/models/anthropic/claude-opus-4.yaml @@ -0,0 +1,85 @@ +# yaml-language-server: $schema=https://modelparameters.dev/api/v1/schema.json +provider: anthropic +authType: api_key +model: claude-opus-4 +params: + - path: max_tokens + type: integer + label: Max tokens + description: Maximum number of output tokens the model may generate. + default: 4096 + 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: + thinking.type: + - adaptive + - enabled + - path: top_p + type: number + label: Top P + description: >- + Controls nucleus sampling by limiting generation to tokens whose cumulative probability + reaches this value. + default: 1 + range: + min: 0 + max: 1 + step: 0.01 + group: sampling + applicability: + except: + - thinking.type: + - adaptive + - enabled + - temperature: + not: 1 + - path: top_k + type: integer + label: Top K + description: Limits token sampling to the top K most likely next tokens. + default: 0 + range: + min: 0 + group: sampling + applicability: + except: + thinking.type: + - adaptive + - enabled + - path: thinking.type + type: enum + label: Thinking mode + description: Controls the Anthropic thinking mode values supported by this model. + default: disabled + values: + - disabled + - adaptive + - enabled + group: reasoning + - path: thinking.budget_tokens + type: integer + label: Budget tokens + description: >- + Maximum token budget Anthropic may use for extended thinking before producing the final + answer. + default: 4096 + range: + min: 1024 + group: reasoning + applicability: + only: + thinking.type: enabled diff --git a/models/anthropic/claude-sonnet-4-5-20250929.yaml b/models/anthropic/claude-sonnet-4-5-20250929.yaml new file mode 100644 index 0000000..3b39817 --- /dev/null +++ b/models/anthropic/claude-sonnet-4-5-20250929.yaml @@ -0,0 +1,85 @@ +# yaml-language-server: $schema=https://modelparameters.dev/api/v1/schema.json +provider: anthropic +authType: api_key +model: claude-sonnet-4-5-20250929 +params: + - path: max_tokens + type: integer + label: Max tokens + description: Maximum number of output tokens the model may generate. + default: 4096 + 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: + thinking.type: + - adaptive + - enabled + - path: top_p + type: number + label: Top P + description: >- + Controls nucleus sampling by limiting generation to tokens whose cumulative probability + reaches this value. + default: 1 + range: + min: 0 + max: 1 + step: 0.01 + group: sampling + applicability: + except: + - thinking.type: + - adaptive + - enabled + - temperature: + not: 1 + - path: top_k + type: integer + label: Top K + description: Limits token sampling to the top K most likely next tokens. + default: 0 + range: + min: 0 + group: sampling + applicability: + except: + thinking.type: + - adaptive + - enabled + - path: thinking.type + type: enum + label: Thinking mode + description: Controls the Anthropic thinking mode values supported by this model. + default: disabled + values: + - disabled + - adaptive + - enabled + group: reasoning + - path: thinking.budget_tokens + type: integer + label: Budget tokens + description: >- + Maximum token budget Anthropic may use for extended thinking before producing the final + answer. + default: 4096 + range: + min: 1024 + group: reasoning + applicability: + only: + thinking.type: enabled diff --git a/models/anthropic/claude-sonnet-4-5.yaml b/models/anthropic/claude-sonnet-4-5.yaml new file mode 100644 index 0000000..d68d610 --- /dev/null +++ b/models/anthropic/claude-sonnet-4-5.yaml @@ -0,0 +1,85 @@ +# yaml-language-server: $schema=https://modelparameters.dev/api/v1/schema.json +provider: anthropic +authType: api_key +model: claude-sonnet-4-5 +params: + - path: max_tokens + type: integer + label: Max tokens + description: Maximum number of output tokens the model may generate. + default: 4096 + 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: + thinking.type: + - adaptive + - enabled + - path: top_p + type: number + label: Top P + description: >- + Controls nucleus sampling by limiting generation to tokens whose cumulative probability + reaches this value. + default: 1 + range: + min: 0 + max: 1 + step: 0.01 + group: sampling + applicability: + except: + - thinking.type: + - adaptive + - enabled + - temperature: + not: 1 + - path: top_k + type: integer + label: Top K + description: Limits token sampling to the top K most likely next tokens. + default: 0 + range: + min: 0 + group: sampling + applicability: + except: + thinking.type: + - adaptive + - enabled + - path: thinking.type + type: enum + label: Thinking mode + description: Controls the Anthropic thinking mode values supported by this model. + default: disabled + values: + - disabled + - adaptive + - enabled + group: reasoning + - path: thinking.budget_tokens + type: integer + label: Budget tokens + description: >- + Maximum token budget Anthropic may use for extended thinking before producing the final + answer. + default: 4096 + range: + min: 1024 + group: reasoning + applicability: + only: + thinking.type: enabled diff --git a/models/anthropic/claude-sonnet-4-6-subscription.yaml b/models/anthropic/claude-sonnet-4-6-subscription.yaml deleted file mode 100644 index eb551a2..0000000 --- a/models/anthropic/claude-sonnet-4-6-subscription.yaml +++ /dev/null @@ -1,30 +0,0 @@ -# yaml-language-server: $schema=https://modelparameters.dev/api/v1/schema.json -provider: anthropic -authType: subscription -model: claude-sonnet-4-6 -params: - - path: response_style - type: enum - label: Response style - description: Conversation tone preset. - default: normal - values: [normal, concise, explanatory, formal] - group: output_format - - path: extended_thinking - type: boolean - label: Extended thinking - description: Show extended thinking in the response panel. - default: false - group: reasoning - - path: artifacts - type: boolean - label: Artifacts - description: Open long outputs in the side panel. - default: true - group: tooling - - path: web_search - type: boolean - label: Web search - description: Allow live web search during the conversation. - default: false - group: tooling diff --git a/models/anthropic/claude-sonnet-4-6.yaml b/models/anthropic/claude-sonnet-4-6.yaml index 00be88e..1e35b85 100644 --- a/models/anthropic/claude-sonnet-4-6.yaml +++ b/models/anthropic/claude-sonnet-4-6.yaml @@ -10,12 +10,13 @@ params: default: 4096 range: min: 1 - max: 64000 group: generation_length - path: temperature type: number label: Temperature - description: Controls randomness. Lower values make outputs more focused and deterministic; higher values make outputs more varied. + description: >- + Controls randomness. Lower values make outputs more focused; higher values make them more + varied. default: 1 range: min: 0 @@ -24,12 +25,16 @@ params: group: sampling applicability: except: - thinking.type: [adaptive, enabled] + thinking.type: + - adaptive + - enabled - path: top_p type: number label: Top P - description: Nucleus sampling. Consider tokens whose cumulative probability reaches this value. - default: 0.999 + description: >- + Controls nucleus sampling by limiting generation to tokens whose cumulative probability + reaches this value. + default: 1 range: min: 0 max: 1 @@ -37,7 +42,9 @@ params: group: sampling applicability: except: - - thinking.type: [adaptive, enabled] + - thinking.type: + - adaptive + - enabled - temperature: not: 1 - path: top_k @@ -50,34 +57,25 @@ params: group: sampling applicability: except: - thinking.type: [adaptive, enabled] - - path: stop_sequences - type: string - label: Stop sequences - description: Up to 4 custom strings that, when produced, cause the model to stop generating. - group: sampling - - path: stream - type: boolean - label: Stream - description: Stream tokens as Server-Sent Events. - default: false - group: output_format - - path: system - type: string - label: System prompt - description: System prompt providing context and instructions to the model. - group: provider_metadata + thinking.type: + - adaptive + - enabled - path: thinking.type type: enum label: Thinking mode - description: Controls whether extended or adaptive thinking is enabled for this model. + description: Controls the Anthropic thinking mode values supported by this model. default: disabled - values: [disabled, adaptive, enabled] + values: + - disabled + - adaptive + - enabled group: reasoning - path: thinking.budget_tokens type: integer - label: Thinking budget tokens - description: Maximum token budget for extended thinking before producing the final answer. + label: Budget tokens + description: >- + Maximum token budget Anthropic may use for extended thinking before producing the final + answer. default: 4096 range: min: 1024 diff --git a/models/anthropic/claude-sonnet-4-subscription.yaml b/models/anthropic/claude-sonnet-4-subscription.yaml new file mode 100644 index 0000000..cfff3cd --- /dev/null +++ b/models/anthropic/claude-sonnet-4-subscription.yaml @@ -0,0 +1,85 @@ +# yaml-language-server: $schema=https://modelparameters.dev/api/v1/schema.json +provider: anthropic +authType: subscription +model: claude-sonnet-4 +params: + - path: max_tokens + type: integer + label: Max tokens + description: Maximum number of output tokens the model may generate. + default: 4096 + 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: + thinking.type: + - adaptive + - enabled + - path: top_p + type: number + label: Top P + description: >- + Controls nucleus sampling by limiting generation to tokens whose cumulative probability + reaches this value. + default: 1 + range: + min: 0 + max: 1 + step: 0.01 + group: sampling + applicability: + except: + - thinking.type: + - adaptive + - enabled + - temperature: + not: 1 + - path: top_k + type: integer + label: Top K + description: Limits token sampling to the top K most likely next tokens. + default: 0 + range: + min: 0 + group: sampling + applicability: + except: + thinking.type: + - adaptive + - enabled + - path: thinking.type + type: enum + label: Thinking mode + description: Controls the Anthropic thinking mode values supported by this model. + default: disabled + values: + - disabled + - adaptive + - enabled + group: reasoning + - path: thinking.budget_tokens + type: integer + label: Budget tokens + description: >- + Maximum token budget Anthropic may use for extended thinking before producing the final + answer. + default: 4096 + range: + min: 1024 + group: reasoning + applicability: + only: + thinking.type: enabled diff --git a/models/anthropic/claude-sonnet-4.yaml b/models/anthropic/claude-sonnet-4.yaml new file mode 100644 index 0000000..cc35e74 --- /dev/null +++ b/models/anthropic/claude-sonnet-4.yaml @@ -0,0 +1,85 @@ +# yaml-language-server: $schema=https://modelparameters.dev/api/v1/schema.json +provider: anthropic +authType: api_key +model: claude-sonnet-4 +params: + - path: max_tokens + type: integer + label: Max tokens + description: Maximum number of output tokens the model may generate. + default: 4096 + 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: + thinking.type: + - adaptive + - enabled + - path: top_p + type: number + label: Top P + description: >- + Controls nucleus sampling by limiting generation to tokens whose cumulative probability + reaches this value. + default: 1 + range: + min: 0 + max: 1 + step: 0.01 + group: sampling + applicability: + except: + - thinking.type: + - adaptive + - enabled + - temperature: + not: 1 + - path: top_k + type: integer + label: Top K + description: Limits token sampling to the top K most likely next tokens. + default: 0 + range: + min: 0 + group: sampling + applicability: + except: + thinking.type: + - adaptive + - enabled + - path: thinking.type + type: enum + label: Thinking mode + description: Controls the Anthropic thinking mode values supported by this model. + default: disabled + values: + - disabled + - adaptive + - enabled + group: reasoning + - path: thinking.budget_tokens + type: integer + label: Budget tokens + description: >- + Maximum token budget Anthropic may use for extended thinking before producing the final + answer. + default: 4096 + range: + min: 1024 + group: reasoning + applicability: + only: + thinking.type: enabled diff --git a/models/deepseek/deepseek-chat.yaml b/models/deepseek/deepseek-chat.yaml new file mode 100644 index 0000000..3edd920 --- /dev/null +++ b/models/deepseek/deepseek-chat.yaml @@ -0,0 +1,14 @@ +# yaml-language-server: $schema=https://modelparameters.dev/api/v1/schema.json +provider: deepseek +authType: api_key +model: deepseek-chat +params: + - path: thinking.type + type: enum + label: Thinking mode + description: Controls whether DeepSeek thinking mode is enabled for this model. + default: enabled + values: + - enabled + - disabled + group: reasoning diff --git a/models/deepseek/deepseek-v3.1.yaml b/models/deepseek/deepseek-v3.1.yaml new file mode 100644 index 0000000..ccd6293 --- /dev/null +++ b/models/deepseek/deepseek-v3.1.yaml @@ -0,0 +1,14 @@ +# yaml-language-server: $schema=https://modelparameters.dev/api/v1/schema.json +provider: deepseek +authType: api_key +model: deepseek-v3.1 +params: + - path: thinking.type + type: enum + label: Thinking mode + description: Controls whether DeepSeek thinking mode is enabled for this model. + default: enabled + values: + - enabled + - disabled + group: reasoning diff --git a/models/deepseek/deepseek-v3.2.yaml b/models/deepseek/deepseek-v3.2.yaml new file mode 100644 index 0000000..d5bde22 --- /dev/null +++ b/models/deepseek/deepseek-v3.2.yaml @@ -0,0 +1,14 @@ +# yaml-language-server: $schema=https://modelparameters.dev/api/v1/schema.json +provider: deepseek +authType: api_key +model: deepseek-v3.2 +params: + - path: thinking.type + type: enum + label: Thinking mode + description: Controls whether DeepSeek thinking mode is enabled for this model. + default: enabled + values: + - enabled + - disabled + group: reasoning diff --git a/models/deepseek/deepseek-v4.yaml b/models/deepseek/deepseek-v4.yaml new file mode 100644 index 0000000..1ca1560 --- /dev/null +++ b/models/deepseek/deepseek-v4.yaml @@ -0,0 +1,14 @@ +# yaml-language-server: $schema=https://modelparameters.dev/api/v1/schema.json +provider: deepseek +authType: api_key +model: deepseek-v4 +params: + - path: thinking.type + type: enum + label: Thinking mode + description: Controls whether DeepSeek thinking mode is enabled for this model. + default: enabled + values: + - enabled + - disabled + group: reasoning diff --git a/models/openai/chatgpt-4o-latest.yaml b/models/openai/chatgpt-4o-latest.yaml new file mode 100644 index 0000000..9022b5f --- /dev/null +++ b/models/openai/chatgpt-4o-latest.yaml @@ -0,0 +1,37 @@ +# yaml-language-server: $schema=https://modelparameters.dev/api/v1/schema.json +provider: openai +authType: api_key +model: chatgpt-4o-latest +params: + - path: max_tokens + type: integer + label: Max tokens + description: Maximum number of output tokens the model may generate. + default: 4096 + 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: 2 + step: 0.1 + group: sampling + - path: top_p + type: number + label: Top P + description: >- + Controls nucleus sampling by limiting generation to tokens whose cumulative probability + reaches this value. + default: 1 + range: + min: 0 + max: 1 + step: 0.01 + group: sampling diff --git a/models/openai/gpt-3.5-turbo.yaml b/models/openai/gpt-3.5-turbo.yaml new file mode 100644 index 0000000..7955b8d --- /dev/null +++ b/models/openai/gpt-3.5-turbo.yaml @@ -0,0 +1,37 @@ +# yaml-language-server: $schema=https://modelparameters.dev/api/v1/schema.json +provider: openai +authType: api_key +model: gpt-3.5-turbo +params: + - path: max_tokens + type: integer + label: Max tokens + description: Maximum number of output tokens the model may generate. + default: 4096 + 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: 2 + step: 0.1 + group: sampling + - path: top_p + type: number + label: Top P + description: >- + Controls nucleus sampling by limiting generation to tokens whose cumulative probability + reaches this value. + default: 1 + range: + min: 0 + max: 1 + step: 0.01 + group: sampling diff --git a/models/openai/gpt-4-turbo-2024-04-09.yaml b/models/openai/gpt-4-turbo-2024-04-09.yaml new file mode 100644 index 0000000..2d7ab24 --- /dev/null +++ b/models/openai/gpt-4-turbo-2024-04-09.yaml @@ -0,0 +1,37 @@ +# yaml-language-server: $schema=https://modelparameters.dev/api/v1/schema.json +provider: openai +authType: api_key +model: gpt-4-turbo-2024-04-09 +params: + - path: max_tokens + type: integer + label: Max tokens + description: Maximum number of output tokens the model may generate. + default: 4096 + 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: 2 + step: 0.1 + group: sampling + - path: top_p + type: number + label: Top P + description: >- + Controls nucleus sampling by limiting generation to tokens whose cumulative probability + reaches this value. + default: 1 + range: + min: 0 + max: 1 + step: 0.01 + group: sampling diff --git a/models/openai/gpt-4-turbo.yaml b/models/openai/gpt-4-turbo.yaml new file mode 100644 index 0000000..e077e12 --- /dev/null +++ b/models/openai/gpt-4-turbo.yaml @@ -0,0 +1,37 @@ +# yaml-language-server: $schema=https://modelparameters.dev/api/v1/schema.json +provider: openai +authType: api_key +model: gpt-4-turbo +params: + - path: max_tokens + type: integer + label: Max tokens + description: Maximum number of output tokens the model may generate. + default: 4096 + 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: 2 + step: 0.1 + group: sampling + - path: top_p + type: number + label: Top P + description: >- + Controls nucleus sampling by limiting generation to tokens whose cumulative probability + reaches this value. + default: 1 + range: + min: 0 + max: 1 + step: 0.01 + group: sampling diff --git a/models/openai/gpt-4.1-mini.yaml b/models/openai/gpt-4.1-mini.yaml new file mode 100644 index 0000000..b38c1f5 --- /dev/null +++ b/models/openai/gpt-4.1-mini.yaml @@ -0,0 +1,37 @@ +# yaml-language-server: $schema=https://modelparameters.dev/api/v1/schema.json +provider: openai +authType: api_key +model: gpt-4.1-mini +params: + - path: max_tokens + type: integer + label: Max tokens + description: Maximum number of output tokens the model may generate. + default: 4096 + 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: 2 + step: 0.1 + group: sampling + - path: top_p + type: number + label: Top P + description: >- + Controls nucleus sampling by limiting generation to tokens whose cumulative probability + reaches this value. + default: 1 + range: + min: 0 + max: 1 + step: 0.01 + group: sampling diff --git a/models/openai/gpt-4.1-nano.yaml b/models/openai/gpt-4.1-nano.yaml new file mode 100644 index 0000000..7ba401b --- /dev/null +++ b/models/openai/gpt-4.1-nano.yaml @@ -0,0 +1,37 @@ +# yaml-language-server: $schema=https://modelparameters.dev/api/v1/schema.json +provider: openai +authType: api_key +model: gpt-4.1-nano +params: + - path: max_tokens + type: integer + label: Max tokens + description: Maximum number of output tokens the model may generate. + default: 4096 + 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: 2 + step: 0.1 + group: sampling + - path: top_p + type: number + label: Top P + description: >- + Controls nucleus sampling by limiting generation to tokens whose cumulative probability + reaches this value. + default: 1 + range: + min: 0 + max: 1 + step: 0.01 + group: sampling diff --git a/models/openai/gpt-4.1.yaml b/models/openai/gpt-4.1.yaml new file mode 100644 index 0000000..b3d1099 --- /dev/null +++ b/models/openai/gpt-4.1.yaml @@ -0,0 +1,37 @@ +# yaml-language-server: $schema=https://modelparameters.dev/api/v1/schema.json +provider: openai +authType: api_key +model: gpt-4.1 +params: + - path: max_tokens + type: integer + label: Max tokens + description: Maximum number of output tokens the model may generate. + default: 4096 + 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: 2 + step: 0.1 + group: sampling + - path: top_p + type: number + label: Top P + description: >- + Controls nucleus sampling by limiting generation to tokens whose cumulative probability + reaches this value. + default: 1 + range: + min: 0 + max: 1 + step: 0.01 + group: sampling diff --git a/models/openai/gpt-4o-2024-11-20.yaml b/models/openai/gpt-4o-2024-11-20.yaml new file mode 100644 index 0000000..aa7574b --- /dev/null +++ b/models/openai/gpt-4o-2024-11-20.yaml @@ -0,0 +1,37 @@ +# yaml-language-server: $schema=https://modelparameters.dev/api/v1/schema.json +provider: openai +authType: api_key +model: gpt-4o-2024-11-20 +params: + - path: max_tokens + type: integer + label: Max tokens + description: Maximum number of output tokens the model may generate. + default: 4096 + 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: 2 + step: 0.1 + group: sampling + - path: top_p + type: number + label: Top P + description: >- + Controls nucleus sampling by limiting generation to tokens whose cumulative probability + reaches this value. + default: 1 + range: + min: 0 + max: 1 + step: 0.01 + group: sampling diff --git a/models/openai/gpt-4o-mini.yaml b/models/openai/gpt-4o-mini.yaml index 210834b..5d9b6a2 100644 --- a/models/openai/gpt-4o-mini.yaml +++ b/models/openai/gpt-4o-mini.yaml @@ -3,17 +3,20 @@ provider: openai authType: api_key model: gpt-4o-mini params: - - path: max_completion_tokens + - path: max_tokens type: integer - label: Max completion tokens - description: Upper bound on generated tokens. + label: Max tokens + description: Maximum number of output tokens the model may generate. + default: 4096 range: min: 1 group: generation_length - path: temperature type: number label: Temperature - description: Sampling temperature. + description: >- + Controls randomness. Lower values make outputs more focused; higher values make them more + varied. default: 1 range: min: 0 @@ -23,57 +26,12 @@ params: - path: top_p type: number label: Top P - description: Nucleus sampling cutoff. + description: >- + Controls nucleus sampling by limiting generation to tokens whose cumulative probability + reaches this value. default: 1 range: min: 0 max: 1 step: 0.01 group: sampling - applicability: - except: - temperature: - not: 1 - - path: presence_penalty - type: number - label: Presence penalty - description: Penalize tokens based on whether they have appeared in the text so far. - default: 0 - range: - min: -2 - max: 2 - step: 0.1 - group: sampling - - path: frequency_penalty - type: number - label: Frequency penalty - description: Penalize tokens based on their existing frequency. - default: 0 - range: - min: -2 - max: 2 - step: 0.1 - group: sampling - - path: stop - type: string - label: Stop sequences - description: Up to 4 stop sequences. - group: sampling - - path: stream - type: boolean - label: Stream - description: Stream tokens as they are produced. - default: false - group: output_format - - path: seed - type: integer - label: Seed - description: Attempt deterministic sampling. - group: sampling - - path: response_format - type: enum - label: Response format - description: Constrain output format. - default: text - values: [text, json_object, json_schema] - group: output_format diff --git a/models/openai/gpt-4o-subscription.yaml b/models/openai/gpt-4o-subscription.yaml deleted file mode 100644 index edb2902..0000000 --- a/models/openai/gpt-4o-subscription.yaml +++ /dev/null @@ -1,46 +0,0 @@ -# yaml-language-server: $schema=https://modelparameters.dev/api/v1/schema.json -provider: openai -authType: subscription -model: gpt-4o -params: - - path: custom_instructions - type: string - label: Custom instructions - description: Free-form context applied to every conversation (set in profile). - group: provider_metadata - - path: memory - type: boolean - label: Memory - description: Whether ChatGPT can remember details across conversations. - default: true - group: tooling - - path: web_browsing - type: boolean - label: Web browsing - description: Allow ChatGPT to browse the live web. - default: true - group: tooling - - path: canvas - type: boolean - label: Canvas - description: Open long-form writing or code in the Canvas side panel. - default: false - group: tooling - - path: image_generation - type: boolean - label: Image generation - description: Generate images inline (subject to plan rate limits). - default: true - group: tooling - - path: voice_mode - type: boolean - label: Voice mode - description: Speak to and listen to ChatGPT via voice mode. - default: true - group: tooling - - path: custom_gpts - type: boolean - label: Custom GPTs - description: Use Custom GPTs in addition to the default assistant. - default: true - group: tooling diff --git a/models/openai/gpt-4o.yaml b/models/openai/gpt-4o.yaml index 091c2ae..d57ca81 100644 --- a/models/openai/gpt-4o.yaml +++ b/models/openai/gpt-4o.yaml @@ -3,17 +3,20 @@ provider: openai authType: api_key model: gpt-4o params: - - path: max_completion_tokens + - path: max_tokens type: integer - label: Max completion tokens - description: Upper bound on the number of tokens that can be generated for the completion. + label: Max tokens + description: Maximum number of output tokens the model may generate. + default: 4096 range: min: 1 group: generation_length - path: temperature type: number label: Temperature - description: Sampling temperature. Higher values produce more random output. + description: >- + Controls randomness. Lower values make outputs more focused; higher values make them more + varied. default: 1 range: min: 0 @@ -23,81 +26,12 @@ params: - path: top_p type: number label: Top P - description: Nucleus sampling. Consider tokens whose probability mass sums to top_p. + description: >- + Controls nucleus sampling by limiting generation to tokens whose cumulative probability + reaches this value. default: 1 range: min: 0 max: 1 step: 0.01 group: sampling - applicability: - except: - temperature: - not: 1 - - path: presence_penalty - type: number - label: Presence penalty - description: Positive values push the model to talk about new topics. - default: 0 - range: - min: -2 - max: 2 - step: 0.1 - group: sampling - - path: frequency_penalty - type: number - label: Frequency penalty - description: Positive values penalize tokens based on their existing frequency in the text. - default: 0 - range: - min: -2 - max: 2 - step: 0.1 - group: sampling - - path: stop - type: string - label: Stop sequences - description: Up to 4 sequences where the model will stop generating. - group: sampling - - path: stream - type: boolean - label: Stream - description: Stream partial deltas as Server-Sent Events. - default: false - group: output_format - - path: seed - type: integer - label: Seed - description: When set, the system attempts deterministic sampling. Same seed + params should give similar output. - group: sampling - - path: response_format - type: enum - label: Response format - description: Constrains the output format. - default: text - values: [text, json_object, json_schema] - group: output_format - - path: logprobs - type: boolean - label: Log probabilities - description: Return log probabilities of output tokens. - default: false - group: observability - - path: top_logprobs - type: integer - label: Top logprobs - description: Number of most likely tokens to return logprobs for at each position. - range: - min: 0 - max: 20 - group: observability - applicability: - only: - logprobs: true - - path: service_tier - type: enum - label: Service tier - description: Latency/cost tier. `flex` is cheaper with best-effort latency. - default: auto - values: [auto, default, flex] - group: provider_metadata diff --git a/models/openai/gpt-5-chat-latest.yaml b/models/openai/gpt-5-chat-latest.yaml new file mode 100644 index 0000000..f4496a5 --- /dev/null +++ b/models/openai/gpt-5-chat-latest.yaml @@ -0,0 +1,48 @@ +# yaml-language-server: $schema=https://modelparameters.dev/api/v1/schema.json +provider: openai +authType: api_key +model: gpt-5-chat-latest +params: + - path: max_tokens + type: integer + label: Max tokens + description: Maximum number of output tokens the model may generate. + default: 4096 + 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: 2 + step: 0.1 + group: sampling + - path: top_p + type: number + label: Top P + description: >- + Controls nucleus sampling by limiting generation to tokens whose cumulative probability + reaches this value. + default: 1 + range: + min: 0 + max: 1 + step: 0.01 + group: sampling + - path: reasoning_effort + type: enum + label: Reasoning effort + description: Controls how much reasoning the model should perform before producing an answer. + default: medium + values: + - minimal + - low + - medium + - high + group: reasoning diff --git a/models/openai/gpt-5-mini.yaml b/models/openai/gpt-5-mini.yaml new file mode 100644 index 0000000..43da32c --- /dev/null +++ b/models/openai/gpt-5-mini.yaml @@ -0,0 +1,48 @@ +# yaml-language-server: $schema=https://modelparameters.dev/api/v1/schema.json +provider: openai +authType: api_key +model: gpt-5-mini +params: + - path: max_tokens + type: integer + label: Max tokens + description: Maximum number of output tokens the model may generate. + default: 4096 + 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: 2 + step: 0.1 + group: sampling + - path: top_p + type: number + label: Top P + description: >- + Controls nucleus sampling by limiting generation to tokens whose cumulative probability + reaches this value. + default: 1 + range: + min: 0 + max: 1 + step: 0.01 + group: sampling + - path: reasoning_effort + type: enum + label: Reasoning effort + description: Controls how much reasoning the model should perform before producing an answer. + default: medium + values: + - minimal + - low + - medium + - high + group: reasoning diff --git a/models/openai/gpt-5-nano.yaml b/models/openai/gpt-5-nano.yaml new file mode 100644 index 0000000..13f9f62 --- /dev/null +++ b/models/openai/gpt-5-nano.yaml @@ -0,0 +1,48 @@ +# yaml-language-server: $schema=https://modelparameters.dev/api/v1/schema.json +provider: openai +authType: api_key +model: gpt-5-nano +params: + - path: max_tokens + type: integer + label: Max tokens + description: Maximum number of output tokens the model may generate. + default: 4096 + 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: 2 + step: 0.1 + group: sampling + - path: top_p + type: number + label: Top P + description: >- + Controls nucleus sampling by limiting generation to tokens whose cumulative probability + reaches this value. + default: 1 + range: + min: 0 + max: 1 + step: 0.01 + group: sampling + - path: reasoning_effort + type: enum + label: Reasoning effort + description: Controls how much reasoning the model should perform before producing an answer. + default: medium + values: + - minimal + - low + - medium + - high + group: reasoning diff --git a/models/openai/gpt-5.1-codex-max-subscription.yaml b/models/openai/gpt-5.1-codex-max-subscription.yaml new file mode 100644 index 0000000..f84caed --- /dev/null +++ b/models/openai/gpt-5.1-codex-max-subscription.yaml @@ -0,0 +1,38 @@ +# yaml-language-server: $schema=https://modelparameters.dev/api/v1/schema.json +provider: openai +authType: subscription +model: gpt-5.1-codex-max +params: + - path: reasoning.effort + type: enum + label: Reasoning effort + description: Controls how much reasoning the model should perform before producing an answer. + default: medium + values: + - minimal + - low + - medium + - high + - xhigh + group: reasoning + - path: reasoning.summary + type: enum + label: Reasoning summary + description: Controls the level of reasoning summary returned with the response. + default: auto + values: + - auto + - concise + - detailed + - none + group: reasoning + - path: text.verbosity + type: enum + label: Verbosity + description: Controls how concise or detailed the model's final text response should be. + default: medium + values: + - low + - medium + - high + group: output_format diff --git a/models/openai/gpt-5.1-codex-subscription.yaml b/models/openai/gpt-5.1-codex-subscription.yaml new file mode 100644 index 0000000..aa9472b --- /dev/null +++ b/models/openai/gpt-5.1-codex-subscription.yaml @@ -0,0 +1,37 @@ +# yaml-language-server: $schema=https://modelparameters.dev/api/v1/schema.json +provider: openai +authType: subscription +model: gpt-5.1-codex +params: + - path: reasoning.effort + type: enum + label: Reasoning effort + description: Controls how much reasoning the model should perform before producing an answer. + default: medium + values: + - minimal + - low + - medium + - high + group: reasoning + - path: reasoning.summary + type: enum + label: Reasoning summary + description: Controls the level of reasoning summary returned with the response. + default: auto + values: + - auto + - concise + - detailed + - none + group: reasoning + - path: text.verbosity + type: enum + label: Verbosity + description: Controls how concise or detailed the model's final text response should be. + default: medium + values: + - low + - medium + - high + group: output_format diff --git a/models/openai/gpt-5.1.yaml b/models/openai/gpt-5.1.yaml new file mode 100644 index 0000000..2609d54 --- /dev/null +++ b/models/openai/gpt-5.1.yaml @@ -0,0 +1,48 @@ +# yaml-language-server: $schema=https://modelparameters.dev/api/v1/schema.json +provider: openai +authType: api_key +model: gpt-5.1 +params: + - path: max_tokens + type: integer + label: Max tokens + description: Maximum number of output tokens the model may generate. + default: 4096 + 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: 2 + step: 0.1 + group: sampling + - path: top_p + type: number + label: Top P + description: >- + Controls nucleus sampling by limiting generation to tokens whose cumulative probability + reaches this value. + default: 1 + range: + min: 0 + max: 1 + step: 0.01 + group: sampling + - path: reasoning_effort + type: enum + label: Reasoning effort + description: Controls how much reasoning the model should perform before producing an answer. + default: none + values: + - none + - low + - medium + - high + group: reasoning diff --git a/models/openai/gpt-5.2-codex-subscription.yaml b/models/openai/gpt-5.2-codex-subscription.yaml new file mode 100644 index 0000000..65e2f8a --- /dev/null +++ b/models/openai/gpt-5.2-codex-subscription.yaml @@ -0,0 +1,38 @@ +# yaml-language-server: $schema=https://modelparameters.dev/api/v1/schema.json +provider: openai +authType: subscription +model: gpt-5.2-codex +params: + - path: reasoning.effort + type: enum + label: Reasoning effort + description: Controls how much reasoning the model should perform before producing an answer. + default: medium + values: + - minimal + - low + - medium + - high + - xhigh + group: reasoning + - path: reasoning.summary + type: enum + label: Reasoning summary + description: Controls the level of reasoning summary returned with the response. + default: auto + values: + - auto + - concise + - detailed + - none + group: reasoning + - path: text.verbosity + type: enum + label: Verbosity + description: Controls how concise or detailed the model's final text response should be. + default: medium + values: + - low + - medium + - high + group: output_format diff --git a/models/openai/gpt-5.2-subscription.yaml b/models/openai/gpt-5.2-subscription.yaml new file mode 100644 index 0000000..98d001e --- /dev/null +++ b/models/openai/gpt-5.2-subscription.yaml @@ -0,0 +1,38 @@ +# yaml-language-server: $schema=https://modelparameters.dev/api/v1/schema.json +provider: openai +authType: subscription +model: gpt-5.2 +params: + - path: reasoning.effort + type: enum + label: Reasoning effort + description: Controls how much reasoning the model should perform before producing an answer. + default: medium + values: + - minimal + - low + - medium + - high + - xhigh + group: reasoning + - path: reasoning.summary + type: enum + label: Reasoning summary + description: Controls the level of reasoning summary returned with the response. + default: auto + values: + - auto + - concise + - detailed + - none + group: reasoning + - path: text.verbosity + type: enum + label: Verbosity + description: Controls how concise or detailed the model's final text response should be. + default: medium + values: + - low + - medium + - high + group: output_format diff --git a/models/openai/gpt-5.2.yaml b/models/openai/gpt-5.2.yaml new file mode 100644 index 0000000..b5ccd5b --- /dev/null +++ b/models/openai/gpt-5.2.yaml @@ -0,0 +1,49 @@ +# yaml-language-server: $schema=https://modelparameters.dev/api/v1/schema.json +provider: openai +authType: api_key +model: gpt-5.2 +params: + - path: max_tokens + type: integer + label: Max tokens + description: Maximum number of output tokens the model may generate. + default: 4096 + 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: 2 + step: 0.1 + group: sampling + - path: top_p + type: number + label: Top P + description: >- + Controls nucleus sampling by limiting generation to tokens whose cumulative probability + reaches this value. + default: 1 + range: + min: 0 + max: 1 + step: 0.01 + group: sampling + - path: reasoning_effort + type: enum + label: Reasoning effort + description: Controls how much reasoning the model should perform before producing an answer. + default: medium + values: + - minimal + - low + - medium + - high + - xhigh + group: reasoning diff --git a/models/openai/gpt-5.3-codex-spark-subscription.yaml b/models/openai/gpt-5.3-codex-spark-subscription.yaml new file mode 100644 index 0000000..abd1b52 --- /dev/null +++ b/models/openai/gpt-5.3-codex-spark-subscription.yaml @@ -0,0 +1,38 @@ +# yaml-language-server: $schema=https://modelparameters.dev/api/v1/schema.json +provider: openai +authType: subscription +model: gpt-5.3-codex-spark +params: + - path: reasoning.effort + type: enum + label: Reasoning effort + description: Controls how much reasoning the model should perform before producing an answer. + default: medium + values: + - minimal + - low + - medium + - high + - xhigh + group: reasoning + - path: reasoning.summary + type: enum + label: Reasoning summary + description: Controls the level of reasoning summary returned with the response. + default: auto + values: + - auto + - concise + - detailed + - none + group: reasoning + - path: text.verbosity + type: enum + label: Verbosity + description: Controls how concise or detailed the model's final text response should be. + default: medium + values: + - low + - medium + - high + group: output_format diff --git a/models/openai/gpt-5.3-codex-subscription.yaml b/models/openai/gpt-5.3-codex-subscription.yaml new file mode 100644 index 0000000..e6c206c --- /dev/null +++ b/models/openai/gpt-5.3-codex-subscription.yaml @@ -0,0 +1,38 @@ +# yaml-language-server: $schema=https://modelparameters.dev/api/v1/schema.json +provider: openai +authType: subscription +model: gpt-5.3-codex +params: + - path: reasoning.effort + type: enum + label: Reasoning effort + description: Controls how much reasoning the model should perform before producing an answer. + default: medium + values: + - minimal + - low + - medium + - high + - xhigh + group: reasoning + - path: reasoning.summary + type: enum + label: Reasoning summary + description: Controls the level of reasoning summary returned with the response. + default: auto + values: + - auto + - concise + - detailed + - none + group: reasoning + - path: text.verbosity + type: enum + label: Verbosity + description: Controls how concise or detailed the model's final text response should be. + default: medium + values: + - low + - medium + - high + group: output_format diff --git a/models/openai/gpt-5.4-mini-subscription.yaml b/models/openai/gpt-5.4-mini-subscription.yaml new file mode 100644 index 0000000..dccc53d --- /dev/null +++ b/models/openai/gpt-5.4-mini-subscription.yaml @@ -0,0 +1,38 @@ +# yaml-language-server: $schema=https://modelparameters.dev/api/v1/schema.json +provider: openai +authType: subscription +model: gpt-5.4-mini +params: + - path: reasoning.effort + type: enum + label: Reasoning effort + description: Controls how much reasoning the model should perform before producing an answer. + default: medium + values: + - minimal + - low + - medium + - high + - xhigh + group: reasoning + - path: reasoning.summary + type: enum + label: Reasoning summary + description: Controls the level of reasoning summary returned with the response. + default: auto + values: + - auto + - concise + - detailed + - none + group: reasoning + - path: text.verbosity + type: enum + label: Verbosity + description: Controls how concise or detailed the model's final text response should be. + default: medium + values: + - low + - medium + - high + group: output_format diff --git a/models/openai/gpt-5.4-mini.yaml b/models/openai/gpt-5.4-mini.yaml new file mode 100644 index 0000000..366a318 --- /dev/null +++ b/models/openai/gpt-5.4-mini.yaml @@ -0,0 +1,49 @@ +# yaml-language-server: $schema=https://modelparameters.dev/api/v1/schema.json +provider: openai +authType: api_key +model: gpt-5.4-mini +params: + - path: max_tokens + type: integer + label: Max tokens + description: Maximum number of output tokens the model may generate. + default: 4096 + 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: 2 + step: 0.1 + group: sampling + - path: top_p + type: number + label: Top P + description: >- + Controls nucleus sampling by limiting generation to tokens whose cumulative probability + reaches this value. + default: 1 + range: + min: 0 + max: 1 + step: 0.01 + group: sampling + - path: reasoning_effort + type: enum + label: Reasoning effort + description: Controls how much reasoning the model should perform before producing an answer. + default: medium + values: + - minimal + - low + - medium + - high + - xhigh + group: reasoning diff --git a/models/openai/gpt-5.4-subscription.yaml b/models/openai/gpt-5.4-subscription.yaml new file mode 100644 index 0000000..6b59895 --- /dev/null +++ b/models/openai/gpt-5.4-subscription.yaml @@ -0,0 +1,38 @@ +# yaml-language-server: $schema=https://modelparameters.dev/api/v1/schema.json +provider: openai +authType: subscription +model: gpt-5.4 +params: + - path: reasoning.effort + type: enum + label: Reasoning effort + description: Controls how much reasoning the model should perform before producing an answer. + default: medium + values: + - minimal + - low + - medium + - high + - xhigh + group: reasoning + - path: reasoning.summary + type: enum + label: Reasoning summary + description: Controls the level of reasoning summary returned with the response. + default: auto + values: + - auto + - concise + - detailed + - none + group: reasoning + - path: text.verbosity + type: enum + label: Verbosity + description: Controls how concise or detailed the model's final text response should be. + default: medium + values: + - low + - medium + - high + group: output_format diff --git a/models/openai/gpt-5.4.yaml b/models/openai/gpt-5.4.yaml new file mode 100644 index 0000000..adc236c --- /dev/null +++ b/models/openai/gpt-5.4.yaml @@ -0,0 +1,49 @@ +# yaml-language-server: $schema=https://modelparameters.dev/api/v1/schema.json +provider: openai +authType: api_key +model: gpt-5.4 +params: + - path: max_tokens + type: integer + label: Max tokens + description: Maximum number of output tokens the model may generate. + default: 4096 + 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: 2 + step: 0.1 + group: sampling + - path: top_p + type: number + label: Top P + description: >- + Controls nucleus sampling by limiting generation to tokens whose cumulative probability + reaches this value. + default: 1 + range: + min: 0 + max: 1 + step: 0.01 + group: sampling + - path: reasoning_effort + type: enum + label: Reasoning effort + description: Controls how much reasoning the model should perform before producing an answer. + default: medium + values: + - minimal + - low + - medium + - high + - xhigh + group: reasoning diff --git a/models/openai/gpt-5.5-subscription.yaml b/models/openai/gpt-5.5-subscription.yaml new file mode 100644 index 0000000..16869da --- /dev/null +++ b/models/openai/gpt-5.5-subscription.yaml @@ -0,0 +1,38 @@ +# yaml-language-server: $schema=https://modelparameters.dev/api/v1/schema.json +provider: openai +authType: subscription +model: gpt-5.5 +params: + - path: reasoning.effort + type: enum + label: Reasoning effort + description: Controls how much reasoning the model should perform before producing an answer. + default: medium + values: + - minimal + - low + - medium + - high + - xhigh + group: reasoning + - path: reasoning.summary + type: enum + label: Reasoning summary + description: Controls the level of reasoning summary returned with the response. + default: auto + values: + - auto + - concise + - detailed + - none + group: reasoning + - path: text.verbosity + type: enum + label: Verbosity + description: Controls how concise or detailed the model's final text response should be. + default: medium + values: + - low + - medium + - high + group: output_format diff --git a/models/openai/gpt-5.5.yaml b/models/openai/gpt-5.5.yaml new file mode 100644 index 0000000..af1b65c --- /dev/null +++ b/models/openai/gpt-5.5.yaml @@ -0,0 +1,49 @@ +# yaml-language-server: $schema=https://modelparameters.dev/api/v1/schema.json +provider: openai +authType: api_key +model: gpt-5.5 +params: + - path: max_tokens + type: integer + label: Max tokens + description: Maximum number of output tokens the model may generate. + default: 4096 + 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: 2 + step: 0.1 + group: sampling + - path: top_p + type: number + label: Top P + description: >- + Controls nucleus sampling by limiting generation to tokens whose cumulative probability + reaches this value. + default: 1 + range: + min: 0 + max: 1 + step: 0.01 + group: sampling + - path: reasoning_effort + type: enum + label: Reasoning effort + description: Controls how much reasoning the model should perform before producing an answer. + default: medium + values: + - minimal + - low + - medium + - high + - xhigh + group: reasoning diff --git a/models/openai/gpt-5.yaml b/models/openai/gpt-5.yaml new file mode 100644 index 0000000..5d62f79 --- /dev/null +++ b/models/openai/gpt-5.yaml @@ -0,0 +1,48 @@ +# yaml-language-server: $schema=https://modelparameters.dev/api/v1/schema.json +provider: openai +authType: api_key +model: gpt-5 +params: + - path: max_tokens + type: integer + label: Max tokens + description: Maximum number of output tokens the model may generate. + default: 4096 + 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: 2 + step: 0.1 + group: sampling + - path: top_p + type: number + label: Top P + description: >- + Controls nucleus sampling by limiting generation to tokens whose cumulative probability + reaches this value. + default: 1 + range: + min: 0 + max: 1 + step: 0.01 + group: sampling + - path: reasoning_effort + type: enum + label: Reasoning effort + description: Controls how much reasoning the model should perform before producing an answer. + default: medium + values: + - minimal + - low + - medium + - high + group: reasoning diff --git a/models/openai/o1-mini.yaml b/models/openai/o1-mini.yaml new file mode 100644 index 0000000..cbbd35c --- /dev/null +++ b/models/openai/o1-mini.yaml @@ -0,0 +1,24 @@ +# yaml-language-server: $schema=https://modelparameters.dev/api/v1/schema.json +provider: openai +authType: api_key +model: o1-mini +params: + - path: max_tokens + type: integer + label: Max tokens + description: Maximum number of output tokens the model may generate. + default: 4096 + range: + min: 1 + group: generation_length + - path: reasoning_effort + type: enum + label: Reasoning effort + description: Controls how much reasoning the model should perform before producing an answer. + default: medium + values: + - minimal + - low + - medium + - high + group: reasoning diff --git a/models/openai/o1-preview.yaml b/models/openai/o1-preview.yaml new file mode 100644 index 0000000..566f621 --- /dev/null +++ b/models/openai/o1-preview.yaml @@ -0,0 +1,24 @@ +# yaml-language-server: $schema=https://modelparameters.dev/api/v1/schema.json +provider: openai +authType: api_key +model: o1-preview +params: + - path: max_tokens + type: integer + label: Max tokens + description: Maximum number of output tokens the model may generate. + default: 4096 + range: + min: 1 + group: generation_length + - path: reasoning_effort + type: enum + label: Reasoning effort + description: Controls how much reasoning the model should perform before producing an answer. + default: medium + values: + - minimal + - low + - medium + - high + group: reasoning diff --git a/models/openai/o1-subscription.yaml b/models/openai/o1-subscription.yaml deleted file mode 100644 index f9bef2a..0000000 --- a/models/openai/o1-subscription.yaml +++ /dev/null @@ -1,22 +0,0 @@ -# yaml-language-server: $schema=https://modelparameters.dev/api/v1/schema.json -provider: openai -authType: subscription -model: o1 -params: - - path: custom_instructions - type: string - label: Custom instructions - description: Free-form context applied to every conversation. - group: provider_metadata - - path: memory - type: boolean - label: Memory - description: ChatGPT memory across conversations. Currently limited for o-series models. - default: false - group: tooling - - path: canvas - type: boolean - label: Canvas - description: Open long-form writing or code in the Canvas side panel. - default: false - group: tooling diff --git a/models/openai/o1.yaml b/models/openai/o1.yaml index 0f227cd..35ec80c 100644 --- a/models/openai/o1.yaml +++ b/models/openai/o1.yaml @@ -3,31 +3,22 @@ provider: openai authType: api_key model: o1 params: - - path: max_completion_tokens + - path: max_tokens type: integer - label: Max completion tokens - description: Upper bound on tokens for both reasoning and the visible response. + label: Max tokens + description: Maximum number of output tokens the model may generate. + default: 4096 range: min: 1 group: generation_length - path: reasoning_effort type: enum label: Reasoning effort - description: How much internal reasoning the model should do before answering. + description: Controls how much reasoning the model should perform before producing an answer. default: medium - values: [low, medium, high] + values: + - minimal + - low + - medium + - high group: reasoning - - path: response_format - type: enum - label: Response format - description: Output format constraint. JSON modes use the structured outputs system. - default: text - values: [text, json_schema] - group: output_format - - path: service_tier - type: enum - label: Service tier - description: Latency/cost tier. - default: auto - values: [auto, default, flex] - group: provider_metadata diff --git a/models/openai/o3-mini.yaml b/models/openai/o3-mini.yaml index bdace6a..beb1f43 100644 --- a/models/openai/o3-mini.yaml +++ b/models/openai/o3-mini.yaml @@ -3,37 +3,22 @@ provider: openai authType: api_key model: o3-mini params: - - path: max_completion_tokens + - path: max_tokens type: integer - label: Max completion tokens - description: Upper bound on combined reasoning + response tokens. + label: Max tokens + description: Maximum number of output tokens the model may generate. + default: 4096 range: min: 1 group: generation_length - path: reasoning_effort type: enum label: Reasoning effort - description: How much the model should think before answering. + description: Controls how much reasoning the model should perform before producing an answer. default: medium - values: [low, medium, high] + values: + - minimal + - low + - medium + - high group: reasoning - - path: response_format - type: enum - label: Response format - description: Output format constraint. - default: text - values: [text, json_schema] - group: output_format - - path: stream - type: boolean - label: Stream - description: Stream the visible response (not reasoning tokens). - default: false - group: output_format - - path: service_tier - type: enum - label: Service tier - description: Latency/cost tier. - default: auto - values: [auto, default, flex] - group: provider_metadata diff --git a/models/openai/o3.yaml b/models/openai/o3.yaml new file mode 100644 index 0000000..c2d5af6 --- /dev/null +++ b/models/openai/o3.yaml @@ -0,0 +1,24 @@ +# yaml-language-server: $schema=https://modelparameters.dev/api/v1/schema.json +provider: openai +authType: api_key +model: o3 +params: + - path: max_tokens + type: integer + label: Max tokens + description: Maximum number of output tokens the model may generate. + default: 4096 + range: + min: 1 + group: generation_length + - path: reasoning_effort + type: enum + label: Reasoning effort + description: Controls how much reasoning the model should perform before producing an answer. + default: medium + values: + - minimal + - low + - medium + - high + group: reasoning diff --git a/models/openai/o4-mini.yaml b/models/openai/o4-mini.yaml new file mode 100644 index 0000000..e676838 --- /dev/null +++ b/models/openai/o4-mini.yaml @@ -0,0 +1,24 @@ +# yaml-language-server: $schema=https://modelparameters.dev/api/v1/schema.json +provider: openai +authType: api_key +model: o4-mini +params: + - path: max_tokens + type: integer + label: Max tokens + description: Maximum number of output tokens the model may generate. + default: 4096 + range: + min: 1 + group: generation_length + - path: reasoning_effort + type: enum + label: Reasoning effort + description: Controls how much reasoning the model should perform before producing an answer. + default: medium + values: + - minimal + - low + - medium + - high + group: reasoning diff --git a/src/schema/model.ts b/src/schema/model.ts index 4f2a1f2..1203127 100644 --- a/src/schema/model.ts +++ b/src/schema/model.ts @@ -17,8 +17,10 @@ export const ParameterGroup = z.enum([ ]); export type ParameterGroup = z.infer; -const SLUG = /^[a-z0-9][a-z0-9-]*$/; +const PROVIDER_SLUG = /^[a-z0-9][a-z0-9-]*$/; +const MODEL_ID = /^[a-z0-9][a-z0-9._:-]*$/; const PARAM_PATH = /^[a-z][a-z0-9_]*(\.[a-z][a-z0-9_]*)*$/; +const BLOCKED_PARAM_PATHS = new Set(["stream"]); export const Range = z .object({ @@ -34,24 +36,40 @@ export type Range = z.infer; export const JsonPrimitive = z.union([z.string(), z.number(), z.boolean(), z.null()]); export type JsonPrimitive = z.infer; -const ApplicabilityValue: z.ZodType = z.lazy(() => - z.union([JsonPrimitive, z.array(JsonPrimitive), z.record(z.string(), ApplicabilityValue)]), -); +const JsonPrimitiveArray = z.array(JsonPrimitive).min(1); -export const ApplicabilityRule = z.record(z.string(), ApplicabilityValue); +const ApplicabilityCondition = z + .object({ + not: z.union([JsonPrimitive, JsonPrimitiveArray]), + }) + .strict(); + +const ApplicabilityValue = z.union([JsonPrimitive, JsonPrimitiveArray, ApplicabilityCondition]); + +export const ApplicabilityRule = z + .record( + z.string().regex(PARAM_PATH, "applicability keys must be snake_case dot paths"), + ApplicabilityValue, + ) + .refine((rule) => Object.keys(rule).length > 0, { + message: "applicability rule must contain at least one condition", + }); export type ApplicabilityRule = z.infer; +const ApplicabilityRuleList = z.array(ApplicabilityRule).min(1); + export const Applicability = z .object({ - only: z.union([ApplicabilityRule, z.array(ApplicabilityRule)]).optional(), - except: z.union([ApplicabilityRule, z.array(ApplicabilityRule)]).optional(), + only: z.union([ApplicabilityRule, ApplicabilityRuleList]).optional(), + except: z.union([ApplicabilityRule, ApplicabilityRuleList]).optional(), }) + .strict() .refine((a) => a.only !== undefined || a.except !== undefined, { message: "applicability must define `only`, `except`, or both", }); export type Applicability = z.infer; -const baseParameter = z.object({ +const baseParameterShape = { path: z .string() .min(1) @@ -60,62 +78,106 @@ const baseParameter = z.object({ description: z.string().min(1).max(500), group: ParameterGroup, applicability: Applicability.optional(), -}); - -export const BooleanParameter = baseParameter.extend({ - type: z.literal("boolean"), - default: z.boolean().optional(), -}); - -export const IntegerParameter = baseParameter.extend({ - type: z.literal("integer"), - default: z.number().int().optional(), - range: Range.optional(), -}); - -export const NumberParameter = baseParameter.extend({ - type: z.literal("number"), - default: z.number().optional(), - range: Range.optional(), -}); - -export const StringParameter = baseParameter.extend({ - type: z.literal("string"), - default: z.string().optional(), -}); - -export const EnumParameter = baseParameter.extend({ - type: z.literal("enum"), - default: JsonPrimitive.optional(), - values: z.array(JsonPrimitive).min(1), -}); - -export const Parameter = z.discriminatedUnion("type", [ - BooleanParameter, - IntegerParameter, - NumberParameter, - StringParameter, - EnumParameter, -]); +}; + +export const BooleanParameter = z + .object({ + ...baseParameterShape, + type: z.literal("boolean"), + default: z.boolean().optional(), + }) + .strict(); + +export const IntegerParameter = z + .object({ + ...baseParameterShape, + type: z.literal("integer"), + default: z.number().int().optional(), + range: Range.optional(), + }) + .strict(); + +export const NumberParameter = z + .object({ + ...baseParameterShape, + type: z.literal("number"), + default: z.number().optional(), + range: Range.optional(), + }) + .strict(); + +export const StringParameter = z + .object({ + ...baseParameterShape, + type: z.literal("string"), + default: z.string().optional(), + }) + .strict(); + +export const EnumParameter = z + .object({ + ...baseParameterShape, + type: z.literal("enum"), + default: JsonPrimitive.optional(), + values: z.array(JsonPrimitive).min(1), + }) + .strict(); + +export const Parameter = z + .discriminatedUnion("type", [ + BooleanParameter, + EnumParameter, + IntegerParameter, + NumberParameter, + StringParameter, + ]) + .superRefine((parameter, ctx) => { + if (BLOCKED_PARAM_PATHS.has(parameter.path)) { + ctx.addIssue({ + code: z.ZodIssueCode.custom, + path: ["path"], + message: `${parameter.path} is an API-level capability, not an MPS parameter`, + }); + } + + if ( + parameter.type === "enum" && + parameter.default !== undefined && + !parameter.values.some((value) => value === parameter.default) + ) { + ctx.addIssue({ + code: z.ZodIssueCode.custom, + path: ["default"], + message: "enum default must be one of values", + }); + } + }); export type Parameter = z.infer; -export const Model = z.object({ - provider: z.string().min(1).regex(SLUG, "provider must be a kebab-case slug (e.g. `anthropic`)"), - authType: AuthType, - model: z - .string() - .min(1) - .regex(SLUG, "model must be a kebab-case slug (e.g. `claude-sonnet-4-6`)"), - params: z.array(Parameter), -}); +export const Model = z + .object({ + provider: z + .string() + .min(1) + .regex(PROVIDER_SLUG, "provider must be a kebab-case slug (e.g. `anthropic`)"), + authType: AuthType, + model: z + .string() + .min(1) + .regex(MODEL_ID, "model must be a provider-native model id without path separators"), + params: z.array(Parameter), + }) + .strict(); export type Model = z.infer; -export const Catalog = z.object({ - $schema: z.string().url().optional(), - generatedAt: z.string(), - count: z.number().int().nonnegative(), - models: z.array(Model), -}); +export const Catalog = z + .object({ + $schema: z.string().url().optional(), + generatedAt: z.string(), + count: z.number().int().nonnegative(), + models: z.array(Model), + }) + .strict(); export type Catalog = z.infer; export function authSuffix(authType: AuthType): "" | "-subscription" { diff --git a/tests/catalog.test.ts b/tests/catalog.test.ts index f600839..35b1675 100644 --- a/tests/catalog.test.ts +++ b/tests/catalog.test.ts @@ -19,12 +19,12 @@ function makeModel(overrides: Partial = {}): Model { group: "sampling", }, { - path: "stream", + path: "logprobs", type: "boolean", - label: "Stream", + label: "Log probabilities", description: "y", default: false, - group: "output_format", + group: "observability", }, ], ...overrides, @@ -54,7 +54,7 @@ describe("buildCapabilityFacets", () => { }); const facets = buildCapabilityFacets([m1, m2]); expect(facets[0]).toEqual({ path: "temperature", count: 2 }); - expect(facets.map((f) => f.path)).toContain("stream"); + expect(facets.map((f) => f.path)).toContain("logprobs"); expect(facets.map((f) => f.path)).toContain("top_p"); }); }); diff --git a/tests/schema.test.ts b/tests/schema.test.ts index 02d7d5f..f6239b6 100644 --- a/tests/schema.test.ts +++ b/tests/schema.test.ts @@ -17,12 +17,12 @@ const VALID_MODEL = { group: "sampling", }, { - path: "stream", + path: "logprobs", type: "boolean", - label: "Stream", - description: "Stream tokens.", + label: "Log probabilities", + description: "Return log probabilities of output tokens.", default: false, - group: "output_format", + group: "observability", }, ], }; @@ -38,6 +38,25 @@ describe("Model schema", () => { expect(result.success).toBe(false); }); + it("accepts provider-native model ids with dots", () => { + const result = Model.safeParse({ ...VALID_MODEL, provider: "openai", model: "gpt-4.1" }); + expect(result.success).toBe(true); + }); + + it("rejects path separators in model ids", () => { + const result = Model.safeParse({ + ...VALID_MODEL, + provider: "deepseek", + model: "deepseek/deepseek-chat", + }); + expect(result.success).toBe(false); + }); + + it("rejects unknown top-level fields", () => { + const result = Model.safeParse({ ...VALID_MODEL, metadata: { source: "docs" } }); + expect(result.success).toBe(false); + }); + it("rejects parameter with unknown type", () => { const result = Model.safeParse({ ...VALID_MODEL, @@ -90,6 +109,40 @@ describe("Model schema", () => { expect(result.success).toBe(false); }); + it("rejects API-level capabilities as params", () => { + const result = Model.safeParse({ + ...VALID_MODEL, + params: [ + { + path: "stream", + type: "boolean", + label: "Stream", + description: "Streaming is configured at request/API level.", + default: false, + group: "output_format", + }, + ], + }); + expect(result.success).toBe(false); + }); + + it("rejects unknown parameter fields", () => { + const result = Model.safeParse({ + ...VALID_MODEL, + params: [ + { + path: "temperature", + type: "number", + label: "Temperature", + description: "x", + group: "sampling", + ui: { control: "slider" }, + }, + ], + }); + expect(result.success).toBe(false); + }); + it("accepts dot-notation param paths", () => { const result = Model.safeParse({ ...VALID_MODEL, @@ -127,6 +180,74 @@ describe("Model schema", () => { expect(result.success).toBe(true); }); + it("rejects unknown applicability operators", () => { + const result = Model.safeParse({ + ...VALID_MODEL, + params: [ + { + path: "top_p", + type: "number", + label: "Top P", + description: "x", + group: "sampling", + applicability: { except: [{ temperature: { gte: 1 } }] }, + }, + ], + }); + expect(result.success).toBe(false); + }); + + it("rejects empty applicability arrays and match objects", () => { + const emptyArray = Model.safeParse({ + ...VALID_MODEL, + params: [ + { + path: "top_p", + type: "number", + label: "Top P", + description: "x", + group: "sampling", + applicability: { except: [] }, + }, + ], + }); + const emptyMatch = Model.safeParse({ + ...VALID_MODEL, + params: [ + { + path: "top_p", + type: "number", + label: "Top P", + description: "x", + group: "sampling", + applicability: { except: {} }, + }, + ], + }); + + expect(emptyArray.success).toBe(false); + expect(emptyMatch.success).toBe(false); + }); + + it("rejects enum defaults outside values", () => { + const result = Model.safeParse({ + ...VALID_MODEL, + params: [ + { + path: "reasoning_effort", + type: "enum", + label: "Reasoning effort", + description: "x", + default: "ultra", + values: ["low", "medium", "high"], + group: "reasoning", + }, + ], + }); + + expect(result.success).toBe(false); + }); + it("rejects range where max < min", () => { const result = Model.safeParse({ ...VALID_MODEL, From 545bde3a57474b815999ee88f467de133e05f56e Mon Sep 17 00:00:00 2001 From: Guillaume Gay Date: Wed, 20 May 2026 17:19:21 +0200 Subject: [PATCH 3/4] refactor: organize models by auth folder --- README.md | 4 +- docs/model-parameters-schema.md | 4 ++ .../{ => api}/claude-3-5-haiku-20241022.yaml | 0 .../{ => api}/claude-3-5-haiku-latest.yaml | 0 .../{ => api}/claude-3-5-sonnet-20241022.yaml | 0 .../{ => api}/claude-3-5-sonnet-latest.yaml | 0 .../{ => api}/claude-3-7-sonnet-20250219.yaml | 0 .../{ => api}/claude-3-7-sonnet-latest.yaml | 0 .../{ => api}/claude-3-opus-20240229.yaml | 0 .../{ => api}/claude-3-opus-latest.yaml | 0 .../{ => api}/claude-haiku-4-5-20251001.yaml | 0 .../anthropic/{ => api}/claude-haiku-4-5.yaml | 0 .../anthropic/{ => api}/claude-haiku-4.yaml | 0 .../anthropic/{ => api}/claude-opus-4-6.yaml | 0 .../anthropic/{ => api}/claude-opus-4-7.yaml | 0 models/anthropic/{ => api}/claude-opus-4.yaml | 0 .../{ => api}/claude-sonnet-4-5-20250929.yaml | 0 .../{ => api}/claude-sonnet-4-5.yaml | 0 .../{ => api}/claude-sonnet-4-6.yaml | 0 .../anthropic/{ => api}/claude-sonnet-4.yaml | 0 .../claude-haiku-4.yaml} | 0 .../claude-opus-4.yaml} | 0 .../claude-sonnet-4.yaml} | 0 models/deepseek/{ => api}/deepseek-chat.yaml | 0 models/deepseek/{ => api}/deepseek-v3.1.yaml | 0 models/deepseek/{ => api}/deepseek-v3.2.yaml | 0 models/deepseek/{ => api}/deepseek-v4.yaml | 0 .../openai/{ => api}/chatgpt-4o-latest.yaml | 0 models/openai/{ => api}/gpt-3.5-turbo.yaml | 0 .../{ => api}/gpt-4-turbo-2024-04-09.yaml | 0 models/openai/{ => api}/gpt-4-turbo.yaml | 0 models/openai/{ => api}/gpt-4.1-mini.yaml | 0 models/openai/{ => api}/gpt-4.1-nano.yaml | 0 models/openai/{ => api}/gpt-4.1.yaml | 0 .../openai/{ => api}/gpt-4o-2024-11-20.yaml | 0 models/openai/{ => api}/gpt-4o-mini.yaml | 0 models/openai/{ => api}/gpt-4o.yaml | 0 .../openai/{ => api}/gpt-5-chat-latest.yaml | 0 models/openai/{ => api}/gpt-5-mini.yaml | 0 models/openai/{ => api}/gpt-5-nano.yaml | 0 models/openai/{ => api}/gpt-5.1.yaml | 0 models/openai/{ => api}/gpt-5.2.yaml | 0 models/openai/{ => api}/gpt-5.4-mini.yaml | 0 models/openai/{ => api}/gpt-5.4.yaml | 0 models/openai/{ => api}/gpt-5.5.yaml | 0 models/openai/{ => api}/gpt-5.yaml | 0 models/openai/{ => api}/o1-mini.yaml | 0 models/openai/{ => api}/o1-preview.yaml | 0 models/openai/{ => api}/o1.yaml | 0 models/openai/{ => api}/o3-mini.yaml | 0 models/openai/{ => api}/o3.yaml | 0 models/openai/{ => api}/o4-mini.yaml | 0 .../gpt-5.1-codex-max.yaml} | 0 .../gpt-5.1-codex.yaml} | 0 .../gpt-5.2-codex.yaml} | 0 .../gpt-5.2.yaml} | 0 .../gpt-5.3-codex-spark.yaml} | 0 .../gpt-5.3-codex.yaml} | 0 .../gpt-5.4-mini.yaml} | 0 .../gpt-5.4.yaml} | 0 .../gpt-5.5.yaml} | 0 src/build/build.ts | 9 ++--- src/data/load.ts | 40 +++++++++++++------ src/schema/model.ts | 12 ++++-- src/server/dev.ts | 4 +- src/views/partials/how_to_use.ejs | 8 ++-- tests/load.test.ts | 29 +++++++++----- tests/schema.test.ts | 19 +++++---- 68 files changed, 82 insertions(+), 47 deletions(-) rename models/anthropic/{ => api}/claude-3-5-haiku-20241022.yaml (100%) rename models/anthropic/{ => api}/claude-3-5-haiku-latest.yaml (100%) rename models/anthropic/{ => api}/claude-3-5-sonnet-20241022.yaml (100%) rename models/anthropic/{ => api}/claude-3-5-sonnet-latest.yaml (100%) rename models/anthropic/{ => api}/claude-3-7-sonnet-20250219.yaml (100%) rename models/anthropic/{ => api}/claude-3-7-sonnet-latest.yaml (100%) rename models/anthropic/{ => api}/claude-3-opus-20240229.yaml (100%) rename models/anthropic/{ => api}/claude-3-opus-latest.yaml (100%) rename models/anthropic/{ => api}/claude-haiku-4-5-20251001.yaml (100%) rename models/anthropic/{ => api}/claude-haiku-4-5.yaml (100%) rename models/anthropic/{ => api}/claude-haiku-4.yaml (100%) rename models/anthropic/{ => api}/claude-opus-4-6.yaml (100%) rename models/anthropic/{ => api}/claude-opus-4-7.yaml (100%) rename models/anthropic/{ => api}/claude-opus-4.yaml (100%) rename models/anthropic/{ => api}/claude-sonnet-4-5-20250929.yaml (100%) rename models/anthropic/{ => api}/claude-sonnet-4-5.yaml (100%) rename models/anthropic/{ => api}/claude-sonnet-4-6.yaml (100%) rename models/anthropic/{ => api}/claude-sonnet-4.yaml (100%) rename models/anthropic/{claude-haiku-4-subscription.yaml => subscription/claude-haiku-4.yaml} (100%) rename models/anthropic/{claude-opus-4-subscription.yaml => subscription/claude-opus-4.yaml} (100%) rename models/anthropic/{claude-sonnet-4-subscription.yaml => subscription/claude-sonnet-4.yaml} (100%) rename models/deepseek/{ => api}/deepseek-chat.yaml (100%) rename models/deepseek/{ => api}/deepseek-v3.1.yaml (100%) rename models/deepseek/{ => api}/deepseek-v3.2.yaml (100%) rename models/deepseek/{ => api}/deepseek-v4.yaml (100%) rename models/openai/{ => api}/chatgpt-4o-latest.yaml (100%) rename models/openai/{ => api}/gpt-3.5-turbo.yaml (100%) rename models/openai/{ => api}/gpt-4-turbo-2024-04-09.yaml (100%) rename models/openai/{ => api}/gpt-4-turbo.yaml (100%) rename models/openai/{ => api}/gpt-4.1-mini.yaml (100%) rename models/openai/{ => api}/gpt-4.1-nano.yaml (100%) rename models/openai/{ => api}/gpt-4.1.yaml (100%) rename models/openai/{ => api}/gpt-4o-2024-11-20.yaml (100%) rename models/openai/{ => api}/gpt-4o-mini.yaml (100%) rename models/openai/{ => api}/gpt-4o.yaml (100%) rename models/openai/{ => api}/gpt-5-chat-latest.yaml (100%) rename models/openai/{ => api}/gpt-5-mini.yaml (100%) rename models/openai/{ => api}/gpt-5-nano.yaml (100%) rename models/openai/{ => api}/gpt-5.1.yaml (100%) rename models/openai/{ => api}/gpt-5.2.yaml (100%) rename models/openai/{ => api}/gpt-5.4-mini.yaml (100%) rename models/openai/{ => api}/gpt-5.4.yaml (100%) rename models/openai/{ => api}/gpt-5.5.yaml (100%) rename models/openai/{ => api}/gpt-5.yaml (100%) rename models/openai/{ => api}/o1-mini.yaml (100%) rename models/openai/{ => api}/o1-preview.yaml (100%) rename models/openai/{ => api}/o1.yaml (100%) rename models/openai/{ => api}/o3-mini.yaml (100%) rename models/openai/{ => api}/o3.yaml (100%) rename models/openai/{ => api}/o4-mini.yaml (100%) rename models/openai/{gpt-5.1-codex-max-subscription.yaml => subscription/gpt-5.1-codex-max.yaml} (100%) rename models/openai/{gpt-5.1-codex-subscription.yaml => subscription/gpt-5.1-codex.yaml} (100%) rename models/openai/{gpt-5.2-codex-subscription.yaml => subscription/gpt-5.2-codex.yaml} (100%) rename models/openai/{gpt-5.2-subscription.yaml => subscription/gpt-5.2.yaml} (100%) rename models/openai/{gpt-5.3-codex-spark-subscription.yaml => subscription/gpt-5.3-codex-spark.yaml} (100%) rename models/openai/{gpt-5.3-codex-subscription.yaml => subscription/gpt-5.3-codex.yaml} (100%) rename models/openai/{gpt-5.4-mini-subscription.yaml => subscription/gpt-5.4-mini.yaml} (100%) rename models/openai/{gpt-5.4-subscription.yaml => subscription/gpt-5.4.yaml} (100%) rename models/openai/{gpt-5.5-subscription.yaml => subscription/gpt-5.5.yaml} (100%) diff --git a/README.md b/README.md index bd9bd05..17f5956 100644 --- a/README.md +++ b/README.md @@ -23,8 +23,8 @@ The generated JSON Schema is available at See [CONTRIBUTING.md](CONTRIBUTING.md). The short version: -1. Pick a unique ID: `/` for the API-key variant, `/-subscription` for the subscription variant. Example: `mistral/mistral-large`. -2. Add a YAML file at `models//.yaml` (or `models//-subscription.yaml`). +1. Pick a unique ID: `//`, where `` is `api` or `subscription`. Example: `mistral/api/mistral-large`. +2. Add a YAML file at `models///.yaml`. 3. Open a PR. CI validates against the schema and rebuilds. ## Local development diff --git a/docs/model-parameters-schema.md b/docs/model-parameters-schema.md index 0d5093d..dcadfc0 100644 --- a/docs/model-parameters-schema.md +++ b/docs/model-parameters-schema.md @@ -13,6 +13,7 @@ The public runtime sources are: - `https://modelparameters.dev/api/v1/models.json` - `https://modelparameters.dev/api/v1/schema.json` +- `https://modelparameters.dev/api/v1/models/{provider}/{api|subscription}/{model}.json` ## Catalog Entry @@ -48,6 +49,9 @@ Conventions: - `model` is the provider-native model id without path separators. It may contain dots or colons when the upstream model id does. - `authType` is `api_key` or `subscription`. +- Source files live under `models/{provider}/api/{model}.yaml` for API-key + routes and `models/{provider}/subscription/{model}.yaml` for subscription + routes. The `api` folder maps to `authType: "api_key"`. - `params` is the non-empty list of parameters for that exact route. - `path` is a snake_case dot path into stored params and outbound request params. - `stream` is reserved for API-level streaming capability metadata and is not a diff --git a/models/anthropic/claude-3-5-haiku-20241022.yaml b/models/anthropic/api/claude-3-5-haiku-20241022.yaml similarity index 100% rename from models/anthropic/claude-3-5-haiku-20241022.yaml rename to models/anthropic/api/claude-3-5-haiku-20241022.yaml diff --git a/models/anthropic/claude-3-5-haiku-latest.yaml b/models/anthropic/api/claude-3-5-haiku-latest.yaml similarity index 100% rename from models/anthropic/claude-3-5-haiku-latest.yaml rename to models/anthropic/api/claude-3-5-haiku-latest.yaml diff --git a/models/anthropic/claude-3-5-sonnet-20241022.yaml b/models/anthropic/api/claude-3-5-sonnet-20241022.yaml similarity index 100% rename from models/anthropic/claude-3-5-sonnet-20241022.yaml rename to models/anthropic/api/claude-3-5-sonnet-20241022.yaml diff --git a/models/anthropic/claude-3-5-sonnet-latest.yaml b/models/anthropic/api/claude-3-5-sonnet-latest.yaml similarity index 100% rename from models/anthropic/claude-3-5-sonnet-latest.yaml rename to models/anthropic/api/claude-3-5-sonnet-latest.yaml diff --git a/models/anthropic/claude-3-7-sonnet-20250219.yaml b/models/anthropic/api/claude-3-7-sonnet-20250219.yaml similarity index 100% rename from models/anthropic/claude-3-7-sonnet-20250219.yaml rename to models/anthropic/api/claude-3-7-sonnet-20250219.yaml diff --git a/models/anthropic/claude-3-7-sonnet-latest.yaml b/models/anthropic/api/claude-3-7-sonnet-latest.yaml similarity index 100% rename from models/anthropic/claude-3-7-sonnet-latest.yaml rename to models/anthropic/api/claude-3-7-sonnet-latest.yaml diff --git a/models/anthropic/claude-3-opus-20240229.yaml b/models/anthropic/api/claude-3-opus-20240229.yaml similarity index 100% rename from models/anthropic/claude-3-opus-20240229.yaml rename to models/anthropic/api/claude-3-opus-20240229.yaml diff --git a/models/anthropic/claude-3-opus-latest.yaml b/models/anthropic/api/claude-3-opus-latest.yaml similarity index 100% rename from models/anthropic/claude-3-opus-latest.yaml rename to models/anthropic/api/claude-3-opus-latest.yaml diff --git a/models/anthropic/claude-haiku-4-5-20251001.yaml b/models/anthropic/api/claude-haiku-4-5-20251001.yaml similarity index 100% rename from models/anthropic/claude-haiku-4-5-20251001.yaml rename to models/anthropic/api/claude-haiku-4-5-20251001.yaml diff --git a/models/anthropic/claude-haiku-4-5.yaml b/models/anthropic/api/claude-haiku-4-5.yaml similarity index 100% rename from models/anthropic/claude-haiku-4-5.yaml rename to models/anthropic/api/claude-haiku-4-5.yaml diff --git a/models/anthropic/claude-haiku-4.yaml b/models/anthropic/api/claude-haiku-4.yaml similarity index 100% rename from models/anthropic/claude-haiku-4.yaml rename to models/anthropic/api/claude-haiku-4.yaml diff --git a/models/anthropic/claude-opus-4-6.yaml b/models/anthropic/api/claude-opus-4-6.yaml similarity index 100% rename from models/anthropic/claude-opus-4-6.yaml rename to models/anthropic/api/claude-opus-4-6.yaml diff --git a/models/anthropic/claude-opus-4-7.yaml b/models/anthropic/api/claude-opus-4-7.yaml similarity index 100% rename from models/anthropic/claude-opus-4-7.yaml rename to models/anthropic/api/claude-opus-4-7.yaml diff --git a/models/anthropic/claude-opus-4.yaml b/models/anthropic/api/claude-opus-4.yaml similarity index 100% rename from models/anthropic/claude-opus-4.yaml rename to models/anthropic/api/claude-opus-4.yaml diff --git a/models/anthropic/claude-sonnet-4-5-20250929.yaml b/models/anthropic/api/claude-sonnet-4-5-20250929.yaml similarity index 100% rename from models/anthropic/claude-sonnet-4-5-20250929.yaml rename to models/anthropic/api/claude-sonnet-4-5-20250929.yaml diff --git a/models/anthropic/claude-sonnet-4-5.yaml b/models/anthropic/api/claude-sonnet-4-5.yaml similarity index 100% rename from models/anthropic/claude-sonnet-4-5.yaml rename to models/anthropic/api/claude-sonnet-4-5.yaml diff --git a/models/anthropic/claude-sonnet-4-6.yaml b/models/anthropic/api/claude-sonnet-4-6.yaml similarity index 100% rename from models/anthropic/claude-sonnet-4-6.yaml rename to models/anthropic/api/claude-sonnet-4-6.yaml diff --git a/models/anthropic/claude-sonnet-4.yaml b/models/anthropic/api/claude-sonnet-4.yaml similarity index 100% rename from models/anthropic/claude-sonnet-4.yaml rename to models/anthropic/api/claude-sonnet-4.yaml diff --git a/models/anthropic/claude-haiku-4-subscription.yaml b/models/anthropic/subscription/claude-haiku-4.yaml similarity index 100% rename from models/anthropic/claude-haiku-4-subscription.yaml rename to models/anthropic/subscription/claude-haiku-4.yaml diff --git a/models/anthropic/claude-opus-4-subscription.yaml b/models/anthropic/subscription/claude-opus-4.yaml similarity index 100% rename from models/anthropic/claude-opus-4-subscription.yaml rename to models/anthropic/subscription/claude-opus-4.yaml diff --git a/models/anthropic/claude-sonnet-4-subscription.yaml b/models/anthropic/subscription/claude-sonnet-4.yaml similarity index 100% rename from models/anthropic/claude-sonnet-4-subscription.yaml rename to models/anthropic/subscription/claude-sonnet-4.yaml diff --git a/models/deepseek/deepseek-chat.yaml b/models/deepseek/api/deepseek-chat.yaml similarity index 100% rename from models/deepseek/deepseek-chat.yaml rename to models/deepseek/api/deepseek-chat.yaml diff --git a/models/deepseek/deepseek-v3.1.yaml b/models/deepseek/api/deepseek-v3.1.yaml similarity index 100% rename from models/deepseek/deepseek-v3.1.yaml rename to models/deepseek/api/deepseek-v3.1.yaml diff --git a/models/deepseek/deepseek-v3.2.yaml b/models/deepseek/api/deepseek-v3.2.yaml similarity index 100% rename from models/deepseek/deepseek-v3.2.yaml rename to models/deepseek/api/deepseek-v3.2.yaml diff --git a/models/deepseek/deepseek-v4.yaml b/models/deepseek/api/deepseek-v4.yaml similarity index 100% rename from models/deepseek/deepseek-v4.yaml rename to models/deepseek/api/deepseek-v4.yaml diff --git a/models/openai/chatgpt-4o-latest.yaml b/models/openai/api/chatgpt-4o-latest.yaml similarity index 100% rename from models/openai/chatgpt-4o-latest.yaml rename to models/openai/api/chatgpt-4o-latest.yaml diff --git a/models/openai/gpt-3.5-turbo.yaml b/models/openai/api/gpt-3.5-turbo.yaml similarity index 100% rename from models/openai/gpt-3.5-turbo.yaml rename to models/openai/api/gpt-3.5-turbo.yaml diff --git a/models/openai/gpt-4-turbo-2024-04-09.yaml b/models/openai/api/gpt-4-turbo-2024-04-09.yaml similarity index 100% rename from models/openai/gpt-4-turbo-2024-04-09.yaml rename to models/openai/api/gpt-4-turbo-2024-04-09.yaml diff --git a/models/openai/gpt-4-turbo.yaml b/models/openai/api/gpt-4-turbo.yaml similarity index 100% rename from models/openai/gpt-4-turbo.yaml rename to models/openai/api/gpt-4-turbo.yaml diff --git a/models/openai/gpt-4.1-mini.yaml b/models/openai/api/gpt-4.1-mini.yaml similarity index 100% rename from models/openai/gpt-4.1-mini.yaml rename to models/openai/api/gpt-4.1-mini.yaml diff --git a/models/openai/gpt-4.1-nano.yaml b/models/openai/api/gpt-4.1-nano.yaml similarity index 100% rename from models/openai/gpt-4.1-nano.yaml rename to models/openai/api/gpt-4.1-nano.yaml diff --git a/models/openai/gpt-4.1.yaml b/models/openai/api/gpt-4.1.yaml similarity index 100% rename from models/openai/gpt-4.1.yaml rename to models/openai/api/gpt-4.1.yaml diff --git a/models/openai/gpt-4o-2024-11-20.yaml b/models/openai/api/gpt-4o-2024-11-20.yaml similarity index 100% rename from models/openai/gpt-4o-2024-11-20.yaml rename to models/openai/api/gpt-4o-2024-11-20.yaml diff --git a/models/openai/gpt-4o-mini.yaml b/models/openai/api/gpt-4o-mini.yaml similarity index 100% rename from models/openai/gpt-4o-mini.yaml rename to models/openai/api/gpt-4o-mini.yaml diff --git a/models/openai/gpt-4o.yaml b/models/openai/api/gpt-4o.yaml similarity index 100% rename from models/openai/gpt-4o.yaml rename to models/openai/api/gpt-4o.yaml diff --git a/models/openai/gpt-5-chat-latest.yaml b/models/openai/api/gpt-5-chat-latest.yaml similarity index 100% rename from models/openai/gpt-5-chat-latest.yaml rename to models/openai/api/gpt-5-chat-latest.yaml diff --git a/models/openai/gpt-5-mini.yaml b/models/openai/api/gpt-5-mini.yaml similarity index 100% rename from models/openai/gpt-5-mini.yaml rename to models/openai/api/gpt-5-mini.yaml diff --git a/models/openai/gpt-5-nano.yaml b/models/openai/api/gpt-5-nano.yaml similarity index 100% rename from models/openai/gpt-5-nano.yaml rename to models/openai/api/gpt-5-nano.yaml diff --git a/models/openai/gpt-5.1.yaml b/models/openai/api/gpt-5.1.yaml similarity index 100% rename from models/openai/gpt-5.1.yaml rename to models/openai/api/gpt-5.1.yaml diff --git a/models/openai/gpt-5.2.yaml b/models/openai/api/gpt-5.2.yaml similarity index 100% rename from models/openai/gpt-5.2.yaml rename to models/openai/api/gpt-5.2.yaml diff --git a/models/openai/gpt-5.4-mini.yaml b/models/openai/api/gpt-5.4-mini.yaml similarity index 100% rename from models/openai/gpt-5.4-mini.yaml rename to models/openai/api/gpt-5.4-mini.yaml diff --git a/models/openai/gpt-5.4.yaml b/models/openai/api/gpt-5.4.yaml similarity index 100% rename from models/openai/gpt-5.4.yaml rename to models/openai/api/gpt-5.4.yaml diff --git a/models/openai/gpt-5.5.yaml b/models/openai/api/gpt-5.5.yaml similarity index 100% rename from models/openai/gpt-5.5.yaml rename to models/openai/api/gpt-5.5.yaml diff --git a/models/openai/gpt-5.yaml b/models/openai/api/gpt-5.yaml similarity index 100% rename from models/openai/gpt-5.yaml rename to models/openai/api/gpt-5.yaml diff --git a/models/openai/o1-mini.yaml b/models/openai/api/o1-mini.yaml similarity index 100% rename from models/openai/o1-mini.yaml rename to models/openai/api/o1-mini.yaml diff --git a/models/openai/o1-preview.yaml b/models/openai/api/o1-preview.yaml similarity index 100% rename from models/openai/o1-preview.yaml rename to models/openai/api/o1-preview.yaml diff --git a/models/openai/o1.yaml b/models/openai/api/o1.yaml similarity index 100% rename from models/openai/o1.yaml rename to models/openai/api/o1.yaml diff --git a/models/openai/o3-mini.yaml b/models/openai/api/o3-mini.yaml similarity index 100% rename from models/openai/o3-mini.yaml rename to models/openai/api/o3-mini.yaml diff --git a/models/openai/o3.yaml b/models/openai/api/o3.yaml similarity index 100% rename from models/openai/o3.yaml rename to models/openai/api/o3.yaml diff --git a/models/openai/o4-mini.yaml b/models/openai/api/o4-mini.yaml similarity index 100% rename from models/openai/o4-mini.yaml rename to models/openai/api/o4-mini.yaml diff --git a/models/openai/gpt-5.1-codex-max-subscription.yaml b/models/openai/subscription/gpt-5.1-codex-max.yaml similarity index 100% rename from models/openai/gpt-5.1-codex-max-subscription.yaml rename to models/openai/subscription/gpt-5.1-codex-max.yaml diff --git a/models/openai/gpt-5.1-codex-subscription.yaml b/models/openai/subscription/gpt-5.1-codex.yaml similarity index 100% rename from models/openai/gpt-5.1-codex-subscription.yaml rename to models/openai/subscription/gpt-5.1-codex.yaml diff --git a/models/openai/gpt-5.2-codex-subscription.yaml b/models/openai/subscription/gpt-5.2-codex.yaml similarity index 100% rename from models/openai/gpt-5.2-codex-subscription.yaml rename to models/openai/subscription/gpt-5.2-codex.yaml diff --git a/models/openai/gpt-5.2-subscription.yaml b/models/openai/subscription/gpt-5.2.yaml similarity index 100% rename from models/openai/gpt-5.2-subscription.yaml rename to models/openai/subscription/gpt-5.2.yaml diff --git a/models/openai/gpt-5.3-codex-spark-subscription.yaml b/models/openai/subscription/gpt-5.3-codex-spark.yaml similarity index 100% rename from models/openai/gpt-5.3-codex-spark-subscription.yaml rename to models/openai/subscription/gpt-5.3-codex-spark.yaml diff --git a/models/openai/gpt-5.3-codex-subscription.yaml b/models/openai/subscription/gpt-5.3-codex.yaml similarity index 100% rename from models/openai/gpt-5.3-codex-subscription.yaml rename to models/openai/subscription/gpt-5.3-codex.yaml diff --git a/models/openai/gpt-5.4-mini-subscription.yaml b/models/openai/subscription/gpt-5.4-mini.yaml similarity index 100% rename from models/openai/gpt-5.4-mini-subscription.yaml rename to models/openai/subscription/gpt-5.4-mini.yaml diff --git a/models/openai/gpt-5.4-subscription.yaml b/models/openai/subscription/gpt-5.4.yaml similarity index 100% rename from models/openai/gpt-5.4-subscription.yaml rename to models/openai/subscription/gpt-5.4.yaml diff --git a/models/openai/gpt-5.5-subscription.yaml b/models/openai/subscription/gpt-5.5.yaml similarity index 100% rename from models/openai/gpt-5.5-subscription.yaml rename to models/openai/subscription/gpt-5.5.yaml diff --git a/src/build/build.ts b/src/build/build.ts index e49e012..0dfe690 100644 --- a/src/build/build.ts +++ b/src/build/build.ts @@ -51,8 +51,7 @@ async function writeApiIndex(modelCount: number): Promise { endpoints: { catalog: "/api/v1/models.json", schema: "/api/v1/schema.json", - modelByIdApiKey: "/api/v1/models/{provider}/{model}.json", - modelByIdSubscription: "/api/v1/models/{provider}/{model}-subscription.json", + modelById: "/api/v1/models/{provider}/{auth}/{model}.json", }, modelCount, docs: "https://github.com/modelparameters/modelparameters.dev#api", @@ -88,9 +87,9 @@ export async function build(): Promise<{ models: number }> { await writeJson(path.join(DIST_API_DIR, "schema.json"), buildModelJsonSchema()); await writeApiIndex(catalog.count); for (const model of models) { - const [provider, slug] = modelId(model).split("/"); - if (!provider || !slug) continue; - await writeJson(path.join(DIST_API_DIR, "models", provider, `${slug}.json`), { + const [provider, auth, slug] = modelId(model).split("/"); + if (!provider || !auth || !slug) continue; + await writeJson(path.join(DIST_API_DIR, "models", provider, auth, `${slug}.json`), { $schema: "https://modelparameters.dev/api/v1/schema.json", ...model, }); diff --git a/src/data/load.ts b/src/data/load.ts index fe0e169..d89b0f5 100644 --- a/src/data/load.ts +++ b/src/data/load.ts @@ -2,7 +2,13 @@ import fs from "node:fs/promises"; import path from "node:path"; import yaml from "js-yaml"; import { z } from "zod"; -import { Model, modelId, type Model as ModelType } from "../schema/model.js"; +import { + Model, + authPathSegment, + authTypeFromPathSegment, + modelId, + type Model as ModelType, +} from "../schema/model.js"; import { MODELS_DIR } from "./paths.js"; export interface LoadIssue { @@ -45,13 +51,12 @@ function formatZodIssue(error: z.ZodError): string { function expectedIdFromPath(file: string, modelsDir: string): string { const rel = path.relative(modelsDir, file); const parts = rel.split(path.sep); - if (parts.length < 2) return ""; - const provider = parts[0]!; - const filename = parts - .slice(1) - .join("/") - .replace(/\.(ya?ml)$/i, ""); - return `${provider}/${filename}`; + if (parts.length !== 3) return ""; + const [provider, authSegment, filename] = parts; + const authType = authTypeFromPathSegment(authSegment!); + if (!provider || !authType || !filename) return ""; + const model = filename.replace(/\.(ya?ml)$/i, ""); + return `${provider}/${authPathSegment(authType)}/${model}`; } function validateOne( @@ -65,15 +70,26 @@ function validateOne( } const model = parsed.data; const expectedId = expectedIdFromPath(file, modelsDir); + if (!expectedId) { + return { + issue: { + file, + message: 'model files must live at "models/{provider}/{api|subscription}/{model}.yaml".', + }, + }; + } const derivedId = modelId(model); - if (expectedId && derivedId !== expectedId) { - const expectedFilename = - model.authType === "api_key" ? `${model.model}.yaml` : `${model.model}-subscription.yaml`; + if (derivedId !== expectedId) { + const expectedFilename = path.join( + model.provider, + authPathSegment(model.authType), + `${model.model}.yaml`, + ); return { issue: { file, - message: `derived id "${derivedId}" does not match expected id "${expectedId}" from file path. Expected filename "${expectedFilename}".`, + message: `derived id "${derivedId}" does not match expected id "${expectedId}" from file path. Expected path "${expectedFilename}".`, }, }; } diff --git a/src/schema/model.ts b/src/schema/model.ts index 1203127..e6aec8f 100644 --- a/src/schema/model.ts +++ b/src/schema/model.ts @@ -180,10 +180,16 @@ export const Catalog = z .strict(); export type Catalog = z.infer; -export function authSuffix(authType: AuthType): "" | "-subscription" { - return authType === "api_key" ? "" : "-subscription"; +export function authPathSegment(authType: AuthType): "api" | "subscription" { + return authType === "api_key" ? "api" : "subscription"; +} + +export function authTypeFromPathSegment(segment: string): AuthType | null { + if (segment === "api") return "api_key"; + if (segment === "subscription") return "subscription"; + return null; } export function modelId(model: Pick): string { - return `${model.provider}/${model.model}${authSuffix(model.authType)}`; + return `${model.provider}/${authPathSegment(model.authType)}/${model.model}`; } diff --git a/src/server/dev.ts b/src/server/dev.ts index 190dd6b..cbda8f5 100644 --- a/src/server/dev.ts +++ b/src/server/dev.ts @@ -88,10 +88,10 @@ function makeApp(): express.Express { res.json(buildModelJsonSchema()); }); - app.get("/api/v1/models/:provider/:slug.json", async (req, res, next) => { + app.get("/api/v1/models/:provider/:auth/:slug.json", async (req, res, next) => { try { const { models } = await getCache(); - const wanted = `${req.params.provider}/${req.params.slug}`; + const wanted = `${req.params.provider}/${req.params.auth}/${req.params.slug}`; const model = models.find((m) => modelId(m) === wanted); if (!model) { res.status(404).json({ error: "not_found", id: wanted }); diff --git a/src/views/partials/how_to_use.ejs b/src/views/partials/how_to_use.ejs index 1762543..f6e2ce4 100644 --- a/src/views/partials/how_to_use.ejs +++ b/src/views/partials/how_to_use.ejs @@ -36,14 +36,14 @@

The full catalog is static JSON, CORS-enabled, served from the edge.

curl https://modelparameters.dev/api/v1/models.json

- Each entry is keyed by provider/model for API-key variants; subscription variants append -subscription. + Each entry is keyed by provider/auth/model, where auth is api or subscription.

Single model

-
curl https://modelparameters.dev/api/v1/models/anthropic/claude-opus-4-7.json
-curl https://modelparameters.dev/api/v1/models/anthropic/claude-opus-4-7-subscription.json
+
curl https://modelparameters.dev/api/v1/models/anthropic/api/claude-opus-4-7.json
+curl https://modelparameters.dev/api/v1/models/anthropic/subscription/claude-opus-4.json
@@ -73,7 +73,7 @@ curl

Contribute

- The data lives in YAML under models/{provider}/{model}-{auth}.yaml + The data lives in YAML under models/{provider}/{api|subscription}/{model}.yaml in the GitHub repo. Open a PR; CI validates against the schema and rebuilds.

diff --git a/tests/load.test.ts b/tests/load.test.ts index 565cf3c..97bed44 100644 --- a/tests/load.test.ts +++ b/tests/load.test.ts @@ -50,42 +50,49 @@ async function writeModel(rel: string, body: string): Promise { } describe("loadAllModels", () => { - it("loads valid YAML files (api_key is bare, subscription is suffixed)", async () => { - await writeModel("anthropic/claude-opus-4-7.yaml", VALID_OPUS); - await writeModel("anthropic/claude-opus-4-7-subscription.yaml", VALID_OPUS_SUB); + it("loads valid YAML files from provider/auth/model paths", async () => { + await writeModel("anthropic/api/claude-opus-4-7.yaml", VALID_OPUS); + await writeModel("anthropic/subscription/claude-opus-4-7.yaml", VALID_OPUS_SUB); const result = await loadAllModels(tmpRoot); expect(result.issues).toEqual([]); expect(result.models).toHaveLength(2); expect(result.models.map(modelId).sort()).toEqual([ - "anthropic/claude-opus-4-7", - "anthropic/claude-opus-4-7-subscription", + "anthropic/api/claude-opus-4-7", + "anthropic/subscription/claude-opus-4-7", ]); }); it("flags provider/path mismatch", async () => { - await writeModel("openai/claude-opus-4-7.yaml", VALID_OPUS); + await writeModel("openai/api/claude-opus-4-7.yaml", VALID_OPUS); const result = await loadAllModels(tmpRoot); expect(result.issues).toHaveLength(1); expect(result.issues[0]?.message).toMatch(/does not match expected id/); }); - it("flags an api_key model placed in a -subscription filename", async () => { - await writeModel("anthropic/claude-opus-4-7-subscription.yaml", VALID_OPUS); + it("flags an api_key model placed in a subscription folder", async () => { + await writeModel("anthropic/subscription/claude-opus-4-7.yaml", VALID_OPUS); const result = await loadAllModels(tmpRoot); expect(result.issues).toHaveLength(1); expect(result.issues[0]?.message).toMatch(/does not match expected id/); }); - it("flags a subscription model placed in a bare filename", async () => { - await writeModel("anthropic/claude-opus-4-7.yaml", VALID_OPUS_SUB); + it("flags a subscription model placed in an api folder", async () => { + await writeModel("anthropic/api/claude-opus-4-7.yaml", VALID_OPUS_SUB); const result = await loadAllModels(tmpRoot); expect(result.issues).toHaveLength(1); expect(result.issues[0]?.message).toMatch(/does not match expected id/); }); + it("flags an unsupported auth path folder", async () => { + await writeModel("anthropic/api_key/claude-opus-4-7.yaml", VALID_OPUS); + const result = await loadAllModels(tmpRoot); + expect(result.issues).toHaveLength(1); + expect(result.issues[0]?.message).toMatch(/models\/\{provider\}\/\{api\|subscription\}/); + }); + it("reports YAML parse errors", async () => { - await writeModel("anthropic/broken.yaml", "provider: anthropic\n : : :"); + await writeModel("anthropic/api/broken.yaml", "provider: anthropic\n : : :"); const result = await loadAllModels(tmpRoot); expect(result.issues.length).toBeGreaterThan(0); }); diff --git a/tests/schema.test.ts b/tests/schema.test.ts index f6239b6..5bca7b6 100644 --- a/tests/schema.test.ts +++ b/tests/schema.test.ts @@ -1,5 +1,5 @@ import { describe, it, expect } from "vitest"; -import { Model, modelId, authSuffix } from "../src/schema/model.js"; +import { Model, authPathSegment, authTypeFromPathSegment, modelId } from "../src/schema/model.js"; import { buildModelJsonSchema } from "../src/schema/generate.js"; const VALID_MODEL = { @@ -266,19 +266,22 @@ describe("Model schema", () => { }); }); -describe("modelId / authSuffix", () => { - it("derives id from provider/model/authType (no suffix for api_key)", () => { +describe("modelId / auth path helpers", () => { + it("derives id from provider/authType/model", () => { expect(modelId({ provider: "anthropic", model: "claude-opus-4-7", authType: "api_key" })).toBe( - "anthropic/claude-opus-4-7", + "anthropic/api/claude-opus-4-7", ); expect(modelId({ provider: "openai", model: "gpt-4o", authType: "subscription" })).toBe( - "openai/gpt-4o-subscription", + "openai/subscription/gpt-4o", ); }); - it("authSuffix returns empty for api_key, -subscription otherwise", () => { - expect(authSuffix("api_key")).toBe(""); - expect(authSuffix("subscription")).toBe("-subscription"); + it("maps public auth path segments to schema auth types", () => { + expect(authPathSegment("api_key")).toBe("api"); + expect(authPathSegment("subscription")).toBe("subscription"); + expect(authTypeFromPathSegment("api")).toBe("api_key"); + expect(authTypeFromPathSegment("subscription")).toBe("subscription"); + expect(authTypeFromPathSegment("api_key")).toBeNull(); }); }); From da9169a40d23c4298884d16f3c97f01c3f543d14 Mon Sep 17 00:00:00 2001 From: Guillaume Gay Date: Wed, 20 May 2026 19:44:15 +0200 Subject: [PATCH 4/4] Revert "refactor: organize models by auth folder" This reverts commit 545bde3a57474b815999ee88f467de133e05f56e. --- README.md | 4 +- docs/model-parameters-schema.md | 4 -- .../{api => }/claude-3-5-haiku-20241022.yaml | 0 .../{api => }/claude-3-5-haiku-latest.yaml | 0 .../{api => }/claude-3-5-sonnet-20241022.yaml | 0 .../{api => }/claude-3-5-sonnet-latest.yaml | 0 .../{api => }/claude-3-7-sonnet-20250219.yaml | 0 .../{api => }/claude-3-7-sonnet-latest.yaml | 0 .../{api => }/claude-3-opus-20240229.yaml | 0 .../{api => }/claude-3-opus-latest.yaml | 0 .../{api => }/claude-haiku-4-5-20251001.yaml | 0 .../anthropic/{api => }/claude-haiku-4-5.yaml | 0 ....yaml => claude-haiku-4-subscription.yaml} | 0 .../anthropic/{api => }/claude-haiku-4.yaml | 0 .../anthropic/{api => }/claude-opus-4-6.yaml | 0 .../anthropic/{api => }/claude-opus-4-7.yaml | 0 ...4.yaml => claude-opus-4-subscription.yaml} | 0 models/anthropic/{api => }/claude-opus-4.yaml | 0 .../{api => }/claude-sonnet-4-5-20250929.yaml | 0 .../{api => }/claude-sonnet-4-5.yaml | 0 .../{api => }/claude-sonnet-4-6.yaml | 0 ...yaml => claude-sonnet-4-subscription.yaml} | 0 .../anthropic/{api => }/claude-sonnet-4.yaml | 0 models/deepseek/{api => }/deepseek-chat.yaml | 0 models/deepseek/{api => }/deepseek-v3.1.yaml | 0 models/deepseek/{api => }/deepseek-v3.2.yaml | 0 models/deepseek/{api => }/deepseek-v4.yaml | 0 .../openai/{api => }/chatgpt-4o-latest.yaml | 0 models/openai/{api => }/gpt-3.5-turbo.yaml | 0 .../{api => }/gpt-4-turbo-2024-04-09.yaml | 0 models/openai/{api => }/gpt-4-turbo.yaml | 0 models/openai/{api => }/gpt-4.1-mini.yaml | 0 models/openai/{api => }/gpt-4.1-nano.yaml | 0 models/openai/{api => }/gpt-4.1.yaml | 0 .../openai/{api => }/gpt-4o-2024-11-20.yaml | 0 models/openai/{api => }/gpt-4o-mini.yaml | 0 models/openai/{api => }/gpt-4o.yaml | 0 .../openai/{api => }/gpt-5-chat-latest.yaml | 0 models/openai/{api => }/gpt-5-mini.yaml | 0 models/openai/{api => }/gpt-5-nano.yaml | 0 ...ml => gpt-5.1-codex-max-subscription.yaml} | 0 ...x.yaml => gpt-5.1-codex-subscription.yaml} | 0 models/openai/{api => }/gpt-5.1.yaml | 0 ...x.yaml => gpt-5.2-codex-subscription.yaml} | 0 ...gpt-5.2.yaml => gpt-5.2-subscription.yaml} | 0 models/openai/{api => }/gpt-5.2.yaml | 0 ... => gpt-5.3-codex-spark-subscription.yaml} | 0 ...x.yaml => gpt-5.3-codex-subscription.yaml} | 0 ...ni.yaml => gpt-5.4-mini-subscription.yaml} | 0 models/openai/{api => }/gpt-5.4-mini.yaml | 0 ...gpt-5.4.yaml => gpt-5.4-subscription.yaml} | 0 models/openai/{api => }/gpt-5.4.yaml | 0 ...gpt-5.5.yaml => gpt-5.5-subscription.yaml} | 0 models/openai/{api => }/gpt-5.5.yaml | 0 models/openai/{api => }/gpt-5.yaml | 0 models/openai/{api => }/o1-mini.yaml | 0 models/openai/{api => }/o1-preview.yaml | 0 models/openai/{api => }/o1.yaml | 0 models/openai/{api => }/o3-mini.yaml | 0 models/openai/{api => }/o3.yaml | 0 models/openai/{api => }/o4-mini.yaml | 0 src/build/build.ts | 9 +++-- src/data/load.ts | 40 ++++++------------- src/schema/model.ts | 12 ++---- src/server/dev.ts | 4 +- src/views/partials/how_to_use.ejs | 8 ++-- tests/load.test.ts | 29 +++++--------- tests/schema.test.ts | 19 ++++----- 68 files changed, 47 insertions(+), 82 deletions(-) rename models/anthropic/{api => }/claude-3-5-haiku-20241022.yaml (100%) rename models/anthropic/{api => }/claude-3-5-haiku-latest.yaml (100%) rename models/anthropic/{api => }/claude-3-5-sonnet-20241022.yaml (100%) rename models/anthropic/{api => }/claude-3-5-sonnet-latest.yaml (100%) rename models/anthropic/{api => }/claude-3-7-sonnet-20250219.yaml (100%) rename models/anthropic/{api => }/claude-3-7-sonnet-latest.yaml (100%) rename models/anthropic/{api => }/claude-3-opus-20240229.yaml (100%) rename models/anthropic/{api => }/claude-3-opus-latest.yaml (100%) rename models/anthropic/{api => }/claude-haiku-4-5-20251001.yaml (100%) rename models/anthropic/{api => }/claude-haiku-4-5.yaml (100%) rename models/anthropic/{subscription/claude-haiku-4.yaml => claude-haiku-4-subscription.yaml} (100%) rename models/anthropic/{api => }/claude-haiku-4.yaml (100%) rename models/anthropic/{api => }/claude-opus-4-6.yaml (100%) rename models/anthropic/{api => }/claude-opus-4-7.yaml (100%) rename models/anthropic/{subscription/claude-opus-4.yaml => claude-opus-4-subscription.yaml} (100%) rename models/anthropic/{api => }/claude-opus-4.yaml (100%) rename models/anthropic/{api => }/claude-sonnet-4-5-20250929.yaml (100%) rename models/anthropic/{api => }/claude-sonnet-4-5.yaml (100%) rename models/anthropic/{api => }/claude-sonnet-4-6.yaml (100%) rename models/anthropic/{subscription/claude-sonnet-4.yaml => claude-sonnet-4-subscription.yaml} (100%) rename models/anthropic/{api => }/claude-sonnet-4.yaml (100%) rename models/deepseek/{api => }/deepseek-chat.yaml (100%) rename models/deepseek/{api => }/deepseek-v3.1.yaml (100%) rename models/deepseek/{api => }/deepseek-v3.2.yaml (100%) rename models/deepseek/{api => }/deepseek-v4.yaml (100%) rename models/openai/{api => }/chatgpt-4o-latest.yaml (100%) rename models/openai/{api => }/gpt-3.5-turbo.yaml (100%) rename models/openai/{api => }/gpt-4-turbo-2024-04-09.yaml (100%) rename models/openai/{api => }/gpt-4-turbo.yaml (100%) rename models/openai/{api => }/gpt-4.1-mini.yaml (100%) rename models/openai/{api => }/gpt-4.1-nano.yaml (100%) rename models/openai/{api => }/gpt-4.1.yaml (100%) rename models/openai/{api => }/gpt-4o-2024-11-20.yaml (100%) rename models/openai/{api => }/gpt-4o-mini.yaml (100%) rename models/openai/{api => }/gpt-4o.yaml (100%) rename models/openai/{api => }/gpt-5-chat-latest.yaml (100%) rename models/openai/{api => }/gpt-5-mini.yaml (100%) rename models/openai/{api => }/gpt-5-nano.yaml (100%) rename models/openai/{subscription/gpt-5.1-codex-max.yaml => gpt-5.1-codex-max-subscription.yaml} (100%) rename models/openai/{subscription/gpt-5.1-codex.yaml => gpt-5.1-codex-subscription.yaml} (100%) rename models/openai/{api => }/gpt-5.1.yaml (100%) rename models/openai/{subscription/gpt-5.2-codex.yaml => gpt-5.2-codex-subscription.yaml} (100%) rename models/openai/{subscription/gpt-5.2.yaml => gpt-5.2-subscription.yaml} (100%) rename models/openai/{api => }/gpt-5.2.yaml (100%) rename models/openai/{subscription/gpt-5.3-codex-spark.yaml => gpt-5.3-codex-spark-subscription.yaml} (100%) rename models/openai/{subscription/gpt-5.3-codex.yaml => gpt-5.3-codex-subscription.yaml} (100%) rename models/openai/{subscription/gpt-5.4-mini.yaml => gpt-5.4-mini-subscription.yaml} (100%) rename models/openai/{api => }/gpt-5.4-mini.yaml (100%) rename models/openai/{subscription/gpt-5.4.yaml => gpt-5.4-subscription.yaml} (100%) rename models/openai/{api => }/gpt-5.4.yaml (100%) rename models/openai/{subscription/gpt-5.5.yaml => gpt-5.5-subscription.yaml} (100%) rename models/openai/{api => }/gpt-5.5.yaml (100%) rename models/openai/{api => }/gpt-5.yaml (100%) rename models/openai/{api => }/o1-mini.yaml (100%) rename models/openai/{api => }/o1-preview.yaml (100%) rename models/openai/{api => }/o1.yaml (100%) rename models/openai/{api => }/o3-mini.yaml (100%) rename models/openai/{api => }/o3.yaml (100%) rename models/openai/{api => }/o4-mini.yaml (100%) diff --git a/README.md b/README.md index 17f5956..bd9bd05 100644 --- a/README.md +++ b/README.md @@ -23,8 +23,8 @@ The generated JSON Schema is available at See [CONTRIBUTING.md](CONTRIBUTING.md). The short version: -1. Pick a unique ID: `//`, where `` is `api` or `subscription`. Example: `mistral/api/mistral-large`. -2. Add a YAML file at `models///.yaml`. +1. Pick a unique ID: `/` for the API-key variant, `/-subscription` for the subscription variant. Example: `mistral/mistral-large`. +2. Add a YAML file at `models//.yaml` (or `models//-subscription.yaml`). 3. Open a PR. CI validates against the schema and rebuilds. ## Local development diff --git a/docs/model-parameters-schema.md b/docs/model-parameters-schema.md index dcadfc0..0d5093d 100644 --- a/docs/model-parameters-schema.md +++ b/docs/model-parameters-schema.md @@ -13,7 +13,6 @@ The public runtime sources are: - `https://modelparameters.dev/api/v1/models.json` - `https://modelparameters.dev/api/v1/schema.json` -- `https://modelparameters.dev/api/v1/models/{provider}/{api|subscription}/{model}.json` ## Catalog Entry @@ -49,9 +48,6 @@ Conventions: - `model` is the provider-native model id without path separators. It may contain dots or colons when the upstream model id does. - `authType` is `api_key` or `subscription`. -- Source files live under `models/{provider}/api/{model}.yaml` for API-key - routes and `models/{provider}/subscription/{model}.yaml` for subscription - routes. The `api` folder maps to `authType: "api_key"`. - `params` is the non-empty list of parameters for that exact route. - `path` is a snake_case dot path into stored params and outbound request params. - `stream` is reserved for API-level streaming capability metadata and is not a diff --git a/models/anthropic/api/claude-3-5-haiku-20241022.yaml b/models/anthropic/claude-3-5-haiku-20241022.yaml similarity index 100% rename from models/anthropic/api/claude-3-5-haiku-20241022.yaml rename to models/anthropic/claude-3-5-haiku-20241022.yaml diff --git a/models/anthropic/api/claude-3-5-haiku-latest.yaml b/models/anthropic/claude-3-5-haiku-latest.yaml similarity index 100% rename from models/anthropic/api/claude-3-5-haiku-latest.yaml rename to models/anthropic/claude-3-5-haiku-latest.yaml diff --git a/models/anthropic/api/claude-3-5-sonnet-20241022.yaml b/models/anthropic/claude-3-5-sonnet-20241022.yaml similarity index 100% rename from models/anthropic/api/claude-3-5-sonnet-20241022.yaml rename to models/anthropic/claude-3-5-sonnet-20241022.yaml diff --git a/models/anthropic/api/claude-3-5-sonnet-latest.yaml b/models/anthropic/claude-3-5-sonnet-latest.yaml similarity index 100% rename from models/anthropic/api/claude-3-5-sonnet-latest.yaml rename to models/anthropic/claude-3-5-sonnet-latest.yaml diff --git a/models/anthropic/api/claude-3-7-sonnet-20250219.yaml b/models/anthropic/claude-3-7-sonnet-20250219.yaml similarity index 100% rename from models/anthropic/api/claude-3-7-sonnet-20250219.yaml rename to models/anthropic/claude-3-7-sonnet-20250219.yaml diff --git a/models/anthropic/api/claude-3-7-sonnet-latest.yaml b/models/anthropic/claude-3-7-sonnet-latest.yaml similarity index 100% rename from models/anthropic/api/claude-3-7-sonnet-latest.yaml rename to models/anthropic/claude-3-7-sonnet-latest.yaml diff --git a/models/anthropic/api/claude-3-opus-20240229.yaml b/models/anthropic/claude-3-opus-20240229.yaml similarity index 100% rename from models/anthropic/api/claude-3-opus-20240229.yaml rename to models/anthropic/claude-3-opus-20240229.yaml diff --git a/models/anthropic/api/claude-3-opus-latest.yaml b/models/anthropic/claude-3-opus-latest.yaml similarity index 100% rename from models/anthropic/api/claude-3-opus-latest.yaml rename to models/anthropic/claude-3-opus-latest.yaml diff --git a/models/anthropic/api/claude-haiku-4-5-20251001.yaml b/models/anthropic/claude-haiku-4-5-20251001.yaml similarity index 100% rename from models/anthropic/api/claude-haiku-4-5-20251001.yaml rename to models/anthropic/claude-haiku-4-5-20251001.yaml diff --git a/models/anthropic/api/claude-haiku-4-5.yaml b/models/anthropic/claude-haiku-4-5.yaml similarity index 100% rename from models/anthropic/api/claude-haiku-4-5.yaml rename to models/anthropic/claude-haiku-4-5.yaml diff --git a/models/anthropic/subscription/claude-haiku-4.yaml b/models/anthropic/claude-haiku-4-subscription.yaml similarity index 100% rename from models/anthropic/subscription/claude-haiku-4.yaml rename to models/anthropic/claude-haiku-4-subscription.yaml diff --git a/models/anthropic/api/claude-haiku-4.yaml b/models/anthropic/claude-haiku-4.yaml similarity index 100% rename from models/anthropic/api/claude-haiku-4.yaml rename to models/anthropic/claude-haiku-4.yaml diff --git a/models/anthropic/api/claude-opus-4-6.yaml b/models/anthropic/claude-opus-4-6.yaml similarity index 100% rename from models/anthropic/api/claude-opus-4-6.yaml rename to models/anthropic/claude-opus-4-6.yaml diff --git a/models/anthropic/api/claude-opus-4-7.yaml b/models/anthropic/claude-opus-4-7.yaml similarity index 100% rename from models/anthropic/api/claude-opus-4-7.yaml rename to models/anthropic/claude-opus-4-7.yaml diff --git a/models/anthropic/subscription/claude-opus-4.yaml b/models/anthropic/claude-opus-4-subscription.yaml similarity index 100% rename from models/anthropic/subscription/claude-opus-4.yaml rename to models/anthropic/claude-opus-4-subscription.yaml diff --git a/models/anthropic/api/claude-opus-4.yaml b/models/anthropic/claude-opus-4.yaml similarity index 100% rename from models/anthropic/api/claude-opus-4.yaml rename to models/anthropic/claude-opus-4.yaml diff --git a/models/anthropic/api/claude-sonnet-4-5-20250929.yaml b/models/anthropic/claude-sonnet-4-5-20250929.yaml similarity index 100% rename from models/anthropic/api/claude-sonnet-4-5-20250929.yaml rename to models/anthropic/claude-sonnet-4-5-20250929.yaml diff --git a/models/anthropic/api/claude-sonnet-4-5.yaml b/models/anthropic/claude-sonnet-4-5.yaml similarity index 100% rename from models/anthropic/api/claude-sonnet-4-5.yaml rename to models/anthropic/claude-sonnet-4-5.yaml diff --git a/models/anthropic/api/claude-sonnet-4-6.yaml b/models/anthropic/claude-sonnet-4-6.yaml similarity index 100% rename from models/anthropic/api/claude-sonnet-4-6.yaml rename to models/anthropic/claude-sonnet-4-6.yaml diff --git a/models/anthropic/subscription/claude-sonnet-4.yaml b/models/anthropic/claude-sonnet-4-subscription.yaml similarity index 100% rename from models/anthropic/subscription/claude-sonnet-4.yaml rename to models/anthropic/claude-sonnet-4-subscription.yaml diff --git a/models/anthropic/api/claude-sonnet-4.yaml b/models/anthropic/claude-sonnet-4.yaml similarity index 100% rename from models/anthropic/api/claude-sonnet-4.yaml rename to models/anthropic/claude-sonnet-4.yaml diff --git a/models/deepseek/api/deepseek-chat.yaml b/models/deepseek/deepseek-chat.yaml similarity index 100% rename from models/deepseek/api/deepseek-chat.yaml rename to models/deepseek/deepseek-chat.yaml diff --git a/models/deepseek/api/deepseek-v3.1.yaml b/models/deepseek/deepseek-v3.1.yaml similarity index 100% rename from models/deepseek/api/deepseek-v3.1.yaml rename to models/deepseek/deepseek-v3.1.yaml diff --git a/models/deepseek/api/deepseek-v3.2.yaml b/models/deepseek/deepseek-v3.2.yaml similarity index 100% rename from models/deepseek/api/deepseek-v3.2.yaml rename to models/deepseek/deepseek-v3.2.yaml diff --git a/models/deepseek/api/deepseek-v4.yaml b/models/deepseek/deepseek-v4.yaml similarity index 100% rename from models/deepseek/api/deepseek-v4.yaml rename to models/deepseek/deepseek-v4.yaml diff --git a/models/openai/api/chatgpt-4o-latest.yaml b/models/openai/chatgpt-4o-latest.yaml similarity index 100% rename from models/openai/api/chatgpt-4o-latest.yaml rename to models/openai/chatgpt-4o-latest.yaml diff --git a/models/openai/api/gpt-3.5-turbo.yaml b/models/openai/gpt-3.5-turbo.yaml similarity index 100% rename from models/openai/api/gpt-3.5-turbo.yaml rename to models/openai/gpt-3.5-turbo.yaml diff --git a/models/openai/api/gpt-4-turbo-2024-04-09.yaml b/models/openai/gpt-4-turbo-2024-04-09.yaml similarity index 100% rename from models/openai/api/gpt-4-turbo-2024-04-09.yaml rename to models/openai/gpt-4-turbo-2024-04-09.yaml diff --git a/models/openai/api/gpt-4-turbo.yaml b/models/openai/gpt-4-turbo.yaml similarity index 100% rename from models/openai/api/gpt-4-turbo.yaml rename to models/openai/gpt-4-turbo.yaml diff --git a/models/openai/api/gpt-4.1-mini.yaml b/models/openai/gpt-4.1-mini.yaml similarity index 100% rename from models/openai/api/gpt-4.1-mini.yaml rename to models/openai/gpt-4.1-mini.yaml diff --git a/models/openai/api/gpt-4.1-nano.yaml b/models/openai/gpt-4.1-nano.yaml similarity index 100% rename from models/openai/api/gpt-4.1-nano.yaml rename to models/openai/gpt-4.1-nano.yaml diff --git a/models/openai/api/gpt-4.1.yaml b/models/openai/gpt-4.1.yaml similarity index 100% rename from models/openai/api/gpt-4.1.yaml rename to models/openai/gpt-4.1.yaml diff --git a/models/openai/api/gpt-4o-2024-11-20.yaml b/models/openai/gpt-4o-2024-11-20.yaml similarity index 100% rename from models/openai/api/gpt-4o-2024-11-20.yaml rename to models/openai/gpt-4o-2024-11-20.yaml diff --git a/models/openai/api/gpt-4o-mini.yaml b/models/openai/gpt-4o-mini.yaml similarity index 100% rename from models/openai/api/gpt-4o-mini.yaml rename to models/openai/gpt-4o-mini.yaml diff --git a/models/openai/api/gpt-4o.yaml b/models/openai/gpt-4o.yaml similarity index 100% rename from models/openai/api/gpt-4o.yaml rename to models/openai/gpt-4o.yaml diff --git a/models/openai/api/gpt-5-chat-latest.yaml b/models/openai/gpt-5-chat-latest.yaml similarity index 100% rename from models/openai/api/gpt-5-chat-latest.yaml rename to models/openai/gpt-5-chat-latest.yaml diff --git a/models/openai/api/gpt-5-mini.yaml b/models/openai/gpt-5-mini.yaml similarity index 100% rename from models/openai/api/gpt-5-mini.yaml rename to models/openai/gpt-5-mini.yaml diff --git a/models/openai/api/gpt-5-nano.yaml b/models/openai/gpt-5-nano.yaml similarity index 100% rename from models/openai/api/gpt-5-nano.yaml rename to models/openai/gpt-5-nano.yaml diff --git a/models/openai/subscription/gpt-5.1-codex-max.yaml b/models/openai/gpt-5.1-codex-max-subscription.yaml similarity index 100% rename from models/openai/subscription/gpt-5.1-codex-max.yaml rename to models/openai/gpt-5.1-codex-max-subscription.yaml diff --git a/models/openai/subscription/gpt-5.1-codex.yaml b/models/openai/gpt-5.1-codex-subscription.yaml similarity index 100% rename from models/openai/subscription/gpt-5.1-codex.yaml rename to models/openai/gpt-5.1-codex-subscription.yaml diff --git a/models/openai/api/gpt-5.1.yaml b/models/openai/gpt-5.1.yaml similarity index 100% rename from models/openai/api/gpt-5.1.yaml rename to models/openai/gpt-5.1.yaml diff --git a/models/openai/subscription/gpt-5.2-codex.yaml b/models/openai/gpt-5.2-codex-subscription.yaml similarity index 100% rename from models/openai/subscription/gpt-5.2-codex.yaml rename to models/openai/gpt-5.2-codex-subscription.yaml diff --git a/models/openai/subscription/gpt-5.2.yaml b/models/openai/gpt-5.2-subscription.yaml similarity index 100% rename from models/openai/subscription/gpt-5.2.yaml rename to models/openai/gpt-5.2-subscription.yaml diff --git a/models/openai/api/gpt-5.2.yaml b/models/openai/gpt-5.2.yaml similarity index 100% rename from models/openai/api/gpt-5.2.yaml rename to models/openai/gpt-5.2.yaml diff --git a/models/openai/subscription/gpt-5.3-codex-spark.yaml b/models/openai/gpt-5.3-codex-spark-subscription.yaml similarity index 100% rename from models/openai/subscription/gpt-5.3-codex-spark.yaml rename to models/openai/gpt-5.3-codex-spark-subscription.yaml diff --git a/models/openai/subscription/gpt-5.3-codex.yaml b/models/openai/gpt-5.3-codex-subscription.yaml similarity index 100% rename from models/openai/subscription/gpt-5.3-codex.yaml rename to models/openai/gpt-5.3-codex-subscription.yaml diff --git a/models/openai/subscription/gpt-5.4-mini.yaml b/models/openai/gpt-5.4-mini-subscription.yaml similarity index 100% rename from models/openai/subscription/gpt-5.4-mini.yaml rename to models/openai/gpt-5.4-mini-subscription.yaml diff --git a/models/openai/api/gpt-5.4-mini.yaml b/models/openai/gpt-5.4-mini.yaml similarity index 100% rename from models/openai/api/gpt-5.4-mini.yaml rename to models/openai/gpt-5.4-mini.yaml diff --git a/models/openai/subscription/gpt-5.4.yaml b/models/openai/gpt-5.4-subscription.yaml similarity index 100% rename from models/openai/subscription/gpt-5.4.yaml rename to models/openai/gpt-5.4-subscription.yaml diff --git a/models/openai/api/gpt-5.4.yaml b/models/openai/gpt-5.4.yaml similarity index 100% rename from models/openai/api/gpt-5.4.yaml rename to models/openai/gpt-5.4.yaml diff --git a/models/openai/subscription/gpt-5.5.yaml b/models/openai/gpt-5.5-subscription.yaml similarity index 100% rename from models/openai/subscription/gpt-5.5.yaml rename to models/openai/gpt-5.5-subscription.yaml diff --git a/models/openai/api/gpt-5.5.yaml b/models/openai/gpt-5.5.yaml similarity index 100% rename from models/openai/api/gpt-5.5.yaml rename to models/openai/gpt-5.5.yaml diff --git a/models/openai/api/gpt-5.yaml b/models/openai/gpt-5.yaml similarity index 100% rename from models/openai/api/gpt-5.yaml rename to models/openai/gpt-5.yaml diff --git a/models/openai/api/o1-mini.yaml b/models/openai/o1-mini.yaml similarity index 100% rename from models/openai/api/o1-mini.yaml rename to models/openai/o1-mini.yaml diff --git a/models/openai/api/o1-preview.yaml b/models/openai/o1-preview.yaml similarity index 100% rename from models/openai/api/o1-preview.yaml rename to models/openai/o1-preview.yaml diff --git a/models/openai/api/o1.yaml b/models/openai/o1.yaml similarity index 100% rename from models/openai/api/o1.yaml rename to models/openai/o1.yaml diff --git a/models/openai/api/o3-mini.yaml b/models/openai/o3-mini.yaml similarity index 100% rename from models/openai/api/o3-mini.yaml rename to models/openai/o3-mini.yaml diff --git a/models/openai/api/o3.yaml b/models/openai/o3.yaml similarity index 100% rename from models/openai/api/o3.yaml rename to models/openai/o3.yaml diff --git a/models/openai/api/o4-mini.yaml b/models/openai/o4-mini.yaml similarity index 100% rename from models/openai/api/o4-mini.yaml rename to models/openai/o4-mini.yaml diff --git a/src/build/build.ts b/src/build/build.ts index 0dfe690..e49e012 100644 --- a/src/build/build.ts +++ b/src/build/build.ts @@ -51,7 +51,8 @@ async function writeApiIndex(modelCount: number): Promise { endpoints: { catalog: "/api/v1/models.json", schema: "/api/v1/schema.json", - modelById: "/api/v1/models/{provider}/{auth}/{model}.json", + modelByIdApiKey: "/api/v1/models/{provider}/{model}.json", + modelByIdSubscription: "/api/v1/models/{provider}/{model}-subscription.json", }, modelCount, docs: "https://github.com/modelparameters/modelparameters.dev#api", @@ -87,9 +88,9 @@ export async function build(): Promise<{ models: number }> { await writeJson(path.join(DIST_API_DIR, "schema.json"), buildModelJsonSchema()); await writeApiIndex(catalog.count); for (const model of models) { - const [provider, auth, slug] = modelId(model).split("/"); - if (!provider || !auth || !slug) continue; - await writeJson(path.join(DIST_API_DIR, "models", provider, auth, `${slug}.json`), { + const [provider, slug] = modelId(model).split("/"); + if (!provider || !slug) continue; + await writeJson(path.join(DIST_API_DIR, "models", provider, `${slug}.json`), { $schema: "https://modelparameters.dev/api/v1/schema.json", ...model, }); diff --git a/src/data/load.ts b/src/data/load.ts index d89b0f5..fe0e169 100644 --- a/src/data/load.ts +++ b/src/data/load.ts @@ -2,13 +2,7 @@ import fs from "node:fs/promises"; import path from "node:path"; import yaml from "js-yaml"; import { z } from "zod"; -import { - Model, - authPathSegment, - authTypeFromPathSegment, - modelId, - type Model as ModelType, -} from "../schema/model.js"; +import { Model, modelId, type Model as ModelType } from "../schema/model.js"; import { MODELS_DIR } from "./paths.js"; export interface LoadIssue { @@ -51,12 +45,13 @@ function formatZodIssue(error: z.ZodError): string { function expectedIdFromPath(file: string, modelsDir: string): string { const rel = path.relative(modelsDir, file); const parts = rel.split(path.sep); - if (parts.length !== 3) return ""; - const [provider, authSegment, filename] = parts; - const authType = authTypeFromPathSegment(authSegment!); - if (!provider || !authType || !filename) return ""; - const model = filename.replace(/\.(ya?ml)$/i, ""); - return `${provider}/${authPathSegment(authType)}/${model}`; + if (parts.length < 2) return ""; + const provider = parts[0]!; + const filename = parts + .slice(1) + .join("/") + .replace(/\.(ya?ml)$/i, ""); + return `${provider}/${filename}`; } function validateOne( @@ -70,26 +65,15 @@ function validateOne( } const model = parsed.data; const expectedId = expectedIdFromPath(file, modelsDir); - if (!expectedId) { - return { - issue: { - file, - message: 'model files must live at "models/{provider}/{api|subscription}/{model}.yaml".', - }, - }; - } const derivedId = modelId(model); - if (derivedId !== expectedId) { - const expectedFilename = path.join( - model.provider, - authPathSegment(model.authType), - `${model.model}.yaml`, - ); + if (expectedId && derivedId !== expectedId) { + const expectedFilename = + model.authType === "api_key" ? `${model.model}.yaml` : `${model.model}-subscription.yaml`; return { issue: { file, - message: `derived id "${derivedId}" does not match expected id "${expectedId}" from file path. Expected path "${expectedFilename}".`, + message: `derived id "${derivedId}" does not match expected id "${expectedId}" from file path. Expected filename "${expectedFilename}".`, }, }; } diff --git a/src/schema/model.ts b/src/schema/model.ts index e6aec8f..1203127 100644 --- a/src/schema/model.ts +++ b/src/schema/model.ts @@ -180,16 +180,10 @@ export const Catalog = z .strict(); export type Catalog = z.infer; -export function authPathSegment(authType: AuthType): "api" | "subscription" { - return authType === "api_key" ? "api" : "subscription"; -} - -export function authTypeFromPathSegment(segment: string): AuthType | null { - if (segment === "api") return "api_key"; - if (segment === "subscription") return "subscription"; - return null; +export function authSuffix(authType: AuthType): "" | "-subscription" { + return authType === "api_key" ? "" : "-subscription"; } export function modelId(model: Pick): string { - return `${model.provider}/${authPathSegment(model.authType)}/${model.model}`; + return `${model.provider}/${model.model}${authSuffix(model.authType)}`; } diff --git a/src/server/dev.ts b/src/server/dev.ts index cbda8f5..190dd6b 100644 --- a/src/server/dev.ts +++ b/src/server/dev.ts @@ -88,10 +88,10 @@ function makeApp(): express.Express { res.json(buildModelJsonSchema()); }); - app.get("/api/v1/models/:provider/:auth/:slug.json", async (req, res, next) => { + app.get("/api/v1/models/:provider/:slug.json", async (req, res, next) => { try { const { models } = await getCache(); - const wanted = `${req.params.provider}/${req.params.auth}/${req.params.slug}`; + const wanted = `${req.params.provider}/${req.params.slug}`; const model = models.find((m) => modelId(m) === wanted); if (!model) { res.status(404).json({ error: "not_found", id: wanted }); diff --git a/src/views/partials/how_to_use.ejs b/src/views/partials/how_to_use.ejs index f6e2ce4..1762543 100644 --- a/src/views/partials/how_to_use.ejs +++ b/src/views/partials/how_to_use.ejs @@ -36,14 +36,14 @@

The full catalog is static JSON, CORS-enabled, served from the edge.

curl https://modelparameters.dev/api/v1/models.json

- Each entry is keyed by provider/auth/model, where auth is api or subscription. + Each entry is keyed by provider/model for API-key variants; subscription variants append -subscription.

Single model

-
curl https://modelparameters.dev/api/v1/models/anthropic/api/claude-opus-4-7.json
-curl https://modelparameters.dev/api/v1/models/anthropic/subscription/claude-opus-4.json
+
curl https://modelparameters.dev/api/v1/models/anthropic/claude-opus-4-7.json
+curl https://modelparameters.dev/api/v1/models/anthropic/claude-opus-4-7-subscription.json
@@ -73,7 +73,7 @@ curl

Contribute

- The data lives in YAML under models/{provider}/{api|subscription}/{model}.yaml + The data lives in YAML under models/{provider}/{model}-{auth}.yaml in the GitHub repo. Open a PR; CI validates against the schema and rebuilds.

diff --git a/tests/load.test.ts b/tests/load.test.ts index 97bed44..565cf3c 100644 --- a/tests/load.test.ts +++ b/tests/load.test.ts @@ -50,49 +50,42 @@ async function writeModel(rel: string, body: string): Promise { } describe("loadAllModels", () => { - it("loads valid YAML files from provider/auth/model paths", async () => { - await writeModel("anthropic/api/claude-opus-4-7.yaml", VALID_OPUS); - await writeModel("anthropic/subscription/claude-opus-4-7.yaml", VALID_OPUS_SUB); + it("loads valid YAML files (api_key is bare, subscription is suffixed)", async () => { + await writeModel("anthropic/claude-opus-4-7.yaml", VALID_OPUS); + await writeModel("anthropic/claude-opus-4-7-subscription.yaml", VALID_OPUS_SUB); const result = await loadAllModels(tmpRoot); expect(result.issues).toEqual([]); expect(result.models).toHaveLength(2); expect(result.models.map(modelId).sort()).toEqual([ - "anthropic/api/claude-opus-4-7", - "anthropic/subscription/claude-opus-4-7", + "anthropic/claude-opus-4-7", + "anthropic/claude-opus-4-7-subscription", ]); }); it("flags provider/path mismatch", async () => { - await writeModel("openai/api/claude-opus-4-7.yaml", VALID_OPUS); + await writeModel("openai/claude-opus-4-7.yaml", VALID_OPUS); const result = await loadAllModels(tmpRoot); expect(result.issues).toHaveLength(1); expect(result.issues[0]?.message).toMatch(/does not match expected id/); }); - it("flags an api_key model placed in a subscription folder", async () => { - await writeModel("anthropic/subscription/claude-opus-4-7.yaml", VALID_OPUS); + it("flags an api_key model placed in a -subscription filename", async () => { + await writeModel("anthropic/claude-opus-4-7-subscription.yaml", VALID_OPUS); const result = await loadAllModels(tmpRoot); expect(result.issues).toHaveLength(1); expect(result.issues[0]?.message).toMatch(/does not match expected id/); }); - it("flags a subscription model placed in an api folder", async () => { - await writeModel("anthropic/api/claude-opus-4-7.yaml", VALID_OPUS_SUB); + it("flags a subscription model placed in a bare filename", async () => { + await writeModel("anthropic/claude-opus-4-7.yaml", VALID_OPUS_SUB); const result = await loadAllModels(tmpRoot); expect(result.issues).toHaveLength(1); expect(result.issues[0]?.message).toMatch(/does not match expected id/); }); - it("flags an unsupported auth path folder", async () => { - await writeModel("anthropic/api_key/claude-opus-4-7.yaml", VALID_OPUS); - const result = await loadAllModels(tmpRoot); - expect(result.issues).toHaveLength(1); - expect(result.issues[0]?.message).toMatch(/models\/\{provider\}\/\{api\|subscription\}/); - }); - it("reports YAML parse errors", async () => { - await writeModel("anthropic/api/broken.yaml", "provider: anthropic\n : : :"); + await writeModel("anthropic/broken.yaml", "provider: anthropic\n : : :"); const result = await loadAllModels(tmpRoot); expect(result.issues.length).toBeGreaterThan(0); }); diff --git a/tests/schema.test.ts b/tests/schema.test.ts index 5bca7b6..f6239b6 100644 --- a/tests/schema.test.ts +++ b/tests/schema.test.ts @@ -1,5 +1,5 @@ import { describe, it, expect } from "vitest"; -import { Model, authPathSegment, authTypeFromPathSegment, modelId } from "../src/schema/model.js"; +import { Model, modelId, authSuffix } from "../src/schema/model.js"; import { buildModelJsonSchema } from "../src/schema/generate.js"; const VALID_MODEL = { @@ -266,22 +266,19 @@ describe("Model schema", () => { }); }); -describe("modelId / auth path helpers", () => { - it("derives id from provider/authType/model", () => { +describe("modelId / authSuffix", () => { + it("derives id from provider/model/authType (no suffix for api_key)", () => { expect(modelId({ provider: "anthropic", model: "claude-opus-4-7", authType: "api_key" })).toBe( - "anthropic/api/claude-opus-4-7", + "anthropic/claude-opus-4-7", ); expect(modelId({ provider: "openai", model: "gpt-4o", authType: "subscription" })).toBe( - "openai/subscription/gpt-4o", + "openai/gpt-4o-subscription", ); }); - it("maps public auth path segments to schema auth types", () => { - expect(authPathSegment("api_key")).toBe("api"); - expect(authPathSegment("subscription")).toBe("subscription"); - expect(authTypeFromPathSegment("api")).toBe("api_key"); - expect(authTypeFromPathSegment("subscription")).toBe("subscription"); - expect(authTypeFromPathSegment("api_key")).toBeNull(); + it("authSuffix returns empty for api_key, -subscription otherwise", () => { + expect(authSuffix("api_key")).toBe(""); + expect(authSuffix("subscription")).toBe("-subscription"); }); });