Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions .speakeasy/gen.lock
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
lockVersion: ""
id: ""
management:
docChecksum: 7bce7d8a2da7e11efd1293f527f1e472
docChecksum: 7adefdd521a84f95cf21c833866e8925
docVersion: 1.0.0
speakeasyVersion: 1.808.1
generationVersion: 2.960.8
releaseVersion: 1.5.181
configChecksum: 576437db3437ab6890073cfd00a5e763
releaseVersion: 1.5.182
configChecksum: b90c5629aad1e0221a33e783de11132f
repoURL: https://github.com/OpenRouterTeam/typescript-sdk.git
installationURL: https://github.com/OpenRouterTeam/typescript-sdk
published: true
Expand Down Expand Up @@ -24226,4 +24226,3 @@ examples:
"500":
application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
examplesVersion: 1.0.2
releaseNotes: "## Typescript SDK Changes:\n* `openrouter.analytics.queryAnalytics()`: \n * `request.requestBody.apiKeyTagKey` **Added**\n* `openrouter.apiKeys.list()`: \n * `request.tag` **Added**\n * `response.data[].tags` **Added**\n* `openrouter.apiKeys.create()`: \n * `request.requestBody.tags` **Added**\n * `response.data.tags` **Added**\n* `openrouter.apiKeys.get()`: `response.data.tags` **Added**\n* `openrouter.apiKeys.update()`: \n * `request.requestBody.tags` **Added**\n * `response.data.tags` **Added**\n"
2 changes: 1 addition & 1 deletion .speakeasy/gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ generation:
documentation: mintlify
preApplyUnionDiscriminators: true
typescript:
version: 1.5.181
version: 1.5.182
acceptHeaderEnum: false
additionalDependencies:
dependencies:
Expand Down
30 changes: 15 additions & 15 deletions .speakeasy/out.openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54040,7 +54040,7 @@ paths:
- $ref: "#/components/parameters/AppCategories"
/guardrails/policies/capacity:
get:
description: 'List the capacity policies in a workspace. Enterprise private beta feature. [Management key](/docs/guides/overview/auth/management-api-keys) required.'
description: 'List the capacity policies in a workspace. Enterprise private beta feature: organizations without access receive 403. [Management key](/docs/guides/overview/auth/management-api-keys) required.'
operationId: 'listCapacityPolicies'
parameters:
- description: 'Number of records to skip for pagination. When both offset and limit are omitted, the full list is returned'
Expand Down Expand Up @@ -54104,10 +54104,10 @@ paths:
example:
error:
code: 403
message: 'Only management keys can perform this operation'
message: 'Capacity policies are only available to Enterprise customers in the private beta.'
schema:
$ref: '#/components/schemas/ForbiddenResponse'
description: 'Forbidden - Authentication successful but insufficient permissions'
description: 'Forbidden - Insufficient permissions, or the organization does not have access to the Enterprise private beta'
'404':
content:
application/json:
Expand Down Expand Up @@ -54144,7 +54144,7 @@ paths:
results: '$.data'
type: 'offsetLimit'
post:
description: 'Create a capacity policy in a workspace. Enterprise private beta feature. [Management key](/docs/guides/overview/auth/management-api-keys) required.'
description: 'Create a capacity policy in a workspace. Enterprise private beta feature: organizations without access receive 403. [Management key](/docs/guides/overview/auth/management-api-keys) required.'
operationId: 'createCapacityPolicy'
requestBody:
content:
Expand Down Expand Up @@ -54185,10 +54185,10 @@ paths:
example:
error:
code: 403
message: 'Only management keys can perform this operation'
message: 'Capacity policies are only available to Enterprise customers in the private beta.'
schema:
$ref: '#/components/schemas/ForbiddenResponse'
description: 'Forbidden - Authentication successful but insufficient permissions'
description: 'Forbidden - Insufficient permissions, or the organization does not have access to the Enterprise private beta'
'404':
content:
application/json:
Expand Down Expand Up @@ -54229,7 +54229,7 @@ paths:
- $ref: "#/components/parameters/AppCategories"
/guardrails/policies/capacity/{id}:
delete:
description: 'Delete a capacity policy. Enterprise private beta feature. [Management key](/docs/guides/overview/auth/management-api-keys) required.'
description: 'Delete a capacity policy. Enterprise private beta feature: organizations without access receive 403. [Management key](/docs/guides/overview/auth/management-api-keys) required.'
operationId: 'deleteCapacityPolicy'
parameters:
- description: 'Policy ID'
Expand Down Expand Up @@ -54283,10 +54283,10 @@ paths:
example:
error:
code: 403
message: 'Only management keys can perform this operation'
message: 'Capacity policies are only available to Enterprise customers in the private beta.'
schema:
$ref: '#/components/schemas/ForbiddenResponse'
description: 'Forbidden - Authentication successful but insufficient permissions'
description: 'Forbidden - Insufficient permissions, or the organization does not have access to the Enterprise private beta'
'404':
content:
application/json:
Expand Down Expand Up @@ -54322,7 +54322,7 @@ paths:
- 'Guardrail Policies'
x-speakeasy-name-override: 'deleteCapacityPolicy'
get:
description: 'Get a capacity policy with its member and API key assignments. Enterprise private beta feature. [Management key](/docs/guides/overview/auth/management-api-keys) required.'
description: 'Get a capacity policy with its member and API key assignments. Enterprise private beta feature: organizations without access receive 403. [Management key](/docs/guides/overview/auth/management-api-keys) required.'
operationId: 'getCapacityPolicy'
parameters:
- description: 'Policy ID'
Expand Down Expand Up @@ -54376,10 +54376,10 @@ paths:
example:
error:
code: 403
message: 'Only management keys can perform this operation'
message: 'Capacity policies are only available to Enterprise customers in the private beta.'
schema:
$ref: '#/components/schemas/ForbiddenResponse'
description: 'Forbidden - Authentication successful but insufficient permissions'
description: 'Forbidden - Insufficient permissions, or the organization does not have access to the Enterprise private beta'
'404':
content:
application/json:
Expand All @@ -54405,7 +54405,7 @@ paths:
- 'Guardrail Policies'
x-speakeasy-name-override: 'getCapacityPolicy'
put:
description: 'Replace a capacity policy''s name and config, and optionally its assignments. Enterprise private beta feature. [Management key](/docs/guides/overview/auth/management-api-keys) required.'
description: 'Replace a capacity policy''s name and config, and optionally its assignments. Enterprise private beta feature: organizations without access receive 403. [Management key](/docs/guides/overview/auth/management-api-keys) required.'
operationId: 'updateCapacityPolicy'
parameters:
- description: 'Policy ID'
Expand Down Expand Up @@ -54456,10 +54456,10 @@ paths:
example:
error:
code: 403
message: 'Only management keys can perform this operation'
message: 'Capacity policies are only available to Enterprise customers in the private beta.'
schema:
$ref: '#/components/schemas/ForbiddenResponse'
description: 'Forbidden - Authentication successful but insufficient permissions'
description: 'Forbidden - Insufficient permissions, or the organization does not have access to the Enterprise private beta'
'404':
content:
application/json:
Expand Down
10 changes: 5 additions & 5 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@ speakeasyVersion: 1.808.1
sources:
OpenRouter API:
sourceNamespace: open-router-chat-completions-api
sourceRevisionDigest: sha256:10ae45dd713cea3f5ff56891f96a0071766d800f5e0d85b8dc9cdb94c50dc3fa
sourceBlobDigest: sha256:f4e4ac3bb373a2d416683b73c65388dc78fe64d3af97cd050e0292ca7a753ddd
sourceRevisionDigest: sha256:62cbd5a21bed07b7ee748bd70835cd2cb77d0edeb1785f70841930b19d034362
sourceBlobDigest: sha256:e063911d64de2527b449a00cda5c9f6428d21e18d7b80270be971f152569a7c2
tags:
- latest
- 1.0.0
targets:
openrouter:
source: OpenRouter API
sourceNamespace: open-router-chat-completions-api
sourceRevisionDigest: sha256:10ae45dd713cea3f5ff56891f96a0071766d800f5e0d85b8dc9cdb94c50dc3fa
sourceBlobDigest: sha256:f4e4ac3bb373a2d416683b73c65388dc78fe64d3af97cd050e0292ca7a753ddd
sourceRevisionDigest: sha256:62cbd5a21bed07b7ee748bd70835cd2cb77d0edeb1785f70841930b19d034362
sourceBlobDigest: sha256:e063911d64de2527b449a00cda5c9f6428d21e18d7b80270be971f152569a7c2
codeSamplesNamespace: open-router-chat-completions-api-typescript-code-samples
codeSamplesRevisionDigest: sha256:e11c8af35b5057eb9dad25899596ef704dc8a7ee0e2e292b421c2c467d113c9b
codeSamplesRevisionDigest: sha256:edb5b566fce7862c3ad56adf6c4882898c85bda9e22fe1497559a5d47e16f238
workflow:
workflowVersion: 1.0.0
speakeasyVersion: 1.808.1
Expand Down
12 changes: 11 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -6186,4 +6186,14 @@ Based on:
### Generated
- [typescript v1.5.181] .
### Releases
- [NPM v1.5.181] https://www.npmjs.com/package/@openrouter/sdk/v/1.5.181 - .
- [NPM v1.5.181] https://www.npmjs.com/package/@openrouter/sdk/v/1.5.181 - .

## 2026-12-05 05:20:50
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.808.1 (2.960.8) https://github.com/speakeasy-api/speakeasy
### Generated
- [typescript v1.5.182] .
### Releases
- [NPM v1.5.182] https://www.npmjs.com/package/@openrouter/sdk/v/1.5.182 - .
10 changes: 5 additions & 5 deletions docs/sdks/guardrailpolicies/README.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -1680,7 +1680,7 @@ run();

## listCapacityPolicies

List the capacity policies in a workspace. Enterprise private beta feature. [Management key](/docs/guides/overview/auth/management-api-keys) required.
List the capacity policies in a workspace. Enterprise private beta feature: organizations without access receive 403. [Management key](/docs/guides/overview/auth/management-api-keys) required.

### Example Usage

Expand Down Expand Up @@ -1767,7 +1767,7 @@ run();

## createCapacityPolicy

Create a capacity policy in a workspace. Enterprise private beta feature. [Management key](/docs/guides/overview/auth/management-api-keys) required.
Create a capacity policy in a workspace. Enterprise private beta feature: organizations without access receive 403. [Management key](/docs/guides/overview/auth/management-api-keys) required.

### Example Usage

Expand Down Expand Up @@ -1885,7 +1885,7 @@ run();

## deleteCapacityPolicy

Delete a capacity policy. Enterprise private beta feature. [Management key](/docs/guides/overview/auth/management-api-keys) required.
Delete a capacity policy. Enterprise private beta feature: organizations without access receive 403. [Management key](/docs/guides/overview/auth/management-api-keys) required.

### Example Usage

Expand Down Expand Up @@ -1971,7 +1971,7 @@ run();

## getCapacityPolicy

Get a capacity policy with its member and API key assignments. Enterprise private beta feature. [Management key](/docs/guides/overview/auth/management-api-keys) required.
Get a capacity policy with its member and API key assignments. Enterprise private beta feature: organizations without access receive 403. [Management key](/docs/guides/overview/auth/management-api-keys) required.

### Example Usage

Expand Down Expand Up @@ -2056,7 +2056,7 @@ run();

## updateCapacityPolicy

Replace a capacity policy's name and config, and optionally its assignments. Enterprise private beta feature. [Management key](/docs/guides/overview/auth/management-api-keys) required.
Replace a capacity policy's name and config, and optionally its assignments. Enterprise private beta feature: organizations without access receive 403. [Management key](/docs/guides/overview/auth/management-api-keys) required.

### Example Usage

Expand Down
2 changes: 1 addition & 1 deletion jsr.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

{
"name": "@openrouter/sdk",
"version": "1.5.181",
"version": "1.5.182",
"exports": {
".": "./src/index.ts",
"./models/errors": "./src/models/errors/index.ts",
Expand Down
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@openrouter/sdk",
"version": "1.5.181",
"version": "1.5.182",
"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": [
Expand Down Expand Up @@ -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",
"compile": "node --max-old-space-size=8192 ./node_modules/typescript/bin/tsc && node scripts/unbarrel-imports.js",
"postinstall": "node scripts/check-types.js || true",
"prepare": "npm run build",
"test:transit": "exit 0",
"test:watch": "vitest --watch --project unit",
"typecheck": "tsc --noEmit",
"postinstall": "node scripts/check-types.js || true",
"prepare": "npm run build",
"test": "vitest --run --project unit",
"test:e2e": "vitest --run --project e2e",
"test:transit": "exit 0",
"typecheck:transit": "exit 0"
"typecheck:transit": "exit 0",
"compile": "node --max-old-space-size=8192 ./node_modules/typescript/bin/tsc && node scripts/unbarrel-imports.js",
"test:e2e": "vitest --run --project e2e"
},
"peerDependencies": {

Expand Down
2 changes: 1 addition & 1 deletion src/funcs/guardrailPoliciesCreateCapacityPolicy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import { Result } from "../types/fp.js";
* Create a capacity policy
*
* @remarks
* Create a capacity policy in a workspace. Enterprise private beta feature. [Management key](/docs/guides/overview/auth/management-api-keys) required.
* Create a capacity policy in a workspace. Enterprise private beta feature: organizations without access receive 403. [Management key](/docs/guides/overview/auth/management-api-keys) required.
*/
export function guardrailPoliciesCreateCapacityPolicy(
client: OpenRouterCore,
Expand Down
2 changes: 1 addition & 1 deletion src/funcs/guardrailPoliciesDeleteCapacityPolicy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import { Result } from "../types/fp.js";
* Delete a capacity policy
*
* @remarks
* Delete a capacity policy. Enterprise private beta feature. [Management key](/docs/guides/overview/auth/management-api-keys) required.
* Delete a capacity policy. Enterprise private beta feature: organizations without access receive 403. [Management key](/docs/guides/overview/auth/management-api-keys) required.
*/
export function guardrailPoliciesDeleteCapacityPolicy(
client: OpenRouterCore,
Expand Down
2 changes: 1 addition & 1 deletion src/funcs/guardrailPoliciesGetCapacityPolicy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import { Result } from "../types/fp.js";
* Get a capacity policy
*
* @remarks
* Get a capacity policy with its member and API key assignments. Enterprise private beta feature. [Management key](/docs/guides/overview/auth/management-api-keys) required.
* Get a capacity policy with its member and API key assignments. Enterprise private beta feature: organizations without access receive 403. [Management key](/docs/guides/overview/auth/management-api-keys) required.
*/
export function guardrailPoliciesGetCapacityPolicy(
client: OpenRouterCore,
Expand Down
2 changes: 1 addition & 1 deletion src/funcs/guardrailPoliciesListCapacityPolicies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import {
* List capacity policies
*
* @remarks
* List the capacity policies in a workspace. Enterprise private beta feature. [Management key](/docs/guides/overview/auth/management-api-keys) required.
* List the capacity policies in a workspace. Enterprise private beta feature: organizations without access receive 403. [Management key](/docs/guides/overview/auth/management-api-keys) required.
*/
export function guardrailPoliciesListCapacityPolicies(
client: OpenRouterCore,
Expand Down
2 changes: 1 addition & 1 deletion src/funcs/guardrailPoliciesUpdateCapacityPolicy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import { Result } from "../types/fp.js";
* Update a capacity policy
*
* @remarks
* Replace a capacity policy's name and config, and optionally its assignments. Enterprise private beta feature. [Management key](/docs/guides/overview/auth/management-api-keys) required.
* Replace a capacity policy's name and config, and optionally its assignments. Enterprise private beta feature: organizations without access receive 403. [Management key](/docs/guides/overview/auth/management-api-keys) required.
*/
export function guardrailPoliciesUpdateCapacityPolicy(
client: OpenRouterCore,
Expand Down
4 changes: 2 additions & 2 deletions src/lib/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
export const SDK_METADATA = {
language: "typescript",
openapiDocVersion: "1.0.0",
sdkVersion: "1.5.181",
sdkVersion: "1.5.182",
genVersion: "2.960.8",
userAgent: "speakeasy-sdk/typescript 1.5.181 2.960.8 1.0.0 @openrouter/sdk",
userAgent: "speakeasy-sdk/typescript 1.5.182 2.960.8 1.0.0 @openrouter/sdk",
} as const;
10 changes: 5 additions & 5 deletions src/sdk/guardrailpolicies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ export class GuardrailPolicies extends ClientSDK {
* List capacity policies
*
* @remarks
* List the capacity policies in a workspace. Enterprise private beta feature. [Management key](/docs/guides/overview/auth/management-api-keys) required.
* List the capacity policies in a workspace. Enterprise private beta feature: organizations without access receive 403. [Management key](/docs/guides/overview/auth/management-api-keys) required.
*/
async listCapacityPolicies(
request: operations.ListCapacityPoliciesRequest,
Expand All @@ -375,7 +375,7 @@ export class GuardrailPolicies extends ClientSDK {
* Create a capacity policy
*
* @remarks
* Create a capacity policy in a workspace. Enterprise private beta feature. [Management key](/docs/guides/overview/auth/management-api-keys) required.
* Create a capacity policy in a workspace. Enterprise private beta feature: organizations without access receive 403. [Management key](/docs/guides/overview/auth/management-api-keys) required.
*/
async createCapacityPolicy(
request: operations.CreateCapacityPolicyRequest,
Expand All @@ -392,7 +392,7 @@ export class GuardrailPolicies extends ClientSDK {
* Delete a capacity policy
*
* @remarks
* Delete a capacity policy. Enterprise private beta feature. [Management key](/docs/guides/overview/auth/management-api-keys) required.
* Delete a capacity policy. Enterprise private beta feature: organizations without access receive 403. [Management key](/docs/guides/overview/auth/management-api-keys) required.
*/
async deleteCapacityPolicy(
request: operations.DeleteCapacityPolicyRequest,
Expand All @@ -409,7 +409,7 @@ export class GuardrailPolicies extends ClientSDK {
* Get a capacity policy
*
* @remarks
* Get a capacity policy with its member and API key assignments. Enterprise private beta feature. [Management key](/docs/guides/overview/auth/management-api-keys) required.
* Get a capacity policy with its member and API key assignments. Enterprise private beta feature: organizations without access receive 403. [Management key](/docs/guides/overview/auth/management-api-keys) required.
*/
async getCapacityPolicy(
request: operations.GetCapacityPolicyRequest,
Expand All @@ -426,7 +426,7 @@ export class GuardrailPolicies extends ClientSDK {
* Update a capacity policy
*
* @remarks
* Replace a capacity policy's name and config, and optionally its assignments. Enterprise private beta feature. [Management key](/docs/guides/overview/auth/management-api-keys) required.
* Replace a capacity policy's name and config, and optionally its assignments. Enterprise private beta feature: organizations without access receive 403. [Management key](/docs/guides/overview/auth/management-api-keys) required.
*/
async updateCapacityPolicy(
request: operations.UpdateCapacityPolicyRequest,
Expand Down