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
37 changes: 18 additions & 19 deletions .speakeasy/gen.lock
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
lockVersion: ""
id: ""
management:
docChecksum: 45af7b3e49d22068a9b5c14773e0eefa
docChecksum: 9f415db172fd07317d38b669e875e5a6
docVersion: 1.0.0
speakeasyVersion: 1.787.0
generationVersion: 2.914.0
releaseVersion: 1.2.9
configChecksum: d1771fa6599bcb5fbf3b0c9b8315f499
releaseVersion: 1.2.10
configChecksum: 9a96ea3a4e1657aaddd668a3c00fec85
repoURL: https://github.com/OpenRouterTeam/typescript-sdk.git
installationURL: https://github.com/OpenRouterTeam/typescript-sdk
published: true
persistentEdits:
generation_id: c4ca729d-2758-4728-939d-4820e353a315
pristine_commit_hash: 0d7a5d55c683ecab80be06d24158577935905530
pristine_tree_hash: e72481b141f5c66c04a11b828fd43385cde0acb3
generation_id: 6190b7ed-52d7-4539-b252-88b513d54c92
pristine_commit_hash: 7895894a7046875f54d8ab9a9362135ceed36e0e
pristine_tree_hash: e58b7a4e24ecff9ceeeff33d7b929a311c88fcc4
features:
typescript:
acceptHeaders: 2.81.2
Expand Down Expand Up @@ -12644,8 +12644,8 @@ trackedFiles:
deleted: true
docs/sdks/files/README.mdx:
id: 1a0c257e330c
last_write_checksum: sha1:8ec72894083760cb41ec37446024357bdfcec412
pristine_git_object: 874b6830fa8f2f7648f653eb53de985d236a93a0
last_write_checksum: sha1:4bd81a6f19fe8697d60870b4995a0d657963b665
pristine_git_object: 295c739e9fc60406ccfc6b2173ac3df04352cf54
docs/sdks/generations/README.mdx:
id: a754fecc8514
last_write_checksum: sha1:949d9261382b7b79e1e25a935f9c09ccca067842
Expand Down Expand Up @@ -12777,12 +12777,12 @@ trackedFiles:
pristine_git_object: 410efafd6a7f50d91ccb87131fedbe0c3d47e15a
jsr.json:
id: 7f6ab7767282
last_write_checksum: sha1:cbca9b0e682607be7c152589dbfc5612d543bf00
pristine_git_object: c8dddb01dc4ab4a016ca89f8d3bf5abc18a2a963
last_write_checksum: sha1:c9665ce1488521334a38ba8e388cc44516c12e07
pristine_git_object: 9f71d49038393f575b469cbc205e0be5201ebbe2
package.json:
id: 7030d0b2f71b
last_write_checksum: sha1:b9bd55dcc8fcb6da86281e6d7e4fc5865a87dee2
pristine_git_object: d90a54e316fabfaebc3ef0b15dd56e6cf09998b6
last_write_checksum: sha1:b381152ee1002e56590d63cff37635a7b008247c
pristine_git_object: 4761531675e689277bed4bdd79c87cb3c89b682b
src/core.ts:
id: f431fdbcd144
last_write_checksum: sha1:5aa66b0b6a5964f3eea7f3098c2eb3c0ee9c0131
Expand Down Expand Up @@ -12901,8 +12901,8 @@ trackedFiles:
pristine_git_object: 2537f833e41de10186a7afd74c0e855c33c83f70
src/funcs/filesUpload.ts:
id: 9dba8b973eea
last_write_checksum: sha1:f3cf5617f39083a86a67dbdd9e12ce9c60fa5835
pristine_git_object: bc906ced53e35c927ec892bbe3fc76efb8584af8
last_write_checksum: sha1:67cc4069988d4e2fbce3ce3dc3e89fcde88c1f10
pristine_git_object: 7ef73bab3ca62ff5b0152f617c77f6ff4570baf1
src/funcs/generationsGetGeneration.ts:
id: dac2d205a08d
last_write_checksum: sha1:df30787e54f6e48be96db656f8ad629a154f15bd
Expand Down Expand Up @@ -13189,8 +13189,8 @@ trackedFiles:
pristine_git_object: a187e58707bdb726ca2aff74941efe7493422d4e
src/lib/config.ts:
id: 320761608fb3
last_write_checksum: sha1:d2970d20efda6db14f7e2812490493ad5fa58313
pristine_git_object: fe89db14f2f1c4d22c5842f39864b601365ab0a1
last_write_checksum: sha1:fbf6c65fa701eee75b8cf81e2ff9d65368547dc5
pristine_git_object: eef8cea687e76e066aaea483947546afb340a689
src/lib/dlv.ts:
id: b1988214835a
last_write_checksum: sha1:eaac763b22717206a6199104e0403ed17a4e2711
Expand Down Expand Up @@ -16159,8 +16159,8 @@ trackedFiles:
pristine_git_object: 38d8efb3aecac60c7725f3472d87064630f58c8e
src/sdk/files.ts:
id: bb9172f41ecb
last_write_checksum: sha1:7ade6a2e79d1a44a3574361f31b272cd7ea97cb8
pristine_git_object: bb0b5d36adaf4c5f29bda45929e52d898e2d7d54
last_write_checksum: sha1:4a47f4c7367929db50d3d1837b2f2966990e03b8
pristine_git_object: 2fdfa89d2d3e4b589e3002aa247df62187421a9d
src/sdk/generations.ts:
id: e28b205da063
last_write_checksum: sha1:3a35ecb2d089eecca9d9375e4d1896150412c66f
Expand Down Expand Up @@ -18027,4 +18027,3 @@ examples:
"500":
application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
examplesVersion: 1.0.2
releaseNotes: "## Typescript SDK Changes:\n* `openrouter.beta.analytics.queryAnalytics()`: \n * `request.requestBody.filters[].includeUnset` **Added**\n* `openrouter.presets.createPresetsMessages()`: \n * `request.messagesRequest` **Changed**\n"
2 changes: 1 addition & 1 deletion .speakeasy/gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ generation:
documentation: mintlify
preApplyUnionDiscriminators: true
typescript:
version: 1.2.9
version: 1.2.10
acceptHeaderEnum: false
additionalDependencies:
dependencies:
Expand Down
2 changes: 1 addition & 1 deletion .speakeasy/out.openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28945,7 +28945,7 @@ paths:
results: '$.data'
type: 'cursor'
post:
description: 'Uploads a file to be referenced in future API calls. The file is stored under the workspace of the authenticating API key. Maximum file size: 100 MB.'
description: 'Uploads a file to be referenced in future API calls. The file is stored under the workspace of the authenticating API key. Maximum file size: 100 MB; empty files are rejected. The file type is determined from the file contents β€” not the filename or the declared content type β€” and must be a PDF, a PNG/JPEG/GIF/WebP image, a DOCX/XLSX/PPTX document, an MP3/WAV/FLAC/OGG audio file, or UTF-8 text. Text is reported by its structure as `application/json`, `application/x-ndjson`, `text/csv`, `text/markdown`, or `text/plain`.'
operationId: 'uploadFile'
parameters:
- description: 'Workspace to scope the request to. Defaults to the caller’s default workspace.'
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.787.0
sources:
OpenRouter API:
sourceNamespace: open-router-chat-completions-api
sourceRevisionDigest: sha256:8de9b79c678fe3773cadfc148394898e087979149886ef0f98442b8009151245
sourceBlobDigest: sha256:4b9b1cbd032979983399b8bf07841abff3e26ca8fe065bcd5bf78be44dab2c45
sourceRevisionDigest: sha256:b9b8e234ef0b7616d40cf891473ee7b1607e00a04a861d11a37b810baa2a2321
sourceBlobDigest: sha256:c53c14f29068b2852bb242f96f7fbe7019cac93c69ea4bc209f600afad119711
tags:
- latest
- 1.0.0
targets:
openrouter:
source: OpenRouter API
sourceNamespace: open-router-chat-completions-api
sourceRevisionDigest: sha256:8de9b79c678fe3773cadfc148394898e087979149886ef0f98442b8009151245
sourceBlobDigest: sha256:4b9b1cbd032979983399b8bf07841abff3e26ca8fe065bcd5bf78be44dab2c45
sourceRevisionDigest: sha256:b9b8e234ef0b7616d40cf891473ee7b1607e00a04a861d11a37b810baa2a2321
sourceBlobDigest: sha256:c53c14f29068b2852bb242f96f7fbe7019cac93c69ea4bc209f600afad119711
codeSamplesNamespace: open-router-chat-completions-api-typescript-code-samples
codeSamplesRevisionDigest: sha256:053d3a94b994d3536635f074ad3dde5195e0954bbe1a4be02a1e88093542316c
codeSamplesRevisionDigest: sha256:b0466e8bb5817bf51696388b9aa3668af6ecc6669d8ab29801f7406e61551370
workflow:
workflowVersion: 1.0.0
speakeasyVersion: 1.787.0
Expand Down
12 changes: 11 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2386,4 +2386,14 @@ Based on:
### Generated
- [typescript v1.2.9] .
### Releases
- [NPM v1.2.9] https://www.npmjs.com/package/@openrouter/sdk/v/1.2.9 - .
- [NPM v1.2.9] https://www.npmjs.com/package/@openrouter/sdk/v/1.2.9 - .

## 2026-08-05 15:18:35
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.787.0 (2.914.0) https://github.com/speakeasy-api/speakeasy
### Generated
- [typescript v1.2.10] .
### Releases
- [NPM v1.2.10] https://www.npmjs.com/package/@openrouter/sdk/v/1.2.10 - .
2 changes: 1 addition & 1 deletion docs/sdks/files/README.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ run();

## upload

Uploads a file to be referenced in future API calls. The file is stored under the workspace of the authenticating API key. Maximum file size: 100 MB.
Uploads a file to be referenced in future API calls. The file is stored under the workspace of the authenticating API key. Maximum file size: 100 MB; empty files are rejected. The file type is determined from the file contents β€” not the filename or the declared content type β€” and must be a PDF, a PNG/JPEG/GIF/WebP image, a DOCX/XLSX/PPTX document, an MP3/WAV/FLAC/OGG audio file, or UTF-8 text. Text is reported by its structure as `application/json`, `application/x-ndjson`, `text/csv`, `text/markdown`, or `text/plain`.

### 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.2.9",
"version": "1.2.10",
"exports": {
".": "./src/index.ts",
"./models/errors": "./src/models/errors/index.ts",
Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@openrouter/sdk",
"version": "1.2.9",
"version": "1.2.10",
"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": "tsc",
"prepublishOnly": "npm run build",
"postinstall": "node scripts/check-types.js || true",
"test:watch": "vitest --watch --project unit",
"typecheck:transit": "exit 0",
"compile": "tsc",
"prepare": "npm run build",
"test": "vitest --run --project unit",
"test:e2e": "vitest --run --project e2e",
"test:transit": "exit 0",
"typecheck": "tsc --noEmit"
"test:watch": "vitest --watch --project unit",
"typecheck": "tsc --noEmit",
"postinstall": "node scripts/check-types.js || true",
"prepare": "npm run build",
"test:transit": "exit 0"
},
"peerDependencies": {},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion src/funcs/filesUpload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ import { isReadableStream } from "../types/streams.js";
* Upload a file
*
* @remarks
* Uploads a file to be referenced in future API calls. The file is stored under the workspace of the authenticating API key. Maximum file size: 100 MB.
* Uploads a file to be referenced in future API calls. The file is stored under the workspace of the authenticating API key. Maximum file size: 100 MB; empty files are rejected. The file type is determined from the file contents β€” not the filename or the declared content type β€” and must be a PDF, a PNG/JPEG/GIF/WebP image, a DOCX/XLSX/PPTX document, an MP3/WAV/FLAC/OGG audio file, or UTF-8 text. Text is reported by its structure as `application/json`, `application/x-ndjson`, `text/csv`, `text/markdown`, or `text/plain`.
*/
export function filesUpload(
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 @@ -75,7 +75,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
export const SDK_METADATA = {
language: "typescript",
openapiDocVersion: "1.0.0",
sdkVersion: "1.2.9",
sdkVersion: "1.2.10",
genVersion: "2.914.0",
userAgent: "speakeasy-sdk/typescript 1.2.9 2.914.0 1.0.0 @openrouter/sdk",
userAgent: "speakeasy-sdk/typescript 1.2.10 2.914.0 1.0.0 @openrouter/sdk",
} as const;
2 changes: 1 addition & 1 deletion src/sdk/files.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export class Files extends ClientSDK {
* Upload a file
*
* @remarks
* Uploads a file to be referenced in future API calls. The file is stored under the workspace of the authenticating API key. Maximum file size: 100 MB.
* Uploads a file to be referenced in future API calls. The file is stored under the workspace of the authenticating API key. Maximum file size: 100 MB; empty files are rejected. The file type is determined from the file contents β€” not the filename or the declared content type β€” and must be a PDF, a PNG/JPEG/GIF/WebP image, a DOCX/XLSX/PPTX document, an MP3/WAV/FLAC/OGG audio file, or UTF-8 text. Text is reported by its structure as `application/json`, `application/x-ndjson`, `text/csv`, `text/markdown`, or `text/plain`.
*/
async upload(
request: operations.UploadFileRequest,
Expand Down
Loading