diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 803f7dfea..f1a401502 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,12 +1,12 @@ lockVersion: "" id: "" management: - docChecksum: a58fc69a5070955b9069a4a9a9a3272b + docChecksum: e082caf3723ab1e222f73325c2ef3e49 docVersion: 1.0.0 speakeasyVersion: 1.808.1 generationVersion: 2.960.8 - releaseVersion: 1.5.169 - configChecksum: 892c45ab56059588e786efb0c79ed16d + releaseVersion: 1.5.170 + configChecksum: 42293044358dde5d13b2f633f5b58c5d repoURL: https://github.com/OpenRouterTeam/typescript-sdk.git installationURL: https://github.com/OpenRouterTeam/typescript-sdk published: true @@ -18972,7 +18972,7 @@ examples: limit: 500 responses: "200": - application/json: {"data": [{"architecture": {"input_modalities": ["text"], "modality": "text->text", "output_modalities": ["text"]}, "canonical_slug": "openai/gpt-4", "context_length": 8192, "created": 1692901234, "default_parameters": null, "endpoints": ["/api/v1/chat/completions", "/api/v1/completions", "/api/v1/messages", "/api/v1/responses"], "id": "openai/gpt-4", "links": {"details": "/api/v1/models/openai/gpt-4/endpoints"}, "name": "GPT-4", "per_request_limits": null, "pricing": {"completion": "0.00006", "prompt": "0.00003"}, "supported_parameters": ["temperature", "top_p", "max_tokens", "frequency_penalty", "presence_penalty"], "supported_voices": null, "top_provider": {"is_moderated": true}}], "links": {"next": "/api/v1/models?offset=500&limit=500"}, "total_count": 150} + application/json: {"data": [{"architecture": {"input_modalities": ["text"], "modality": "text->text", "output_modalities": ["text"]}, "canonical_slug": "openai/gpt-4", "context_length": 8192, "created": 1692901234, "default_parameters": null, "endpoints": ["/api/v1/chat/completions", "/api/v1/completions", "/api/v1/messages", "/api/v1/responses"], "id": "openai/gpt-4", "links": {"details": "/api/v1/models/openai/gpt-4/endpoints"}, "name": "GPT-4", "per_request_limits": null, "pricing": {"completion": "0.00006", "prompt": "0.00003"}, "supported_parameters": ["temperature", "top_p", "max_tokens"], "supported_voices": null, "top_provider": {"is_moderated": true}}], "links": {"next": "/api/v1/models?offset=500&limit=500"}, "total_count": 150} "400": application/json: {"error": {"code": 400, "message": "Invalid request parameters"}} "500": @@ -18999,7 +18999,7 @@ examples: limit: 500 responses: "200": - application/json: {"data": [{"architecture": {"input_modalities": ["text"], "modality": "text->text", "output_modalities": ["text"]}, "canonical_slug": "openai/gpt-4", "context_length": 8192, "created": 1692901234, "default_parameters": null, "endpoints": ["/api/v1/chat/completions", "/api/v1/completions", "/api/v1/messages", "/api/v1/responses"], "id": "openai/gpt-4", "links": {"details": "/api/v1/models/openai/gpt-4/endpoints"}, "name": "GPT-4", "per_request_limits": null, "pricing": {"completion": "0.00006", "prompt": "0.00003"}, "supported_parameters": ["temperature", "top_p", "max_tokens", "frequency_penalty", "presence_penalty"], "supported_voices": null, "top_provider": {"is_moderated": true}}], "links": {"next": "/api/v1/models?offset=500&limit=500"}, "total_count": 150} + application/json: {"data": [{"architecture": {"input_modalities": ["text"], "modality": "text->text", "output_modalities": ["text"]}, "canonical_slug": "openai/gpt-4", "context_length": 8192, "created": 1692901234, "default_parameters": null, "endpoints": ["/api/v1/chat/completions", "/api/v1/completions", "/api/v1/messages", "/api/v1/responses"], "id": "openai/gpt-4", "links": {"details": "/api/v1/models/openai/gpt-4/endpoints"}, "name": "GPT-4", "per_request_limits": null, "pricing": {"completion": "0.00006", "prompt": "0.00003"}, "supported_parameters": ["temperature", "top_p", "max_tokens"], "supported_voices": null, "top_provider": {"is_moderated": true}}], "links": {"next": "/api/v1/models?offset=500&limit=500"}, "total_count": 150} "401": application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} "404": @@ -23935,7 +23935,7 @@ examples: limit: 500 responses: "200": - application/json: {"data": [{"architecture": {"input_modalities": ["text"], "modality": "text->text", "output_modalities": ["text"]}, "canonical_slug": "openai/gpt-4", "context_length": 8192, "created": 1692901234, "default_parameters": null, "endpoints": ["/api/v1/chat/completions", "/api/v1/completions", "/api/v1/messages", "/api/v1/responses"], "id": "openai/gpt-4", "links": {"details": "/api/v1/models/openai/gpt-4/endpoints"}, "name": "GPT-4", "per_request_limits": null, "pricing": {"completion": "0.00006", "prompt": "0.00003"}, "supported_parameters": ["temperature", "top_p", "max_tokens", "frequency_penalty", "presence_penalty"], "supported_voices": null, "top_provider": {"is_moderated": true}}], "links": {"next": "/api/v1/models?offset=500&limit=500"}, "total_count": 150} + application/json: {"data": [{"architecture": {"input_modalities": ["text"], "modality": "text->text", "output_modalities": ["text"]}, "canonical_slug": "openai/gpt-4", "context_length": 8192, "created": 1692901234, "default_parameters": null, "endpoints": ["/api/v1/chat/completions", "/api/v1/completions", "/api/v1/messages", "/api/v1/responses"], "id": "openai/gpt-4", "links": {"details": "/api/v1/models/openai/gpt-4/endpoints"}, "name": "GPT-4", "per_request_limits": null, "pricing": {"completion": "0.00006", "prompt": "0.00003"}, "supported_parameters": ["temperature", "top_p", "max_tokens"], "supported_voices": null, "top_provider": {"is_moderated": true}}], "links": {"next": "/api/v1/models?offset=500&limit=500"}, "total_count": 150} "400": application/json: {"error": {"code": 400, "message": "Invalid request parameters"}} "500": @@ -24208,4 +24208,10 @@ examples: "500": application/json: {"error": {"code": 500, "message": "Internal Server Error"}} examplesVersion: 1.0.2 -releaseNotes: "## Typescript SDK Changes:\n* `openrouter.batch.createBatches()`: `response.results[].response.body` **Changed** (Breaking ⚠️)\n* `openrouter.batch.getBatches()`: `response.results[].response.body` **Changed** (Breaking ⚠️)\n* `openrouter.batch.cancel()`: `response.results[].response.body` **Changed** (Breaking ⚠️)\n* `openrouter.batch.getResults()`: `response.data[].response.body` **Changed** (Breaking ⚠️)\n* `openrouter.chat.send()`: \n * `request.chatRequest.messages[].union(assistant).reasoningDetails[]` **Changed** (Breaking ⚠️)\n * `response` **Changed** (Breaking ⚠️)\n* `openrouter.presets.createPresetsChatCompletions()`: \n * `request.chatRequest.messages[].union(assistant).reasoningDetails[]` **Changed** (Breaking ⚠️)\n* `openrouter.presets.createPresetsResponses()`: \n * `request.responsesRequest.input.union(Array<>)[]` **Changed** (Breaking ⚠️)\n* `openrouter.responses.send()`: \n * `request.responsesRequest.input.union(Array<>)[]` **Changed** (Breaking ⚠️)\n * `response` **Changed** (Breaking ⚠️)\n* `openrouter.beta.responses.send()`: \n * `request.responsesRequest.input.union(Array<>)[]` **Changed** (Breaking ⚠️)\n * `response` **Changed** (Breaking ⚠️)\n* `openrouter.generations.getGeneration()`: `response.data.billedDurationMs` **Added**\n" +releaseNotes: | + ## Typescript SDK Changes: + * `openrouter.embeddings.listModels()`: `response.data[].isOpenWeight` **Added** + * `openrouter.models.get()`: `response.data.isOpenWeight` **Added** + * `openrouter.models.list()`: `response.data[].isOpenWeight` **Added** + * `openrouter.models.listForUser()`: `response.data[].isOpenWeight` **Added** + * `openrouter.rerank.listModels()`: `response.data[].isOpenWeight` **Added** diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 753168ef8..81fbde521 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -38,7 +38,7 @@ generation: documentation: mintlify preApplyUnionDiscriminators: true typescript: - version: 1.5.169 + version: 1.5.170 acceptHeaderEnum: false additionalDependencies: dependencies: diff --git a/.speakeasy/out.openapi.yaml b/.speakeasy/out.openapi.yaml index 91811f0a3..1402af9dd 100644 --- a/.speakeasy/out.openapi.yaml +++ b/.speakeasy/out.openapi.yaml @@ -13369,6 +13369,7 @@ components: unit: 'token' value: 8192 type: 'text' + is_open_weight: false knowledge_cutoff: null links: details: '/api/v1/models/openai/text-embedding-3-small/endpoints' @@ -13429,6 +13430,7 @@ components: unit: 'token' value: 8192 type: 'text' + is_open_weight: false knowledge_cutoff: null links: details: '/api/v1/models/openai/text-embedding-3-small/endpoints' @@ -22760,11 +22762,17 @@ components: created: 1692901234 default_parameters: null description: 'GPT-4 is a large multimodal model that can solve difficult problems with greater accuracy.' + endpoints: + - '/api/v1/chat/completions' + - '/api/v1/completions' + - '/api/v1/messages' + - '/api/v1/responses' expiration_date: null id: 'openai/gpt-4' + is_open_weight: false knowledge_cutoff: null links: - details: '/api/v1/models/openai/gpt-5.4/endpoints' + details: '/api/v1/models/openai/gpt-4/endpoints' name: 'GPT-4' per_request_limits: null pricing: @@ -22772,15 +22780,6 @@ components: image: '0' prompt: '0.00003' request: '0' - reasoning: - default_effort: 'medium' - default_enabled: true - mandatory: false - supported_efforts: - - 'high' - - 'medium' - - 'low' - - 'minimal' supported_parameters: - 'temperature' - 'top_p' @@ -22843,6 +22842,10 @@ components: description: 'Unique identifier for the model' example: 'openai/gpt-4' type: 'string' + is_open_weight: + description: 'Whether the model has publicly released weights. A preset reports true only when every listed model is known to be open-weight; routing presets report false.' + example: false + type: 'boolean' knowledge_cutoff: description: 'The date up to which the model was trained on data. ISO 8601 date string (YYYY-MM-DD) or null if unknown.' example: '2024-10-01' @@ -24110,6 +24113,7 @@ components: - '/api/v1/responses' expiration_date: null id: 'openai/gpt-4' + is_open_weight: false knowledge_cutoff: null links: details: '/api/v1/models/openai/gpt-4/endpoints' @@ -24173,8 +24177,14 @@ components: created: 1692901234 default_parameters: null description: 'GPT-4 is a large multimodal model that can solve difficult problems with greater accuracy.' + endpoints: + - '/api/v1/chat/completions' + - '/api/v1/completions' + - '/api/v1/messages' + - '/api/v1/responses' expiration_date: null id: 'openai/gpt-4' + is_open_weight: false knowledge_cutoff: null links: details: '/api/v1/models/openai/gpt-4/endpoints' @@ -24189,8 +24199,6 @@ components: - 'temperature' - 'top_p' - 'max_tokens' - - 'frequency_penalty' - - 'presence_penalty' supported_voices: null top_provider: context_length: 8192 @@ -24239,8 +24247,14 @@ components: created: 1692901234 default_parameters: null description: 'GPT-4 is a large multimodal model that can solve difficult problems with greater accuracy.' + endpoints: + - '/api/v1/chat/completions' + - '/api/v1/completions' + - '/api/v1/messages' + - '/api/v1/responses' expiration_date: null id: 'openai/gpt-4' + is_open_weight: false knowledge_cutoff: null links: details: '/api/v1/models/openai/gpt-4/endpoints' @@ -34600,11 +34614,17 @@ components: created: 1692901234 default_parameters: null description: 'GPT-4 is a large multimodal model that can solve difficult problems with greater accuracy.' + endpoints: + - '/api/v1/chat/completions' + - '/api/v1/completions' + - '/api/v1/messages' + - '/api/v1/responses' expiration_date: null id: 'openai/gpt-4' + is_open_weight: false knowledge_cutoff: null links: - details: '/api/v1/models/openai/gpt-5.4/endpoints' + details: '/api/v1/models/openai/gpt-4/endpoints' name: 'GPT-4' per_request_limits: null pricing: @@ -34612,15 +34632,6 @@ components: image: '0' prompt: '0.00003' request: '0' - reasoning: - default_effort: 'medium' - default_enabled: true - mandatory: false - supported_efforts: - - 'high' - - 'medium' - - 'low' - - 'minimal' supported_parameters: - 'temperature' - 'top_p' @@ -34656,8 +34667,14 @@ components: created: 1692901234 default_parameters: null description: 'GPT-4 is a large multimodal model that can solve difficult problems with greater accuracy.' + endpoints: + - '/api/v1/chat/completions' + - '/api/v1/completions' + - '/api/v1/messages' + - '/api/v1/responses' expiration_date: null id: 'openai/gpt-4' + is_open_weight: false knowledge_cutoff: null links: details: '/api/v1/models/openai/gpt-4/endpoints' @@ -34672,8 +34689,6 @@ components: - 'temperature' - 'top_p' - 'max_tokens' - - 'frequency_penalty' - - 'presence_penalty' supported_voices: null top_provider: context_length: 8192 @@ -48782,6 +48797,7 @@ paths: unit: 'token' value: 8192 type: 'text' + is_open_weight: false knowledge_cutoff: null links: details: '/api/v1/models/openai/text-embedding-3-small/endpoints' @@ -57360,47 +57376,6 @@ paths: '200': content: application/json: - example: - data: - architecture: - input_modalities: - - 'text' - instruct_type: 'chatml' - modality: 'text->text' - output_modalities: - - 'text' - tokenizer: 'GPT' - canonical_slug: 'openai/gpt-4' - context_length: 8192 - created: 1692901234 - default_parameters: null - description: 'GPT-4 is a large multimodal model that can solve difficult problems with greater accuracy.' - endpoints: - - '/api/v1/chat/completions' - - '/api/v1/completions' - - '/api/v1/messages' - - '/api/v1/responses' - expiration_date: null - id: 'openai/gpt-4' - knowledge_cutoff: null - links: - details: '/api/v1/models/openai/gpt-4/endpoints' - name: 'GPT-4' - per_request_limits: null - pricing: - completion: '0.00006' - image: '0' - prompt: '0.00003' - request: '0' - supported_parameters: - - 'temperature' - - 'top_p' - - 'max_tokens' - supported_voices: null - top_provider: - context_length: 8192 - is_moderated: true - max_completion_tokens: 4096 schema: $ref: '#/components/schemas/ModelResponse' description: 'Returns the model details' @@ -58039,6 +58014,7 @@ paths: - '/api/v1/responses' expiration_date: null id: 'openai/gpt-4' + is_open_weight: false knowledge_cutoff: null links: details: '/api/v1/models/openai/gpt-4/endpoints' @@ -58492,6 +58468,7 @@ paths: - '/api/v1/responses' expiration_date: null id: 'openai/gpt-4' + is_open_weight: false knowledge_cutoff: null links: details: '/api/v1/models/openai/gpt-4/endpoints' @@ -63099,6 +63076,7 @@ paths: unit: 'token' value: 4096 type: 'text' + is_open_weight: false knowledge_cutoff: null links: details: '/api/v1/models/cohere/rerank-v3.5/endpoints' diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 1a047ffbb..05a4d2e1a 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -2,8 +2,8 @@ speakeasyVersion: 1.808.1 sources: OpenRouter API: sourceNamespace: open-router-chat-completions-api - sourceRevisionDigest: sha256:8bc784ff07443f5bed27fe645135e37e566d228b5bd0b9ab725a81e803e1c492 - sourceBlobDigest: sha256:8daf3684fcb85e158bb64dc7b273143aacca9358c44742de19c3ffc6ee631ba3 + sourceRevisionDigest: sha256:8d8dc2c91d068c4499b71b16c8c1260eb9282641f1af9613d09162d5b128f7d1 + sourceBlobDigest: sha256:29576fe252c6bbfd1d5ca446e664bfcca4f8169c9ad32fee59b25e45cb1775de tags: - latest - 1.0.0 @@ -11,10 +11,10 @@ targets: openrouter: source: OpenRouter API sourceNamespace: open-router-chat-completions-api - sourceRevisionDigest: sha256:8bc784ff07443f5bed27fe645135e37e566d228b5bd0b9ab725a81e803e1c492 - sourceBlobDigest: sha256:8daf3684fcb85e158bb64dc7b273143aacca9358c44742de19c3ffc6ee631ba3 + sourceRevisionDigest: sha256:8d8dc2c91d068c4499b71b16c8c1260eb9282641f1af9613d09162d5b128f7d1 + sourceBlobDigest: sha256:29576fe252c6bbfd1d5ca446e664bfcca4f8169c9ad32fee59b25e45cb1775de codeSamplesNamespace: open-router-chat-completions-api-typescript-code-samples - codeSamplesRevisionDigest: sha256:c503e747ed750f2c781c54e433e2e0e368e5fe9626c39bdc73e4cd68201753e4 + codeSamplesRevisionDigest: sha256:1660272311a578fc58453e85a3470650274df8133559783956c1eee298bac5fb workflow: workflowVersion: 1.0.0 speakeasyVersion: 1.808.1 diff --git a/RELEASES.md b/RELEASES.md index 1ae7ee885..84e6a9e0e 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -6066,4 +6066,14 @@ Based on: ### Generated - [typescript v1.5.169] . ### Releases -- [NPM v1.5.169] https://www.npmjs.com/package/@openrouter/sdk/v/1.5.169 - . \ No newline at end of file +- [NPM v1.5.169] https://www.npmjs.com/package/@openrouter/sdk/v/1.5.169 - . + +## 2026-12-03 19:25:06 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.808.1 (2.960.8) https://github.com/speakeasy-api/speakeasy +### Generated +- [typescript v1.5.170] . +### Releases +- [NPM v1.5.170] https://www.npmjs.com/package/@openrouter/sdk/v/1.5.170 - . \ No newline at end of file diff --git a/docs/models/embeddingsmodel.mdx b/docs/models/embeddingsmodel.mdx index fb710eede..724227158 100644 --- a/docs/models/embeddingsmodel.mdx +++ b/docs/models/embeddingsmodel.mdx @@ -60,6 +60,7 @@ let value: EmbeddingsModel = { | `expirationDate` | *string* | ➖ | The date after which the model may be removed. ISO 8601 date string (YYYY-MM-DD) or null if no expiration. | 2025-06-01 | | `huggingFaceId` | *string* | ➖ | Hugging Face model identifier, if applicable | microsoft/DialoGPT-medium | | `id` | *string* | ✔️ | Unique identifier for the model | openai/gpt-4 | +| `isOpenWeight` | *boolean* | ➖ | Whether the model has publicly released weights. A preset reports true only when every listed model is known to be open-weight; routing presets report false. | false | | `knowledgeCutoff` | *string* | ➖ | The date up to which the model was trained on data. ISO 8601 date string (YYYY-MM-DD) or null if unknown. | 2024-10-01 | | `links` | [models.ModelLinks](../models/modellinks.mdx) | ✔️ | Related API endpoints and resources for this model. | \{
"details": "/api/v1/models/openai/gpt-5.4/endpoints"
} | | `name` | *string* | ✔️ | Display name of the model | GPT-4 | diff --git a/docs/models/model.mdx b/docs/models/model.mdx index 65f9cc77b..3bb1c8565 100644 --- a/docs/models/model.mdx +++ b/docs/models/model.mdx @@ -31,7 +31,7 @@ let value: Model = { ], id: "openai/gpt-4", links: { - details: "/api/v1/models/openai/gpt-5.4/endpoints", + details: "/api/v1/models/openai/gpt-4/endpoints", }, name: "GPT-4", perRequestLimits: null, @@ -67,6 +67,7 @@ let value: Model = { | `expirationDate` | *string* | ➖ | The date after which the model may be removed. ISO 8601 date string (YYYY-MM-DD) or null if no expiration. | 2025-06-01 | | `huggingFaceId` | *string* | ➖ | Hugging Face model identifier, if applicable | microsoft/DialoGPT-medium | | `id` | *string* | ✔️ | Unique identifier for the model | openai/gpt-4 | +| `isOpenWeight` | *boolean* | ➖ | Whether the model has publicly released weights. A preset reports true only when every listed model is known to be open-weight; routing presets report false. | false | | `knowledgeCutoff` | *string* | ➖ | The date up to which the model was trained on data. ISO 8601 date string (YYYY-MM-DD) or null if unknown. | 2024-10-01 | | `links` | [models.ModelLinks](../models/modellinks.mdx) | ✔️ | Related API endpoints and resources for this model. | \{
"details": "/api/v1/models/openai/gpt-5.4/endpoints"
} | | `name` | *string* | ✔️ | Display name of the model | GPT-4 | diff --git a/docs/models/modelresponse.mdx b/docs/models/modelresponse.mdx index ceca43a5e..f3fbc3e29 100644 --- a/docs/models/modelresponse.mdx +++ b/docs/models/modelresponse.mdx @@ -55,6 +55,6 @@ let value: ModelResponse = { ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `data` | [models.Model](../models/model.mdx) | ✔️ | Information about an AI model available on OpenRouter | \{
"architecture": \{
"input_modalities": [
"text"
],
"instruct_type": "chatml",
"modality": "text-\u003etext",
"output_modalities": [
"text"
],
"tokenizer": "GPT"
},
"canonical_slug": "openai/gpt-4",
"context_length": 8192,
"created": 1692901234,
"default_parameters": null,
"description": "GPT-4 is a large multimodal model that can solve difficult problems with greater accuracy.",
"expiration_date": null,
"id": "openai/gpt-4",
"knowledge_cutoff": null,
"links": \{
"details": "/api/v1/models/openai/gpt-5.4/endpoints"
},
"name": "GPT-4",
"per_request_limits": null,
"pricing": \{
"completion": "0.00006",
"image": "0",
"prompt": "0.00003",
"request": "0"
},
"reasoning": \{
"default_effort": "medium",
"default_enabled": true,
"mandatory": false,
"supported_efforts": [
"high",
"medium",
"low",
"minimal"
]
},
"supported_parameters": [
"temperature",
"top_p",
"max_tokens"
],
"supported_voices": null,
"top_provider": \{
"context_length": 8192,
"is_moderated": true,
"max_completion_tokens": 4096
}
} | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `data` | [models.Model](../models/model.mdx) | ✔️ | Information about an AI model available on OpenRouter | \{
"architecture": \{
"input_modalities": [
"text"
],
"instruct_type": "chatml",
"modality": "text-\u003etext",
"output_modalities": [
"text"
],
"tokenizer": "GPT"
},
"canonical_slug": "openai/gpt-4",
"context_length": 8192,
"created": 1692901234,
"default_parameters": null,
"description": "GPT-4 is a large multimodal model that can solve difficult problems with greater accuracy.",
"endpoints": [
"/api/v1/chat/completions",
"/api/v1/completions",
"/api/v1/messages",
"/api/v1/responses"
],
"expiration_date": null,
"id": "openai/gpt-4",
"is_open_weight": false,
"knowledge_cutoff": null,
"links": \{
"details": "/api/v1/models/openai/gpt-4/endpoints"
},
"name": "GPT-4",
"per_request_limits": null,
"pricing": \{
"completion": "0.00006",
"image": "0",
"prompt": "0.00003",
"request": "0"
},
"supported_parameters": [
"temperature",
"top_p",
"max_tokens"
],
"supported_voices": null,
"top_provider": \{
"context_length": 8192,
"is_moderated": true,
"max_completion_tokens": 4096
}
} | \ No newline at end of file diff --git a/docs/models/modelslistresponse.mdx b/docs/models/modelslistresponse.mdx index 2a14e36bf..9da7f75f0 100644 --- a/docs/models/modelslistresponse.mdx +++ b/docs/models/modelslistresponse.mdx @@ -45,8 +45,6 @@ let value: ModelsListResponse = { "temperature", "top_p", "max_tokens", - "frequency_penalty", - "presence_penalty", ], supportedVoices: null, topProvider: { @@ -63,8 +61,8 @@ let value: ModelsListResponse = { ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `data` | [models.Model](../models/model.mdx)[] | ✔️ | List of available models | [
\{
"architecture": \{
"input_modalities": [
"text"
],
"instruct_type": "chatml",
"modality": "text-\u003etext",
"output_modalities": [
"text"
],
"tokenizer": "GPT"
},
"canonical_slug": "openai/gpt-4",
"context_length": 8192,
"created": 1692901234,
"default_parameters": null,
"description": "GPT-4 is a large multimodal model that can solve difficult problems with greater accuracy.",
"expiration_date": null,
"id": "openai/gpt-4",
"knowledge_cutoff": null,
"links": \{
"details": "/api/v1/models/openai/gpt-4/endpoints"
},
"name": "GPT-4",
"per_request_limits": null,
"pricing": \{
"completion": "0.00006",
"image": "0",
"prompt": "0.00003",
"request": "0"
},
"supported_parameters": [
"temperature",
"top_p",
"max_tokens"
],
"supported_voices": null,
"top_provider": \{
"context_length": 8192,
"is_moderated": true,
"max_completion_tokens": 4096
}
}
] | -| `links` | [models.ModelsListResponseLinks](../models/modelslistresponselinks.mdx) | ✔️ | Pagination links | | -| `totalCount` | *number* | ✔️ | Total number of models matching the query | 150 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `data` | [models.Model](../models/model.mdx)[] | ✔️ | List of available models | [
\{
"architecture": \{
"input_modalities": [
"text"
],
"instruct_type": "chatml",
"modality": "text-\u003etext",
"output_modalities": [
"text"
],
"tokenizer": "GPT"
},
"canonical_slug": "openai/gpt-4",
"context_length": 8192,
"created": 1692901234,
"default_parameters": null,
"description": "GPT-4 is a large multimodal model that can solve difficult problems with greater accuracy.",
"endpoints": [
"/api/v1/chat/completions",
"/api/v1/completions",
"/api/v1/messages",
"/api/v1/responses"
],
"expiration_date": null,
"id": "openai/gpt-4",
"is_open_weight": false,
"knowledge_cutoff": null,
"links": \{
"details": "/api/v1/models/openai/gpt-4/endpoints"
},
"name": "GPT-4",
"per_request_limits": null,
"pricing": \{
"completion": "0.00006",
"image": "0",
"prompt": "0.00003",
"request": "0"
},
"supported_parameters": [
"temperature",
"top_p",
"max_tokens"
],
"supported_voices": null,
"top_provider": \{
"context_length": 8192,
"is_moderated": true,
"max_completion_tokens": 4096
}
}
] | +| `links` | [models.ModelsListResponseLinks](../models/modelslistresponselinks.mdx) | ✔️ | Pagination links | | +| `totalCount` | *number* | ✔️ | Total number of models matching the query | 150 | \ No newline at end of file diff --git a/docs/models/operations/getmodelsresponse.mdx b/docs/models/operations/getmodelsresponse.mdx index 7283df905..8b48d717a 100644 --- a/docs/models/operations/getmodelsresponse.mdx +++ b/docs/models/operations/getmodelsresponse.mdx @@ -44,8 +44,6 @@ let value: GetModelsResponse = { "temperature", "top_p", "max_tokens", - "frequency_penalty", - "presence_penalty", ], supportedVoices: null, topProvider: { @@ -63,6 +61,6 @@ let value: GetModelsResponse = { ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `result` | [models.ModelsListResponse](../../models/modelslistresponse.mdx) | ✔️ | N/A | \{
"data": [
\{
"architecture": \{
"input_modalities": [
"text"
],
"instruct_type": "chatml",
"modality": "text-\u003etext",
"output_modalities": [
"text"
],
"tokenizer": "GPT"
},
"canonical_slug": "openai/gpt-4",
"context_length": 8192,
"created": 1692901234,
"default_parameters": null,
"description": "GPT-4 is a large multimodal model that can solve difficult problems with greater accuracy.",
"expiration_date": null,
"id": "openai/gpt-4",
"knowledge_cutoff": null,
"links": \{
"details": "/api/v1/models/openai/gpt-4/endpoints"
},
"name": "GPT-4",
"per_request_limits": null,
"pricing": \{
"completion": "0.00006",
"image": "0",
"prompt": "0.00003",
"request": "0"
},
"supported_parameters": [
"temperature",
"top_p",
"max_tokens",
"frequency_penalty",
"presence_penalty"
],
"supported_voices": null,
"top_provider": \{
"context_length": 8192,
"is_moderated": true,
"max_completion_tokens": 4096
}
}
],
"links": \{
"next": "/api/v1/models?offset=500\u0026limit=500"
},
"total_count": 150
} | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `result` | [models.ModelsListResponse](../../models/modelslistresponse.mdx) | ✔️ | N/A | \{
"data": [
\{
"architecture": \{
"input_modalities": [
"text"
],
"instruct_type": "chatml",
"modality": "text-\u003etext",
"output_modalities": [
"text"
],
"tokenizer": "GPT"
},
"canonical_slug": "openai/gpt-4",
"context_length": 8192,
"created": 1692901234,
"default_parameters": null,
"description": "GPT-4 is a large multimodal model that can solve difficult problems with greater accuracy.",
"endpoints": [
"/api/v1/chat/completions",
"/api/v1/completions",
"/api/v1/messages",
"/api/v1/responses"
],
"expiration_date": null,
"id": "openai/gpt-4",
"is_open_weight": false,
"knowledge_cutoff": null,
"links": \{
"details": "/api/v1/models/openai/gpt-4/endpoints"
},
"name": "GPT-4",
"per_request_limits": null,
"pricing": \{
"completion": "0.00006",
"image": "0",
"prompt": "0.00003",
"request": "0"
},
"supported_parameters": [
"temperature",
"top_p",
"max_tokens"
],
"supported_voices": null,
"top_provider": \{
"context_length": 8192,
"is_moderated": true,
"max_completion_tokens": 4096
}
}
],
"links": \{
"next": "/api/v1/models?offset=500\u0026limit=500"
},
"total_count": 150
} | \ No newline at end of file diff --git a/docs/models/operations/listembeddingsmodelsresponse.mdx b/docs/models/operations/listembeddingsmodelsresponse.mdx index 214b5d6fd..670a6e9c9 100644 --- a/docs/models/operations/listembeddingsmodelsresponse.mdx +++ b/docs/models/operations/listembeddingsmodelsresponse.mdx @@ -54,6 +54,6 @@ let value: ListEmbeddingsModelsResponse = { ## Fields -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `result` | [models.EmbeddingsModelsListResponse](../../models/embeddingsmodelslistresponse.mdx) | ✔️ | N/A | \{
"data": [
\{
"architecture": \{
"input_modalities": [
"text"
],
"instruct_type": null,
"modality": "text-\u003eembeddings",
"output_modalities": [
"embeddings"
],
"tokenizer": "GPT"
},
"canonical_slug": "openai/text-embedding-3-small",
"context_length": 8192,
"created": 1692901234,
"default_parameters": null,
"description": "OpenAI text embedding model optimized for performance.",
"endpoints": [
"/api/v1/embeddings"
],
"expiration_date": null,
"id": "openai/text-embedding-3-small",
"input_modalities": [
\{
"supported_inputs": \{
"max_context_length": \{
"unit": "token",
"value": 8192
}
},
"type": "text"
}
],
"knowledge_cutoff": null,
"links": \{
"details": "/api/v1/models/openai/text-embedding-3-small/endpoints"
},
"name": "Text Embedding 3 Small",
"output_modalities": [
\{
"supported_parameters": \{
"encoding_format": \{
"type": "enum",
"values": [
"float",
"base64"
]
}
},
"type": "embeddings"
}
],
"per_request_limits": null,
"pricing": \{
"completion": "0",
"image": "0",
"prompt": "0.00000002",
"request": "0"
},
"supported_parameters": [],
"supported_voices": null,
"top_provider": \{
"context_length": 8192,
"is_moderated": false,
"max_completion_tokens": null
}
}
],
"links": \{
"next": null
},
"total_count": 1
} | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `result` | [models.EmbeddingsModelsListResponse](../../models/embeddingsmodelslistresponse.mdx) | ✔️ | N/A | \{
"data": [
\{
"architecture": \{
"input_modalities": [
"text"
],
"instruct_type": null,
"modality": "text-\u003eembeddings",
"output_modalities": [
"embeddings"
],
"tokenizer": "GPT"
},
"canonical_slug": "openai/text-embedding-3-small",
"context_length": 8192,
"created": 1692901234,
"default_parameters": null,
"description": "OpenAI text embedding model optimized for performance.",
"endpoints": [
"/api/v1/embeddings"
],
"expiration_date": null,
"id": "openai/text-embedding-3-small",
"input_modalities": [
\{
"supported_inputs": \{
"max_context_length": \{
"unit": "token",
"value": 8192
}
},
"type": "text"
}
],
"is_open_weight": false,
"knowledge_cutoff": null,
"links": \{
"details": "/api/v1/models/openai/text-embedding-3-small/endpoints"
},
"name": "Text Embedding 3 Small",
"output_modalities": [
\{
"supported_parameters": \{
"encoding_format": \{
"type": "enum",
"values": [
"float",
"base64"
]
}
},
"type": "embeddings"
}
],
"per_request_limits": null,
"pricing": \{
"completion": "0",
"image": "0",
"prompt": "0.00000002",
"request": "0"
},
"supported_parameters": [],
"supported_voices": null,
"top_provider": \{
"context_length": 8192,
"is_moderated": false,
"max_completion_tokens": null
}
}
],
"links": \{
"next": null
},
"total_count": 1
} | \ No newline at end of file diff --git a/docs/models/operations/listmodelsuserresponse.mdx b/docs/models/operations/listmodelsuserresponse.mdx index 935a50f98..36cef9154 100644 --- a/docs/models/operations/listmodelsuserresponse.mdx +++ b/docs/models/operations/listmodelsuserresponse.mdx @@ -44,8 +44,6 @@ let value: ListModelsUserResponse = { "temperature", "top_p", "max_tokens", - "frequency_penalty", - "presence_penalty", ], supportedVoices: null, topProvider: { @@ -63,6 +61,6 @@ let value: ListModelsUserResponse = { ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `result` | [models.ModelsListResponse](../../models/modelslistresponse.mdx) | ✔️ | N/A | \{
"data": [
\{
"architecture": \{
"input_modalities": [
"text"
],
"instruct_type": "chatml",
"modality": "text-\u003etext",
"output_modalities": [
"text"
],
"tokenizer": "GPT"
},
"canonical_slug": "openai/gpt-4",
"context_length": 8192,
"created": 1692901234,
"default_parameters": null,
"description": "GPT-4 is a large multimodal model that can solve difficult problems with greater accuracy.",
"expiration_date": null,
"id": "openai/gpt-4",
"knowledge_cutoff": null,
"links": \{
"details": "/api/v1/models/openai/gpt-4/endpoints"
},
"name": "GPT-4",
"per_request_limits": null,
"pricing": \{
"completion": "0.00006",
"image": "0",
"prompt": "0.00003",
"request": "0"
},
"supported_parameters": [
"temperature",
"top_p",
"max_tokens",
"frequency_penalty",
"presence_penalty"
],
"supported_voices": null,
"top_provider": \{
"context_length": 8192,
"is_moderated": true,
"max_completion_tokens": 4096
}
}
],
"links": \{
"next": "/api/v1/models?offset=500\u0026limit=500"
},
"total_count": 150
} | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `result` | [models.ModelsListResponse](../../models/modelslistresponse.mdx) | ✔️ | N/A | \{
"data": [
\{
"architecture": \{
"input_modalities": [
"text"
],
"instruct_type": "chatml",
"modality": "text-\u003etext",
"output_modalities": [
"text"
],
"tokenizer": "GPT"
},
"canonical_slug": "openai/gpt-4",
"context_length": 8192,
"created": 1692901234,
"default_parameters": null,
"description": "GPT-4 is a large multimodal model that can solve difficult problems with greater accuracy.",
"endpoints": [
"/api/v1/chat/completions",
"/api/v1/completions",
"/api/v1/messages",
"/api/v1/responses"
],
"expiration_date": null,
"id": "openai/gpt-4",
"is_open_weight": false,
"knowledge_cutoff": null,
"links": \{
"details": "/api/v1/models/openai/gpt-4/endpoints"
},
"name": "GPT-4",
"per_request_limits": null,
"pricing": \{
"completion": "0.00006",
"image": "0",
"prompt": "0.00003",
"request": "0"
},
"supported_parameters": [
"temperature",
"top_p",
"max_tokens"
],
"supported_voices": null,
"top_provider": \{
"context_length": 8192,
"is_moderated": true,
"max_completion_tokens": 4096
}
}
],
"links": \{
"next": "/api/v1/models?offset=500\u0026limit=500"
},
"total_count": 150
} | \ No newline at end of file diff --git a/docs/models/operations/listrerankmodelsresponse.mdx b/docs/models/operations/listrerankmodelsresponse.mdx index fe67b84de..2550e9273 100644 --- a/docs/models/operations/listrerankmodelsresponse.mdx +++ b/docs/models/operations/listrerankmodelsresponse.mdx @@ -44,8 +44,6 @@ let value: ListRerankModelsResponse = { "temperature", "top_p", "max_tokens", - "frequency_penalty", - "presence_penalty", ], supportedVoices: null, topProvider: { @@ -63,6 +61,6 @@ let value: ListRerankModelsResponse = { ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `result` | [models.RerankModelsListResponse](../../models/rerankmodelslistresponse.mdx) | ✔️ | N/A | \{
"data": [
\{
"architecture": \{
"input_modalities": [
"text"
],
"instruct_type": "chatml",
"modality": "text-\u003etext",
"output_modalities": [
"text"
],
"tokenizer": "GPT"
},
"canonical_slug": "openai/gpt-4",
"context_length": 8192,
"created": 1692901234,
"default_parameters": null,
"description": "GPT-4 is a large multimodal model that can solve difficult problems with greater accuracy.",
"expiration_date": null,
"id": "openai/gpt-4",
"knowledge_cutoff": null,
"links": \{
"details": "/api/v1/models/openai/gpt-4/endpoints"
},
"name": "GPT-4",
"per_request_limits": null,
"pricing": \{
"completion": "0.00006",
"image": "0",
"prompt": "0.00003",
"request": "0"
},
"supported_parameters": [
"temperature",
"top_p",
"max_tokens",
"frequency_penalty",
"presence_penalty"
],
"supported_voices": null,
"top_provider": \{
"context_length": 8192,
"is_moderated": true,
"max_completion_tokens": 4096
}
}
],
"links": \{
"next": "/api/v1/models?offset=500\u0026limit=500"
},
"total_count": 150
} | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `result` | [models.RerankModelsListResponse](../../models/rerankmodelslistresponse.mdx) | ✔️ | N/A | \{
"data": [
\{
"architecture": \{
"input_modalities": [
"text"
],
"instruct_type": "chatml",
"modality": "text-\u003etext",
"output_modalities": [
"text"
],
"tokenizer": "GPT"
},
"canonical_slug": "openai/gpt-4",
"context_length": 8192,
"created": 1692901234,
"default_parameters": null,
"description": "GPT-4 is a large multimodal model that can solve difficult problems with greater accuracy.",
"endpoints": [
"/api/v1/chat/completions",
"/api/v1/completions",
"/api/v1/messages",
"/api/v1/responses"
],
"expiration_date": null,
"id": "openai/gpt-4",
"is_open_weight": false,
"knowledge_cutoff": null,
"links": \{
"details": "/api/v1/models/openai/gpt-4/endpoints"
},
"name": "GPT-4",
"per_request_limits": null,
"pricing": \{
"completion": "0.00006",
"image": "0",
"prompt": "0.00003",
"request": "0"
},
"supported_parameters": [
"temperature",
"top_p",
"max_tokens"
],
"supported_voices": null,
"top_provider": \{
"context_length": 8192,
"is_moderated": true,
"max_completion_tokens": 4096
}
}
],
"links": \{
"next": "/api/v1/models?offset=500\u0026limit=500"
},
"total_count": 150
} | \ No newline at end of file diff --git a/docs/models/rerankmodel.mdx b/docs/models/rerankmodel.mdx index 72dfd4ed6..e2f234e17 100644 --- a/docs/models/rerankmodel.mdx +++ b/docs/models/rerankmodel.mdx @@ -31,7 +31,7 @@ let value: RerankModel = { ], id: "openai/gpt-4", links: { - details: "/api/v1/models/openai/gpt-5.4/endpoints", + details: "/api/v1/models/openai/gpt-4/endpoints", }, name: "GPT-4", perRequestLimits: null, @@ -67,6 +67,7 @@ let value: RerankModel = { | `expirationDate` | *string* | ➖ | The date after which the model may be removed. ISO 8601 date string (YYYY-MM-DD) or null if no expiration. | 2025-06-01 | | `huggingFaceId` | *string* | ➖ | Hugging Face model identifier, if applicable | microsoft/DialoGPT-medium | | `id` | *string* | ✔️ | Unique identifier for the model | openai/gpt-4 | +| `isOpenWeight` | *boolean* | ➖ | Whether the model has publicly released weights. A preset reports true only when every listed model is known to be open-weight; routing presets report false. | false | | `knowledgeCutoff` | *string* | ➖ | The date up to which the model was trained on data. ISO 8601 date string (YYYY-MM-DD) or null if unknown. | 2024-10-01 | | `links` | [models.ModelLinks](../models/modellinks.mdx) | ✔️ | Related API endpoints and resources for this model. | \{
"details": "/api/v1/models/openai/gpt-5.4/endpoints"
} | | `name` | *string* | ✔️ | Display name of the model | GPT-4 | diff --git a/docs/models/rerankmodelslistresponse.mdx b/docs/models/rerankmodelslistresponse.mdx index 86336af04..6de4d71b9 100644 --- a/docs/models/rerankmodelslistresponse.mdx +++ b/docs/models/rerankmodelslistresponse.mdx @@ -45,8 +45,6 @@ let value: RerankModelsListResponse = { "temperature", "top_p", "max_tokens", - "frequency_penalty", - "presence_penalty", ], supportedVoices: null, topProvider: { diff --git a/jsr.json b/jsr.json index e13caaabf..35f6c8edf 100644 --- a/jsr.json +++ b/jsr.json @@ -2,7 +2,7 @@ { "name": "@openrouter/sdk", - "version": "1.5.169", + "version": "1.5.170", "exports": { ".": "./src/index.ts", "./models/errors": "./src/models/errors/index.ts", diff --git a/package.json b/package.json index 6193c2069..9e229a75d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@openrouter/sdk", - "version": "1.5.169", + "version": "1.5.170", "author": "OpenRouter", "description": "The OpenRouter TypeScript SDK is a type-safe toolkit for building AI applications with access to 400+ language models through a unified API.", "keywords": [ @@ -73,15 +73,15 @@ "lint": "eslint --cache --max-warnings=0 src", "build": "node --max-old-space-size=8192 ./node_modules/typescript/bin/tsc && node scripts/unbarrel-imports.js", "prepublishOnly": "npm run build", + "typecheck:transit": "exit 0", "postinstall": "node scripts/check-types.js || true", - "prepare": "npm run build", "test": "vitest --run --project unit", - "test:e2e": "vitest --run --project e2e", - "compile": "node --max-old-space-size=8192 ./node_modules/typescript/bin/tsc && node scripts/unbarrel-imports.js", "test:transit": "exit 0", - "test:watch": "vitest --watch --project unit", "typecheck": "tsc --noEmit", - "typecheck:transit": "exit 0" + "compile": "node --max-old-space-size=8192 ./node_modules/typescript/bin/tsc && node scripts/unbarrel-imports.js", + "prepare": "npm run build", + "test:e2e": "vitest --run --project e2e", + "test:watch": "vitest --watch --project unit" }, "peerDependencies": { diff --git a/src/lib/config.ts b/src/lib/config.ts index 3269b296f..644b31495 100644 --- a/src/lib/config.ts +++ b/src/lib/config.ts @@ -74,7 +74,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null { export const SDK_METADATA = { language: "typescript", openapiDocVersion: "1.0.0", - sdkVersion: "1.5.169", + sdkVersion: "1.5.170", genVersion: "2.960.8", - userAgent: "speakeasy-sdk/typescript 1.5.169 2.960.8 1.0.0 @openrouter/sdk", + userAgent: "speakeasy-sdk/typescript 1.5.170 2.960.8 1.0.0 @openrouter/sdk", } as const; diff --git a/src/models/embeddingsmodel.ts b/src/models/embeddingsmodel.ts index 8abba5459..87fb3d97f 100644 --- a/src/models/embeddingsmodel.ts +++ b/src/models/embeddingsmodel.ts @@ -99,6 +99,10 @@ export type EmbeddingsModel = { * Unique identifier for the model */ id: string; + /** + * Whether the model has publicly released weights. A preset reports true only when every listed model is known to be open-weight; routing presets report false. + */ + isOpenWeight?: boolean | undefined; /** * The date up to which the model was trained on data. ISO 8601 date string (YYYY-MM-DD) or null if unknown. */ @@ -162,6 +166,7 @@ export const EmbeddingsModel$inboundSchema: z.ZodType< expiration_date: z.nullable(z.string()).optional(), hugging_face_id: z.nullable(z.string()).optional(), id: z.string(), + is_open_weight: z.boolean().optional(), knowledge_cutoff: z.nullable(z.string()).optional(), links: ModelLinks$inboundSchema, name: z.string(), @@ -181,6 +186,7 @@ export const EmbeddingsModel$inboundSchema: z.ZodType< "default_parameters": "defaultParameters", "expiration_date": "expirationDate", "hugging_face_id": "huggingFaceId", + "is_open_weight": "isOpenWeight", "knowledge_cutoff": "knowledgeCutoff", "per_request_limits": "perRequestLimits", "supported_parameters": "supportedParameters", diff --git a/src/models/model.ts b/src/models/model.ts index a2bc2e5e7..57f3f6708 100644 --- a/src/models/model.ts +++ b/src/models/model.ts @@ -91,6 +91,10 @@ export type Model = { * Unique identifier for the model */ id: string; + /** + * Whether the model has publicly released weights. A preset reports true only when every listed model is known to be open-weight; routing presets report false. + */ + isOpenWeight?: boolean | undefined; /** * The date up to which the model was trained on data. ISO 8601 date string (YYYY-MM-DD) or null if unknown. */ @@ -143,6 +147,7 @@ export const Model$inboundSchema: z.ZodType = z.object({ expiration_date: z.nullable(z.string()).optional(), hugging_face_id: z.nullable(z.string()).optional(), id: z.string(), + is_open_weight: z.boolean().optional(), knowledge_cutoff: z.nullable(z.string()).optional(), links: ModelLinks$inboundSchema, name: z.string(), @@ -160,6 +165,7 @@ export const Model$inboundSchema: z.ZodType = z.object({ "default_parameters": "defaultParameters", "expiration_date": "expirationDate", "hugging_face_id": "huggingFaceId", + "is_open_weight": "isOpenWeight", "knowledge_cutoff": "knowledgeCutoff", "per_request_limits": "perRequestLimits", "supported_parameters": "supportedParameters", diff --git a/src/models/rerankmodel.ts b/src/models/rerankmodel.ts index 899d86006..607808d9f 100644 --- a/src/models/rerankmodel.ts +++ b/src/models/rerankmodel.ts @@ -99,6 +99,10 @@ export type RerankModel = { * Unique identifier for the model */ id: string; + /** + * Whether the model has publicly released weights. A preset reports true only when every listed model is known to be open-weight; routing presets report false. + */ + isOpenWeight?: boolean | undefined; /** * The date up to which the model was trained on data. ISO 8601 date string (YYYY-MM-DD) or null if unknown. */ @@ -160,6 +164,7 @@ export const RerankModel$inboundSchema: z.ZodType = z expiration_date: z.nullable(z.string()).optional(), hugging_face_id: z.nullable(z.string()).optional(), id: z.string(), + is_open_weight: z.boolean().optional(), knowledge_cutoff: z.nullable(z.string()).optional(), links: ModelLinks$inboundSchema, name: z.string(), @@ -179,6 +184,7 @@ export const RerankModel$inboundSchema: z.ZodType = z "default_parameters": "defaultParameters", "expiration_date": "expirationDate", "hugging_face_id": "huggingFaceId", + "is_open_weight": "isOpenWeight", "knowledge_cutoff": "knowledgeCutoff", "per_request_limits": "perRequestLimits", "supported_parameters": "supportedParameters",