diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 8db4fce9b..74e3a036f 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,12 +1,12 @@ lockVersion: "" id: "" management: - docChecksum: 2c831a797619337ab7c5a3c81a0a5f84 + docChecksum: abba447baf75e1b380e7ddbd8d38d743 docVersion: 1.0.0 speakeasyVersion: 1.808.1 generationVersion: 2.960.8 - releaseVersion: 1.5.171 - configChecksum: 208880cb93f8e9dc086876a1045e3dbb + releaseVersion: 1.5.172 + configChecksum: de5f13cd327926c693b86bf74a3eb383 repoURL: https://github.com/OpenRouterTeam/typescript-sdk.git installationURL: https://github.com/OpenRouterTeam/typescript-sdk published: true @@ -24211,4 +24211,3 @@ examples: "500": application/json: {"error": {"code": 500, "message": "Internal Server Error"}} examplesVersion: 1.0.2 -releaseNotes: "## Typescript SDK Changes:\n* `openrouter.tts.createSpeech()`: \n * `request.speechRequest.timestampGranularities` **Added**\n * `error.status[504]` **Added**\n* `openrouter.tts.listModels()`: `response.data[].endpoints[].outputModalities[].supportedParameters.timestampGranularities` **Added**\n* `openrouter.tts.getModel()`: `response.endpoints[].outputModalities[].supportedParameters.timestampGranularities` **Added**\n" diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 22ce406fc..3d41d5564 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -38,7 +38,7 @@ generation: documentation: mintlify preApplyUnionDiscriminators: true typescript: - version: 1.5.171 + version: 1.5.172 acceptHeaderEnum: false additionalDependencies: dependencies: diff --git a/.speakeasy/out.openapi.yaml b/.speakeasy/out.openapi.yaml index 1b066be08..0e3d2ebca 100644 --- a/.speakeasy/out.openapi.yaml +++ b/.speakeasy/out.openapi.yaml @@ -31888,7 +31888,7 @@ components: description: 'Price in USD per token for prompt (input) processing' type: 'string' request: - description: 'Price in USD per request. For rerank endpoints priced by search unit, this is the price in USD per search unit. How search units are counted depends on the provider. For Amazon Bedrock rerank, OpenRouter counts 500-token chunks based on the estimated token count of each query-document pair, with up to 100 chunks per search unit.' + description: 'Price in USD per request. For rerank endpoints priced by search unit, this is the price in USD per search unit. How search units are counted depends on the provider. For Amazon Bedrock rerank, OpenRouter counts 500-token chunks (512-token chunks for Amazon Rerank) based on the estimated token count of each query-document pair, with up to 100 chunks per search unit.' type: 'string' web_search: description: 'Price in USD per web search' @@ -33945,7 +33945,7 @@ components: description: 'Price in USD per token for prompt (input) processing' type: 'string' request: - description: 'Price in USD per request. For rerank endpoints priced by search unit, this is the price in USD per search unit. How search units are counted depends on the provider. For Amazon Bedrock rerank, OpenRouter counts 500-token chunks based on the estimated token count of each query-document pair, with up to 100 chunks per search unit.' + description: 'Price in USD per request. For rerank endpoints priced by search unit, this is the price in USD per search unit. How search units are counted depends on the provider. For Amazon Bedrock rerank, OpenRouter counts 500-token chunks (512-token chunks for Amazon Rerank) based on the estimated token count of each query-document pair, with up to 100 chunks per search unit.' type: 'string' web_search: description: 'Price in USD per web search' diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 8e36ccc53..3d4e94fbe 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:f451fed3ca9ab29c36729d99441e2a0a9c3b0df59377a2f90c1bdeac8ddb9682 - sourceBlobDigest: sha256:ec51fa6a1b780f14bfa1d8b9224ef6eb2553dc373aa19b42496d4359d84d408a + sourceRevisionDigest: sha256:7ce7da0d309ec852935e976093ba4adb604932ff65e116d300fa73752cb3e339 + sourceBlobDigest: sha256:92caa9d5fa65ee27f937bdf6e98700e1caa690be88fd65d9cea188c230124002 tags: - latest - 1.0.0 @@ -11,10 +11,10 @@ targets: openrouter: source: OpenRouter API sourceNamespace: open-router-chat-completions-api - sourceRevisionDigest: sha256:f451fed3ca9ab29c36729d99441e2a0a9c3b0df59377a2f90c1bdeac8ddb9682 - sourceBlobDigest: sha256:ec51fa6a1b780f14bfa1d8b9224ef6eb2553dc373aa19b42496d4359d84d408a + sourceRevisionDigest: sha256:7ce7da0d309ec852935e976093ba4adb604932ff65e116d300fa73752cb3e339 + sourceBlobDigest: sha256:92caa9d5fa65ee27f937bdf6e98700e1caa690be88fd65d9cea188c230124002 codeSamplesNamespace: open-router-chat-completions-api-typescript-code-samples - codeSamplesRevisionDigest: sha256:e948c8939afb92e767837f3bf198919096d78b3039ecde8dc5970c371fd3c21a + codeSamplesRevisionDigest: sha256:ac9ea22a985d12d42ff9eeba43e4a59d0609cf9e0990c6f77dedc1024994336e workflow: workflowVersion: 1.0.0 speakeasyVersion: 1.808.1 diff --git a/RELEASES.md b/RELEASES.md index 09fa8de70..df16bed67 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -6086,4 +6086,14 @@ Based on: ### Generated - [typescript v1.5.171] . ### Releases -- [NPM v1.5.171] https://www.npmjs.com/package/@openrouter/sdk/v/1.5.171 - . \ No newline at end of file +- [NPM v1.5.171] https://www.npmjs.com/package/@openrouter/sdk/v/1.5.171 - . + +## 2026-12-03 20:55:29 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.808.1 (2.960.8) https://github.com/speakeasy-api/speakeasy +### Generated +- [typescript v1.5.172] . +### Releases +- [NPM v1.5.172] https://www.npmjs.com/package/@openrouter/sdk/v/1.5.172 - . \ No newline at end of file diff --git a/docs/models/pricing.mdx b/docs/models/pricing.mdx index fac3673a8..b4a1c87c8 100644 --- a/docs/models/pricing.mdx +++ b/docs/models/pricing.mdx @@ -31,5 +31,5 @@ let value: Pricing = { | `internalReasoning` | *string* | ➖ | Price in USD per internal reasoning token | | `overrides` | [models.PricingOverride](../models/pricingoverride.mdx)[] | ➖ | Conditional overrides of the base pricing (e.g. long-context or time-based pricing). An entry applies when all of its condition fields (e.g. min_prompt_tokens, or the utc_start/utc_end time window) match the request; among applicable entries, later entries win per key; price keys absent from an entry inherit the base price. The top-level pricing keys always reflect the price that applies under default conditions. | | `prompt` | *string* | ✔️ | Price in USD per token for prompt (input) processing | -| `request` | *string* | ➖ | Price in USD per request. For rerank endpoints priced by search unit, this is the price in USD per search unit. How search units are counted depends on the provider. For Amazon Bedrock rerank, OpenRouter counts 500-token chunks based on the estimated token count of each query-document pair, with up to 100 chunks per search unit. | +| `request` | *string* | ➖ | Price in USD per request. For rerank endpoints priced by search unit, this is the price in USD per search unit. How search units are counted depends on the provider. For Amazon Bedrock rerank, OpenRouter counts 500-token chunks (512-token chunks for Amazon Rerank) based on the estimated token count of each query-document pair, with up to 100 chunks per search unit. | | `webSearch` | *string* | ➖ | Price in USD per web search | \ No newline at end of file diff --git a/docs/models/publicpricing.mdx b/docs/models/publicpricing.mdx index d0b774a9a..39619b211 100644 --- a/docs/models/publicpricing.mdx +++ b/docs/models/publicpricing.mdx @@ -33,5 +33,5 @@ let value: PublicPricing = { | `internalReasoning` | *string* | ➖ | Price in USD per internal reasoning token | | `overrides` | [models.PricingOverride](../models/pricingoverride.mdx)[] | ➖ | Conditional overrides of the base pricing (e.g. long-context or time-based pricing). An entry applies when all of its condition fields (e.g. min_prompt_tokens, or the utc_start/utc_end time window) match the request; among applicable entries, later entries win per key; price keys absent from an entry inherit the base price. The top-level pricing keys always reflect the price that applies under default conditions. | | `prompt` | *string* | ✔️ | Price in USD per token for prompt (input) processing | -| `request` | *string* | ➖ | Price in USD per request. For rerank endpoints priced by search unit, this is the price in USD per search unit. How search units are counted depends on the provider. For Amazon Bedrock rerank, OpenRouter counts 500-token chunks based on the estimated token count of each query-document pair, with up to 100 chunks per search unit. | +| `request` | *string* | ➖ | Price in USD per request. For rerank endpoints priced by search unit, this is the price in USD per search unit. How search units are counted depends on the provider. For Amazon Bedrock rerank, OpenRouter counts 500-token chunks (512-token chunks for Amazon Rerank) based on the estimated token count of each query-document pair, with up to 100 chunks per search unit. | | `webSearch` | *string* | ➖ | Price in USD per web search | \ No newline at end of file diff --git a/jsr.json b/jsr.json index ad7898906..9073574e8 100644 --- a/jsr.json +++ b/jsr.json @@ -2,7 +2,7 @@ { "name": "@openrouter/sdk", - "version": "1.5.171", + "version": "1.5.172", "exports": { ".": "./src/index.ts", "./models/errors": "./src/models/errors/index.ts", diff --git a/package.json b/package.json index 93a194fb0..692b9a32f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@openrouter/sdk", - "version": "1.5.171", + "version": "1.5.172", "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": [ @@ -21,8 +21,8 @@ "license": "Apache-2.0", "packageManager": "pnpm@10.22.0", "publishConfig": { - "access": "public", - "provenance": true + "provenance": true, + "access": "public" }, "type": "module", "main": "./esm/index.js", @@ -73,14 +73,14 @@ "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", - "postinstall": "node scripts/check-types.js || true", + "compile": "node --max-old-space-size=8192 ./node_modules/typescript/bin/tsc && node scripts/unbarrel-imports.js", + "prepare": "npm run build", + "test": "vitest --run --project unit", "test:e2e": "vitest --run --project e2e", "test:transit": "exit 0", "test:watch": "vitest --watch --project unit", "typecheck": "tsc --noEmit", - "compile": "node --max-old-space-size=8192 ./node_modules/typescript/bin/tsc && node scripts/unbarrel-imports.js", - "prepare": "npm run build", - "test": "vitest --run --project unit", + "postinstall": "node scripts/check-types.js || true", "typecheck:transit": "exit 0" }, "peerDependencies": { diff --git a/src/lib/config.ts b/src/lib/config.ts index 68b1d72d5..42704ca0e 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.171", + sdkVersion: "1.5.172", genVersion: "2.960.8", - userAgent: "speakeasy-sdk/typescript 1.5.171 2.960.8 1.0.0 @openrouter/sdk", + userAgent: "speakeasy-sdk/typescript 1.5.172 2.960.8 1.0.0 @openrouter/sdk", } as const; diff --git a/src/models/pricing.ts b/src/models/pricing.ts index 937bdd258..919ffc410 100644 --- a/src/models/pricing.ts +++ b/src/models/pricing.ts @@ -70,7 +70,7 @@ export type Pricing = { */ prompt: string; /** - * Price in USD per request. For rerank endpoints priced by search unit, this is the price in USD per search unit. How search units are counted depends on the provider. For Amazon Bedrock rerank, OpenRouter counts 500-token chunks based on the estimated token count of each query-document pair, with up to 100 chunks per search unit. + * Price in USD per request. For rerank endpoints priced by search unit, this is the price in USD per search unit. How search units are counted depends on the provider. For Amazon Bedrock rerank, OpenRouter counts 500-token chunks (512-token chunks for Amazon Rerank) based on the estimated token count of each query-document pair, with up to 100 chunks per search unit. */ request?: string | undefined; /** diff --git a/src/models/publicpricing.ts b/src/models/publicpricing.ts index de2c77ef5..46f5b9f05 100644 --- a/src/models/publicpricing.ts +++ b/src/models/publicpricing.ts @@ -73,7 +73,7 @@ export type PublicPricing = { */ prompt: string; /** - * Price in USD per request. For rerank endpoints priced by search unit, this is the price in USD per search unit. How search units are counted depends on the provider. For Amazon Bedrock rerank, OpenRouter counts 500-token chunks based on the estimated token count of each query-document pair, with up to 100 chunks per search unit. + * Price in USD per request. For rerank endpoints priced by search unit, this is the price in USD per search unit. How search units are counted depends on the provider. For Amazon Bedrock rerank, OpenRouter counts 500-token chunks (512-token chunks for Amazon Rerank) based on the estimated token count of each query-document pair, with up to 100 chunks per search unit. */ request?: string | undefined; /**