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: 4 additions & 3 deletions .speakeasy/gen.lock
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
lockVersion: ""
id: ""
management:
docChecksum: 8ef536ba144983515d83bf1becc5f388
docChecksum: 1840e64a57dcda1a2741b1a44d3bd29d
docVersion: 1.0.0
speakeasyVersion: 1.808.1
generationVersion: 2.960.8
releaseVersion: 1.5.183
configChecksum: 2694ce61d7787635a391a418408d2ccd
releaseVersion: 1.5.184
configChecksum: da41b44feff48feb9cb97f586de8478a
repoURL: https://github.com/OpenRouterTeam/typescript-sdk.git
installationURL: https://github.com/OpenRouterTeam/typescript-sdk
published: true
Expand Down Expand Up @@ -24226,3 +24226,4 @@ examples:
"500":
application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
examplesVersion: 1.0.2
releaseNotes: "## Typescript SDK Changes:\n* `openrouter.apiKeys.create()`: \n * `request.requestBody.external.apiKey` **Removed** (Breaking ⚠️)\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.183
version: 1.5.184
acceptHeaderEnum: false
additionalDependencies:
dependencies:
Expand Down
5 changes: 0 additions & 5 deletions .speakeasy/out.openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56575,11 +56575,6 @@ paths:
external:
description: 'Optional partner-defined identity associated with the created API key.'
properties:
api_key:
description: 'Optional partner-supplied API key with a minimum length of 32 characters and sufficient entropy. Stored as a SHA-256 hash and never returned.'
maxLength: 512
minLength: 32
type: 'string'
user:
description: 'Partner''s external user identifier for attribution: 1 to 512 characters after surrounding whitespace is trimmed, well-formed Unicode, no NUL. For organization keys outside HIPAA workspaces, the value is registered as an external user if it does not exist yet, and the key is linked to it.'
example: 'partner-user-123'
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:c1a5c58cdb1ed6ce68fff9bcd37d2a112a85b9df66fbc97aa40ce4d8c7ce7599
sourceBlobDigest: sha256:3c997969537a8247e910ec3214c5b714123c0f8038c9400f520d2b7030b72e5b
sourceRevisionDigest: sha256:43ce9ec685fba9b65f3336dc7d45a7f9aeb5ee3fd592d78406bc5d66f893ed89
sourceBlobDigest: sha256:6df9a503cb88ebfa6b4c1e8082717fdae8893ec6ded844b3c3fffd8b82d19f83
tags:
- latest
- 1.0.0
targets:
openrouter:
source: OpenRouter API
sourceNamespace: open-router-chat-completions-api
sourceRevisionDigest: sha256:c1a5c58cdb1ed6ce68fff9bcd37d2a112a85b9df66fbc97aa40ce4d8c7ce7599
sourceBlobDigest: sha256:3c997969537a8247e910ec3214c5b714123c0f8038c9400f520d2b7030b72e5b
sourceRevisionDigest: sha256:43ce9ec685fba9b65f3336dc7d45a7f9aeb5ee3fd592d78406bc5d66f893ed89
sourceBlobDigest: sha256:6df9a503cb88ebfa6b4c1e8082717fdae8893ec6ded844b3c3fffd8b82d19f83
codeSamplesNamespace: open-router-chat-completions-api-typescript-code-samples
codeSamplesRevisionDigest: sha256:bb825c1886869633ff52e2517ee514d06502f40394a9fbe67a52fcda90a090c3
codeSamplesRevisionDigest: sha256:d90da3074e68904394c5dd2e789f4eb005575b192d57d47129059ea758c888e3
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 @@ -6206,4 +6206,14 @@ Based on:
### Generated
- [typescript v1.5.183] .
### Releases
- [NPM v1.5.183] https://www.npmjs.com/package/@openrouter/sdk/v/1.5.183 - .
- [NPM v1.5.183] https://www.npmjs.com/package/@openrouter/sdk/v/1.5.183 - .

## 2026-12-05 20:19:52
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.808.1 (2.960.8) https://github.com/speakeasy-api/speakeasy
### Generated
- [typescript v1.5.184] .
### Releases
- [NPM v1.5.184] https://www.npmjs.com/package/@openrouter/sdk/v/1.5.184 - .
1 change: 0 additions & 1 deletion docs/models/operations/external.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,4 @@ let value: External = {

| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `apiKey` | *string* | ➖ | Optional partner-supplied API key with a minimum length of 32 characters and sufficient entropy. Stored as a SHA-256 hash and never returned. | |
| `user` | *string* | ✔️ | Partner's external user identifier for attribution: 1 to 512 characters after surrounding whitespace is trimmed, well-formed Unicode, no NUL. For organization keys outside HIPAA workspaces, the value is registered as an external user if it does not exist yet, and the key is linked to it. | partner-user-123 |
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.183",
"version": "1.5.184",
"exports": {
".": "./src/index.ts",
"./models/errors": "./src/models/errors/index.ts",
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@openrouter/sdk",
"version": "1.5.183",
"version": "1.5.184",
"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",
"postinstall": "node scripts/check-types.js || true",
"typecheck": "tsc --noEmit",
"typecheck:transit": "exit 0",
"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",
"typecheck:transit": "exit 0"
"postinstall": "node scripts/check-types.js || true",
"test": "vitest --run --project unit"
},
"peerDependencies": {

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.183",
sdkVersion: "1.5.184",
genVersion: "2.960.8",
userAgent: "speakeasy-sdk/typescript 1.5.183 2.960.8 1.0.0 @openrouter/sdk",
userAgent: "speakeasy-sdk/typescript 1.5.184 2.960.8 1.0.0 @openrouter/sdk",
} as const;
10 changes: 0 additions & 10 deletions src/models/operations/createkeys.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,6 @@ export type CreateKeysGlobals = {
* Optional partner-defined identity associated with the created API key.
*/
export type External = {
/**
* Optional partner-supplied API key with a minimum length of 32 characters and sufficient entropy. Stored as a SHA-256 hash and never returned.
*/
apiKey?: string | undefined;
/**
* Partner's external user identifier for attribution: 1 to 512 characters after surrounding whitespace is trimmed, well-formed Unicode, no NUL. For organization keys outside HIPAA workspaces, the value is registered as an external user if it does not exist yet, and the key is linked to it.
*/
Expand Down Expand Up @@ -255,19 +251,13 @@ export type CreateKeysResponse = {

/** @internal */
export type External$Outbound = {
api_key?: string | undefined;
user: string;
};

/** @internal */
export const External$outboundSchema: z.ZodType<External$Outbound, External> = z
.object({
apiKey: z.string().optional(),
user: z.string(),
}).transform((v) => {
return remap$(v, {
apiKey: "api_key",
});
});

export function externalToJSON(external: External): string {
Expand Down