diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index e5cbfd7b7..860268ec8 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,19 +1,19 @@ lockVersion: "" id: "" management: - docChecksum: cd0654dfe0e5f9616494a6b7bcf34624 + docChecksum: 544f51110e99d7005f82f3949f348ea0 docVersion: 1.0.0 speakeasyVersion: 1.787.0 generationVersion: 2.914.0 - releaseVersion: 1.3.27 - configChecksum: 7933506f3867e131fd87333eb4ab270a + releaseVersion: 1.3.28 + configChecksum: 4c6f8f74944865d2ac7f5c55657dbad9 repoURL: https://github.com/OpenRouterTeam/typescript-sdk.git installationURL: https://github.com/OpenRouterTeam/typescript-sdk published: true persistentEdits: - generation_id: 6f329a62-71ac-4089-99e0-2f0d2685213b - pristine_commit_hash: 4e0d32aa3d789936c70f992e27f5c0eb7eb049c1 - pristine_tree_hash: 0b084d629e0814069ed37e2de2701256d69c1ec8 + generation_id: febd10d5-46be-4c46-bda0-7e0520512880 + pristine_commit_hash: 9ac2ef016574a0560d500d75aa4b822613cd4726 + pristine_tree_hash: e251c7d6ab3e285aa3ce6742c55f8e92411289e6 features: typescript: acceptHeaders: 2.81.2 @@ -13730,8 +13730,8 @@ trackedFiles: pristine_git_object: 15b7b4c80d50dd3aa0f7adc3ab4d9fb03a8efaa7 docs/sdks/interns/README.mdx: id: 2f8a053ffe78 - last_write_checksum: sha1:c1e818b8d48d82e01095701a36b8f1992aa16f66 - pristine_git_object: 4f026d8da9f57f5edd819600e36a3cada0ecc085 + last_write_checksum: sha1:6ef3ea672e9714b6c2322363bfd709e0a77c7173 + pristine_git_object: f4b2e62439d54bfd714187eb0fe0c25e44d0b81f docs/sdks/models/README.mdx: id: 58f1ca464e0b last_write_checksum: sha1:dbae6f74244ab3e9fe38e075ab67f926f33ef87d @@ -13858,12 +13858,12 @@ trackedFiles: pristine_git_object: 410efafd6a7f50d91ccb87131fedbe0c3d47e15a jsr.json: id: 7f6ab7767282 - last_write_checksum: sha1:1ccce89f5da3d9ae9fc20e2504e149e6c90e3877 - pristine_git_object: c982d59312e87ddcef547bfbce9a07453534ab59 + last_write_checksum: sha1:a84b98446306e53f9f04431a32aafc1a7f19190d + pristine_git_object: b7cb50b39134ce807bbed9e1a9211fd179d1f510 package.json: id: 7030d0b2f71b - last_write_checksum: sha1:78b8e600ce5b1b4d5a0ee3e330ec9d91a9be6a40 - pristine_git_object: 5d3032003d5ab785f351f0260f0d82e05796b12f + last_write_checksum: sha1:feb9f09cd3ac7157f87970a12d120f26be1f214a + pristine_git_object: bb04a9b024f58dddfefd11b0ea188635195bb63f src/core.ts: id: f431fdbcd144 last_write_checksum: sha1:5aa66b0b6a5964f3eea7f3098c2eb3c0ee9c0131 @@ -14102,8 +14102,8 @@ trackedFiles: pristine_git_object: 84985cfee5e79c648083370d42e07563d54f8fd2 src/funcs/internsGetInternDaemonAccess.ts: id: 464f7f69e2f0 - last_write_checksum: sha1:fd0d117dc329ee0d8fd531b9b5638add781b9b53 - pristine_git_object: 54d97bd84a956c36ea35ebfb7eebcfefcc6a7ef5 + last_write_checksum: sha1:eacd878c100320dfd02e4bf10e54b3c06819c17b + pristine_git_object: 64de9e8c5741500aeec8ae130193cd328768cbdb src/funcs/internsInvoke.ts: id: d0be40cd89cf last_write_checksum: sha1:e7e5db94633812351a50eca92befa7aa032e49a7 @@ -14382,8 +14382,8 @@ trackedFiles: pristine_git_object: a187e58707bdb726ca2aff74941efe7493422d4e src/lib/config.ts: id: 320761608fb3 - last_write_checksum: sha1:3e7561927e788c21cc9df69d97633da26d68826a - pristine_git_object: c4d8e875a3506521cc1265847b4674668b2cf4bd + last_write_checksum: sha1:fc29463433712de9fe0c8a9fe00e66790503ecd4 + pristine_git_object: 23b5c39678dda1a2fbc4fdad617bbe7cea24d858 src/lib/dlv.ts: id: b1988214835a last_write_checksum: sha1:eaac763b22717206a6199104e0403ed17a4e2711 @@ -17912,8 +17912,8 @@ trackedFiles: pristine_git_object: 5c82fe389f888827f98aa52788b850ef43422e07 src/sdk/interns.ts: id: fc3b4e6c5008 - last_write_checksum: sha1:6a8aa9f7d2c69a56699c16a7b3c22e4dfaf5d3b7 - pristine_git_object: 9ee4f78cbaf6b1dc7cb2de86bf84081cd0f1c7fa + last_write_checksum: sha1:7e3e9c6ef2130e371246014753382b6b5531d237 + pristine_git_object: 4bc027afb4919a5c3debd28c467e6ae38009ffa4 src/sdk/models.ts: id: 8c761ab180fd last_write_checksum: sha1:0c5e5cefb7079fc69eb11ef157af6d2cb5255933 @@ -21298,4 +21298,6 @@ examples: "500": application/json: {"error": {"code": 404, "message": "Intern not found"}} examplesVersion: 1.0.2 -releaseNotes: "## Typescript SDK Changes:\n* `openrouter.alpha.decisions.create()`: \n * `request.decisionsRequest.provider` **Changed**\n* `openrouter.tts.createSpeech()`: \n * `request.speechRequest.provider.options.scaledown` **Added**\n* `openrouter.stt.createTranscription()`: \n * `request.sttRequest.provider.options.scaledown` **Added**\n* `openrouter.byok.list()`: \n * `request.provider` **Changed**\n * `response.data[].provider.enum(scaledown)` **Added**\n* `openrouter.byok.create()`: \n * `request.createByokKeyRequest.provider.enum(scaledown)` **Added**\n * `response.data.provider.enum(scaledown)` **Added**\n* `openrouter.byok.get()`: `response.data.provider.enum(scaledown)` **Added**\n* `openrouter.byok.update()`: `response.data.provider.enum(scaledown)` **Added**\n* `openrouter.chat.send()`: \n * `request.chatRequest.provider` **Changed**\n* `openrouter.embeddings.generate()`: \n * `request.requestBody.provider` **Changed**\n* `openrouter.endpoints.listZdrEndpoints()`: `response.data[].providerName.enum(scaleDown)` **Added**\n* `openrouter.endpoints.list()`: `response.data.endpoints[].providerName.enum(scaleDown)` **Added**\n* `openrouter.generations.getGeneration()`: `response.data.providerResponses[].providerName.enum(scaleDown)` **Added**\n* `openrouter.images.generate()`: \n * `request.imageGenerationRequest.provider` **Changed**\n* `openrouter.presets.createPresetsChatCompletions()`: \n * `request.chatRequest.provider` **Changed**\n* `openrouter.presets.createPresetsMessages()`: \n * `request.messagesRequest.provider` **Changed**\n* `openrouter.presets.createPresetsResponses()`: \n * `request.responsesRequest.provider` **Changed**\n* `openrouter.rerank.rerank()`: \n * `request.requestBody.provider` **Changed**\n* `openrouter.responses.send()`: \n * `request.responsesRequest.provider` **Changed**\n* `openrouter.beta.responses.send()`: \n * `request.responsesRequest.provider` **Changed**\n* `openrouter.systemOne.create()`: \n * `request.decisionsRequest.provider` **Changed**\n* `openrouter.videoGeneration.generate()`: \n * `request.videoGenerationRequest.provider.options.scaledown` **Added**\n" +releaseNotes: | + ## Typescript SDK Changes: + * `openrouter.interns.getInternDaemonAccess()`: `error.status[429]` **Removed** (Breaking ⚠️) diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 4f4737ded..e6e9327d3 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -37,7 +37,7 @@ generation: documentation: mintlify preApplyUnionDiscriminators: true typescript: - version: 1.3.27 + version: 1.3.28 acceptHeaderEnum: false additionalDependencies: dependencies: diff --git a/.speakeasy/out.openapi.yaml b/.speakeasy/out.openapi.yaml index 425ec7b64..df3c9168f 100644 --- a/.speakeasy/out.openapi.yaml +++ b/.speakeasy/out.openapi.yaml @@ -37820,7 +37820,7 @@ paths: - $ref: "#/components/parameters/AppCategories" /interns/{internId}/daemon-access: get: - description: 'Returns the origin and daemon token that attach `ori tui --host` to one visible, running intern. The token is a credential: the response is sent with `Cache-Control: no-store`, each reveal is logged by caller and intern, and a caller may make 10 reveals per minute. The API key selects the caller, workspace and visible interns. There is no default workspace fallback. Requests on regional hostnames such as `eu.openrouter.ai` are refused. [API key](/docs/api-reference/authentication) required.' + description: 'Returns the origin and daemon token that attach `ori tui --host` to one visible, running intern. The token is a credential: the response is sent with `Cache-Control: no-store`, and each reveal is logged by caller and intern. The API key selects the caller, workspace and visible interns. There is no default workspace fallback. Requests on regional hostnames such as `eu.openrouter.ai` are refused. [API key](/docs/api-reference/authentication) required.' operationId: 'getInternDaemonAccess' parameters: - description: 'ID of an intern visible to the authenticated API key.' @@ -37898,19 +37898,6 @@ paths: schema: $ref: '#/components/schemas/InternLifecycleError' description: 'The intern cannot be attached to. `metadata.reason` is `intern_not_running`, `intern_unreachable` when it has no usable address yet, or `intern_needs_restart` when it was provisioned before daemon access was available.' - '429': - content: - application/json: - example: - error: - code: 429 - message: 'Too many token reveals. Please wait a moment.' - metadata: - reason: 'rate_limited' - retryable: true - schema: - $ref: '#/components/schemas/InternLifecycleError' - description: 'The caller made more than 10 reveals in the last minute. Wait for `Retry-After` seconds.' '500': content: application/json: diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index d6818ea9b..4c94de7a8 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -2,8 +2,8 @@ speakeasyVersion: 1.787.0 sources: OpenRouter API: sourceNamespace: open-router-chat-completions-api - sourceRevisionDigest: sha256:0814f4b1310a336e91ca20980cc5e741a77c00eb25bff16150e14addf122f3d6 - sourceBlobDigest: sha256:6b09fe5ea9d404e54bece1136a8bb8410fb46251bebf247462909a6ebb4a4833 + sourceRevisionDigest: sha256:acf5334f900397f46c8f6f0210ea9aae862a9477e6cd1917fe7a80ad67b9d979 + sourceBlobDigest: sha256:51a6ce7d852942fda55e59d75e5375a622741e93d33e291514f616fbfa926014 tags: - latest - 1.0.0 @@ -11,10 +11,10 @@ targets: openrouter: source: OpenRouter API sourceNamespace: open-router-chat-completions-api - sourceRevisionDigest: sha256:0814f4b1310a336e91ca20980cc5e741a77c00eb25bff16150e14addf122f3d6 - sourceBlobDigest: sha256:6b09fe5ea9d404e54bece1136a8bb8410fb46251bebf247462909a6ebb4a4833 + sourceRevisionDigest: sha256:acf5334f900397f46c8f6f0210ea9aae862a9477e6cd1917fe7a80ad67b9d979 + sourceBlobDigest: sha256:51a6ce7d852942fda55e59d75e5375a622741e93d33e291514f616fbfa926014 codeSamplesNamespace: open-router-chat-completions-api-typescript-code-samples - codeSamplesRevisionDigest: sha256:a0cd9e93d123b092a2acbf4d734179b8abaf24b04530cedd3176286b7854e203 + codeSamplesRevisionDigest: sha256:9a9678c75ff4d97352ae552d1fa8828dd3ff0f7e120f3f0aed76610532ec5210 workflow: workflowVersion: 1.0.0 speakeasyVersion: 1.787.0 diff --git a/RELEASES.md b/RELEASES.md index b06af6254..9f689e93a 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -4056,4 +4056,14 @@ Based on: ### Generated - [typescript v1.3.27] . ### Releases -- [NPM v1.3.27] https://www.npmjs.com/package/@openrouter/sdk/v/1.3.27 - . \ No newline at end of file +- [NPM v1.3.27] https://www.npmjs.com/package/@openrouter/sdk/v/1.3.27 - . + +## 2026-09-25 10:14:33 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.787.0 (2.914.0) https://github.com/speakeasy-api/speakeasy +### Generated +- [typescript v1.3.28] . +### Releases +- [NPM v1.3.28] https://www.npmjs.com/package/@openrouter/sdk/v/1.3.28 - . \ No newline at end of file diff --git a/docs/sdks/interns/README.mdx b/docs/sdks/interns/README.mdx index 4f026d8da..f4b2e6243 100644 --- a/docs/sdks/interns/README.mdx +++ b/docs/sdks/interns/README.mdx @@ -440,7 +440,7 @@ run(); ## getInternDaemonAccess -Returns the origin and daemon token that attach `ori tui --host` to one visible, running intern. The token is a credential: the response is sent with `Cache-Control: no-store`, each reveal is logged by caller and intern, and a caller may make 10 reveals per minute. The API key selects the caller, workspace and visible interns. There is no default workspace fallback. Requests on regional hostnames such as `eu.openrouter.ai` are refused. [API key](/docs/api-reference/authentication) required. +Returns the origin and daemon token that attach `ori tui --host` to one visible, running intern. The token is a credential: the response is sent with `Cache-Control: no-store`, and each reveal is logged by caller and intern. The API key selects the caller, workspace and visible interns. There is no default workspace fallback. Requests on regional hostnames such as `eu.openrouter.ai` are refused. [API key](/docs/api-reference/authentication) required. ### Example Usage @@ -514,7 +514,7 @@ run(); | Error Type | Status Code | Content Type | | ----------------------------- | ----------------------------- | ----------------------------- | -| errors.InternLifecycleError | 401, 403, 404, 408, 409, 429 | application/json | +| errors.InternLifecycleError | 401, 403, 404, 408, 409 | application/json | | errors.InternLifecycleError | 500 | application/json | | errors.OpenRouterDefaultError | 4XX, 5XX | \*/\* | diff --git a/jsr.json b/jsr.json index c982d5931..b7cb50b39 100644 --- a/jsr.json +++ b/jsr.json @@ -2,7 +2,7 @@ { "name": "@openrouter/sdk", - "version": "1.3.27", + "version": "1.3.28", "exports": { ".": "./src/index.ts", "./models/errors": "./src/models/errors/index.ts", diff --git a/package.json b/package.json index 5d3032003..bb04a9b02 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@openrouter/sdk", - "version": "1.3.27", + "version": "1.3.28", "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,15 +73,15 @@ "lint": "eslint --cache --max-warnings=0 src", "build": "tsc && node scripts/unbarrel-imports.js", "prepublishOnly": "npm run build", - "compile": "tsc && node scripts/unbarrel-imports.js", - "postinstall": "node scripts/check-types.js || true", "prepare": "npm run build", "test": "vitest --run --project unit", "test:e2e": "vitest --run --project e2e", + "typecheck:transit": "exit 0", + "compile": "tsc && node scripts/unbarrel-imports.js", + "postinstall": "node scripts/check-types.js || true", "test:transit": "exit 0", "test:watch": "vitest --watch --project unit", - "typecheck": "tsc --noEmit", - "typecheck:transit": "exit 0" + "typecheck": "tsc --noEmit" }, "peerDependencies": { diff --git a/src/funcs/internsGetInternDaemonAccess.ts b/src/funcs/internsGetInternDaemonAccess.ts index 54d97bd84..64de9e8c5 100644 --- a/src/funcs/internsGetInternDaemonAccess.ts +++ b/src/funcs/internsGetInternDaemonAccess.ts @@ -32,7 +32,7 @@ import { Result } from "../types/fp.js"; * Get an intern's daemon access * * @remarks - * Returns the origin and daemon token that attach `ori tui --host` to one visible, running intern. The token is a credential: the response is sent with `Cache-Control: no-store`, each reveal is logged by caller and intern, and a caller may make 10 reveals per minute. The API key selects the caller, workspace and visible interns. There is no default workspace fallback. Requests on regional hostnames such as `eu.openrouter.ai` are refused. [API key](/docs/api-reference/authentication) required. + * Returns the origin and daemon token that attach `ori tui --host` to one visible, running intern. The token is a credential: the response is sent with `Cache-Control: no-store`, and each reveal is logged by caller and intern. The API key selects the caller, workspace and visible interns. There is no default workspace fallback. Requests on regional hostnames such as `eu.openrouter.ai` are refused. [API key](/docs/api-reference/authentication) required. * * If set, this operation will use {@link Security.apiKey} from the global security. */ @@ -195,7 +195,7 @@ async function $do( >( M.json(200, models.InternDaemonAccess$inboundSchema), M.jsonErr( - [401, 403, 404, 408, 409, 429], + [401, 403, 404, 408, 409], errors.InternLifecycleError$inboundSchema, ), M.jsonErr(500, errors.InternLifecycleError$inboundSchema), diff --git a/src/lib/config.ts b/src/lib/config.ts index a64520e45..cdcf32967 100644 --- a/src/lib/config.ts +++ b/src/lib/config.ts @@ -79,7 +79,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null { export const SDK_METADATA = { language: "typescript", openapiDocVersion: "1.0.0", - sdkVersion: "1.3.27", + sdkVersion: "1.3.28", genVersion: "2.914.0", - userAgent: "speakeasy-sdk/typescript 1.3.27 2.914.0 1.0.0 @openrouter/sdk", + userAgent: "speakeasy-sdk/typescript 1.3.28 2.914.0 1.0.0 @openrouter/sdk", } as const; diff --git a/src/sdk/interns.ts b/src/sdk/interns.ts index 9ee4f78cb..4bc027afb 100644 --- a/src/sdk/interns.ts +++ b/src/sdk/interns.ts @@ -108,7 +108,7 @@ export class Interns extends ClientSDK { * Get an intern's daemon access * * @remarks - * Returns the origin and daemon token that attach `ori tui --host` to one visible, running intern. The token is a credential: the response is sent with `Cache-Control: no-store`, each reveal is logged by caller and intern, and a caller may make 10 reveals per minute. The API key selects the caller, workspace and visible interns. There is no default workspace fallback. Requests on regional hostnames such as `eu.openrouter.ai` are refused. [API key](/docs/api-reference/authentication) required. + * Returns the origin and daemon token that attach `ori tui --host` to one visible, running intern. The token is a credential: the response is sent with `Cache-Control: no-store`, and each reveal is logged by caller and intern. The API key selects the caller, workspace and visible interns. There is no default workspace fallback. Requests on regional hostnames such as `eu.openrouter.ai` are refused. [API key](/docs/api-reference/authentication) required. */ async getInternDaemonAccess( request: operations.GetInternDaemonAccessRequest,