Skip to content

Commit 043d81e

Browse files
committed
## Typescript SDK Changes Detected:
* `openrouter.apiKeys.list()`: * `response.status[default]` **Removed** **Breaking** ⚠️ * `error` **Changed** * `openrouter.apiKeys.create()`: * `response.status[default]` **Removed** **Breaking** ⚠️ * `error` **Changed** * `openrouter.apiKeys.getCurrentKeyMetadata()`: * `response.status[default]` **Removed** **Breaking** ⚠️ * `error` **Changed** * `openrouter.apiKeys.get()`: * `response.status[default]` **Removed** **Breaking** ⚠️ * `error` **Changed** * `openrouter.apiKeys.delete()`: * `response.status[default]` **Removed** **Breaking** ⚠️ * `error` **Changed** * `openrouter.apiKeys.update()`: * `response.status[default]` **Removed** **Breaking** ⚠️ * `error` **Changed** * `openrouter.analytics.getUserActivity()`: * `response.status[default]` **Removed** **Breaking** ⚠️ * `error` **Changed** * `openrouter.credits.getCredits()`: * `response.status[default]` **Removed** **Breaking** ⚠️ * `error` **Changed** * `openrouter.credits.createCoinbaseCharge()`: * `response.status[default]` **Removed** **Breaking** ⚠️ * `error` **Changed** * `openrouter.endpoints.list()`: * `response.status[default]` **Removed** **Breaking** ⚠️ * `error` **Changed** * `openrouter.generations.getGeneration()`: * `response.status[default]` **Removed** **Breaking** ⚠️ * `error` **Changed** * `openrouter.parameters.getParameters()`: * `response.status[default]` **Removed** **Breaking** ⚠️ * `error` **Changed** * `openrouter.models.count()`: **Added** * `openrouter.models.list()`: **Added** * `openrouter.models.listModelsUser()`: **Deleted** **Breaking** ⚠️ * `openrouter.models.getModels()`: **Deleted** **Breaking** ⚠️ * `openrouter.models.listModelsCount()`: **Deleted** **Breaking** ⚠️ * `openrouter.models.listForUser()`: **Added**
1 parent 87ba23b commit 043d81e

File tree

76 files changed

+823
-1805
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+823
-1805
lines changed

.speakeasy/gen.lock

Lines changed: 51 additions & 30 deletions
Large diffs are not rendered by default.

.speakeasy/gen.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ generation:
2929
generateNewTests: true
3030
skipResponseBodyAssertions: false
3131
typescript:
32-
version: 0.0.1-beta.00
32+
version: 0.0.1-beta.1
3333
acceptHeaderEnum: false
3434
additionalDependencies:
3535
dependencies: {}

.speakeasy/out.openapi.yaml

Lines changed: 97 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -4898,7 +4898,13 @@ paths:
48984898
prompt_tokens: 50
48994899
completion_tokens: 125
49004900
reasoning_tokens: 25
4901-
default:
4901+
4XX:
4902+
description: Error Response
4903+
content:
4904+
application/json:
4905+
schema:
4906+
$ref: '#/components/schemas/ErrorResponse'
4907+
5XX:
49024908
description: Error Response
49034909
content:
49044910
application/json:
@@ -4943,8 +4949,14 @@ paths:
49434949
data:
49444950
total_credits: 100.5
49454951
total_usage: 25.75
4946-
default:
4947-
description: Internal server error
4952+
4XX:
4953+
description: Error Response
4954+
content:
4955+
application/json:
4956+
schema:
4957+
$ref: '#/components/schemas/ErrorResponse'
4958+
5XX:
4959+
description: Error Response
49484960
content:
49494961
application/json:
49504962
schema:
@@ -5062,7 +5074,13 @@ paths:
50625074
- web3_data
50635075
required:
50645076
- data
5065-
default:
5077+
4XX:
5078+
description: Error
5079+
content:
5080+
application/json:
5081+
schema:
5082+
$ref: '#/components/schemas/ErrorResponse'
5083+
5XX:
50665084
description: Error
50675085
content:
50685086
application/json:
@@ -5284,8 +5302,14 @@ paths:
52845302
required:
52855303
- data
52865304
description: Generation response
5287-
default:
5288-
description: Error
5305+
4XX:
5306+
description: Error Response
5307+
content:
5308+
application/json:
5309+
schema:
5310+
$ref: '#/components/schemas/ErrorResponse'
5311+
5XX:
5312+
description: Error Response
52895313
content:
52905314
application/json:
52915315
schema:
@@ -5295,6 +5319,7 @@ paths:
52955319
get:
52965320
tags:
52975321
- Models
5322+
x-speakeasy-name-override: count
52985323
summary: Get total count of available models
52995324
responses:
53005325
'200':
@@ -5332,6 +5357,7 @@ paths:
53325357
get:
53335358
tags:
53345359
- Models
5360+
x-speakeasy-name-override: list
53355361
summary: List all models and their properties
53365362
parameters:
53375363
- schema:
@@ -5383,6 +5409,7 @@ paths:
53835409
get:
53845410
tags:
53855411
- Models
5412+
x-speakeasy-name-override: listForUser
53865413
summary: List models filtered by user provider preferences
53875414
security:
53885415
- bearer: []
@@ -5498,8 +5525,14 @@ paths:
54985525
- endpoints
54995526
required:
55005527
- data
5501-
default:
5502-
description: Error
5528+
4XX:
5529+
description: Error Response
5530+
content:
5531+
application/json:
5532+
schema:
5533+
$ref: '#/components/schemas/ErrorResponse'
5534+
5XX:
5535+
description: Error Response
55035536
content:
55045537
application/json:
55055538
schema:
@@ -5691,8 +5724,14 @@ paths:
56915724
- temperature
56925725
- top_p
56935726
- max_tokens
5694-
default:
5695-
description: Data not found
5727+
4XX:
5728+
description: Error Response
5729+
content:
5730+
application/json:
5731+
schema:
5732+
$ref: '#/components/schemas/ErrorResponse'
5733+
5XX:
5734+
description: Error Response
56965735
content:
56975736
application/json:
56985737
schema:
@@ -5956,8 +5995,14 @@ paths:
59565995
byok_usage_monthly: 17.38
59575996
created_at: '2025-08-24T10:30:00Z'
59585997
updated_at: '2025-08-24T15:45:00Z'
5959-
default:
5960-
description: Error response
5998+
4XX:
5999+
description: Error Response
6000+
content:
6001+
application/json:
6002+
schema:
6003+
$ref: '#/components/schemas/ErrorResponse'
6004+
5XX:
6005+
description: Error Response
59616006
content:
59626007
application/json:
59636008
schema:
@@ -6160,8 +6205,14 @@ paths:
61606205
created_at: '2025-08-24T10:30:00Z'
61616206
updated_at: null
61626207
key: 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
6163-
default:
6164-
description: Error response
6208+
4XX:
6209+
description: Error Response
6210+
content:
6211+
application/json:
6212+
schema:
6213+
$ref: '#/components/schemas/ErrorResponse'
6214+
5XX:
6215+
description: Error Response
61656216
content:
61666217
application/json:
61676218
schema:
@@ -6370,8 +6421,14 @@ paths:
63706421
byok_usage_monthly: 17.38
63716422
created_at: '2025-08-24T10:30:00Z'
63726423
updated_at: '2025-08-24T16:00:00Z'
6373-
default:
6374-
description: Error response
6424+
4XX:
6425+
description: Error Response
6426+
content:
6427+
application/json:
6428+
schema:
6429+
$ref: '#/components/schemas/ErrorResponse'
6430+
5XX:
6431+
description: Error Response
63756432
content:
63766433
application/json:
63776434
schema:
@@ -6407,8 +6464,14 @@ paths:
64076464
- deleted
64086465
example:
64096466
deleted: true
6410-
default:
6411-
description: Error response
6467+
4XX:
6468+
description: Error Response
6469+
content:
6470+
application/json:
6471+
schema:
6472+
$ref: '#/components/schemas/ErrorResponse'
6473+
5XX:
6474+
description: Error Response
64126475
content:
64136476
application/json:
64146477
schema:
@@ -6576,8 +6639,14 @@ paths:
65766639
byok_usage_monthly: 17.38
65776640
created_at: '2025-08-24T10:30:00Z'
65786641
updated_at: '2025-08-24T15:45:00Z'
6579-
default:
6580-
description: Error response
6642+
4XX:
6643+
description: Error Response
6644+
content:
6645+
application/json:
6646+
schema:
6647+
$ref: '#/components/schemas/ErrorResponse'
6648+
5XX:
6649+
description: Error Response
65816650
content:
65826651
application/json:
65836652
schema:
@@ -6750,8 +6819,14 @@ paths:
67506819
requests: 1000
67516820
interval: 1h
67526821
note: This field is deprecated and safe to ignore.
6753-
default:
6754-
description: Error response
6822+
4XX:
6823+
description: Error Response
6824+
content:
6825+
application/json:
6826+
schema:
6827+
$ref: '#/components/schemas/ErrorResponse'
6828+
5XX:
6829+
description: Error Response
67556830
content:
67566831
application/json:
67576832
schema:

.speakeasy/workflow.lock

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,20 @@ speakeasyVersion: 1.637.2
22
sources:
33
OpenRouter API:
44
sourceNamespace: open-router-chat-completions-api
5-
sourceRevisionDigest: sha256:452cc6d9f5385f4a8af8669044a537091e6103e30d8e881a4ca3602bcb6a0f5a
6-
sourceBlobDigest: sha256:1f7dc6e63e3123fc45ff333c24bb20b6cc426c7a8e83ea3cad63b6ff94b1cc61
5+
sourceRevisionDigest: sha256:fb9f9ef919a028efa99651b1c236d12f7db0956d45cd700347b4f85087c49b27
6+
sourceBlobDigest: sha256:d27d3da0d51c7de23ee53f25e9629a7afa55cbf4df147d737932e7a493f20dec
77
tags:
88
- latest
9+
- speakeasy-sdk-regen-1760996224
910
- 1.0.0
1011
targets:
1112
openrouter:
1213
source: OpenRouter API
1314
sourceNamespace: open-router-chat-completions-api
14-
sourceRevisionDigest: sha256:452cc6d9f5385f4a8af8669044a537091e6103e30d8e881a4ca3602bcb6a0f5a
15-
sourceBlobDigest: sha256:1f7dc6e63e3123fc45ff333c24bb20b6cc426c7a8e83ea3cad63b6ff94b1cc61
15+
sourceRevisionDigest: sha256:fb9f9ef919a028efa99651b1c236d12f7db0956d45cd700347b4f85087c49b27
16+
sourceBlobDigest: sha256:d27d3da0d51c7de23ee53f25e9629a7afa55cbf4df147d737932e7a493f20dec
1617
codeSamplesNamespace: open-router-chat-completions-api-typescript-code-samples
17-
codeSamplesRevisionDigest: sha256:5367596588bc9a657adf8fcb2de986079807f0562af3b73450cdd7169e7b818b
18+
codeSamplesRevisionDigest: sha256:ef3bf8898d13f0118c814b1f6927ebf201c22189c524d3b1b45d4d7adcd349a6
1819
workflow:
1920
workflowVersion: 1.0.0
2021
speakeasyVersion: latest

README.md

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -412,9 +412,9 @@ run();
412412

413413
### [models](docs/sdks/models/README.md)
414414

415-
* [listModelsCount](docs/sdks/models/README.md#listmodelscount) - Get total count of available models
416-
* [getModels](docs/sdks/models/README.md#getmodels) - List all models and their properties
417-
* [listModelsUser](docs/sdks/models/README.md#listmodelsuser) - List models filtered by user provider preferences
415+
* [count](docs/sdks/models/README.md#count) - Get total count of available models
416+
* [list](docs/sdks/models/README.md#list) - List all models and their properties
417+
* [listForUser](docs/sdks/models/README.md#listforuser) - List models filtered by user provider preferences
418418

419419
### [parameters](docs/sdks/parameters/README.md)
420420

@@ -457,9 +457,9 @@ To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md).
457457
- [`endpointsList`](docs/sdks/endpoints/README.md#list) - List all endpoints for a model
458458
- [`endpointsListZdrEndpoints`](docs/sdks/endpoints/README.md#listzdrendpoints) - Preview the impact of ZDR on the available endpoints
459459
- [`generationsGetGeneration`](docs/sdks/generations/README.md#getgeneration) - Get request & usage metadata for a generation
460-
- [`modelsGetModels`](docs/sdks/models/README.md#getmodels) - List all models and their properties
461-
- [`modelsListModelsCount`](docs/sdks/models/README.md#listmodelscount) - Get total count of available models
462-
- [`modelsListModelsUser`](docs/sdks/models/README.md#listmodelsuser) - List models filtered by user provider preferences
460+
- [`modelsCount`](docs/sdks/models/README.md#count) - Get total count of available models
461+
- [`modelsList`](docs/sdks/models/README.md#list) - List all models and their properties
462+
- [`modelsListForUser`](docs/sdks/models/README.md#listforuser) - List models filtered by user provider preferences
463463
- [`parametersGetParameters`](docs/sdks/parameters/README.md#getparameters) - Get a model's supported parameters and data about which are most popular
464464
- [`providersList`](docs/sdks/providers/README.md#list) - List all providers
465465

@@ -503,9 +503,9 @@ To learn about this feature and how to get started, check
503503
- [`useEndpointsList`](docs/sdks/endpoints/README.md#list) - List all endpoints for a model
504504
- [`useEndpointsListZdrEndpoints`](docs/sdks/endpoints/README.md#listzdrendpoints) - Preview the impact of ZDR on the available endpoints
505505
- [`useGenerationsGetGeneration`](docs/sdks/generations/README.md#getgeneration) - Get request & usage metadata for a generation
506-
- [`useModelsGetModels`](docs/sdks/models/README.md#getmodels) - List all models and their properties
507-
- [`useModelsListModelsCount`](docs/sdks/models/README.md#listmodelscount) - Get total count of available models
508-
- [`useModelsListModelsUser`](docs/sdks/models/README.md#listmodelsuser) - List models filtered by user provider preferences
506+
- [`useModelsCount`](docs/sdks/models/README.md#count) - Get total count of available models
507+
- [`useModelsList`](docs/sdks/models/README.md#list) - List all models and their properties
508+
- [`useModelsListForUser`](docs/sdks/models/README.md#listforuser) - List models filtered by user provider preferences
509509
- [`useParametersGetParameters`](docs/sdks/parameters/README.md#getparameters) - Get a model's supported parameters and data about which are most popular
510510
- [`useProvidersList`](docs/sdks/providers/README.md#list) - List all providers
511511

@@ -954,7 +954,9 @@ const openRouter = new OpenRouter({
954954

955955
async function run() {
956956
try {
957-
const result = await openRouter.providers.list();
957+
const result = await openRouter.analytics.getUserActivity({
958+
date: "2025-08-24",
959+
});
958960

959961
console.log(result);
960962
} catch (error) {
@@ -966,8 +968,9 @@ async function run() {
966968
console.log(error.headers);
967969

968970
// Depending on the method different errors may be thrown
969-
if (error instanceof errors.InternalServerError) {
970-
console.log(error.data$.error); // operations.ErrorT
971+
if (error instanceof errors.ErrorResponse) {
972+
console.log(error.data$.error); // models.ErrorResponseError
973+
console.log(error.data$.userId); // string
971974
}
972975
}
973976
}
@@ -981,7 +984,7 @@ run();
981984
**Primary error:**
982985
* [`OpenRouterError`](./src/models/errors/openroutererror.ts): The base class for HTTP error responses.
983986

984-
<details><summary>Less common errors (8)</summary>
987+
<details><summary>Less common errors (9)</summary>
985988

986989
<br />
987990

@@ -994,6 +997,7 @@ run();
994997

995998

996999
**Inherit from [`OpenRouterError`](./src/models/errors/openroutererror.ts)**:
1000+
* [`ErrorResponse`](./src/models/errors/errorresponse.ts): Error response. Applicable to 12 of 20 methods.*
9971001
* [`ChatError`](./src/models/errors/chaterror.ts): Bad request - invalid parameters. Applicable to 2 of 20 methods.*
9981002
* [`InternalServerError`](./src/models/errors/internalservererror.ts): Internal Server Error. Status code `500`. Applicable to 1 of 20 methods.*
9991003
* [`ResponseValidationError`](./src/models/errors/responsevalidationerror.ts): Type mismatch between the data returned from the server and the structure expected by the SDK. See `error.rawValue` for the raw value and `error.pretty()` for a nicely formatted multi-line string.

RELEASES.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,14 @@ Based on:
5656
### Generated
5757
- [typescript v0.0.0-beta.43] .
5858
### Releases
59-
- [NPM v0.0.0-beta.43] https://www.npmjs.com/package/@openrouter/sdk/v/0.0.0-beta.43 - .
59+
- [NPM v0.0.0-beta.43] https://www.npmjs.com/package/@openrouter/sdk/v/0.0.0-beta.43 - .
60+
61+
## 2025-10-20 21:36:46
62+
### Changes
63+
Based on:
64+
- OpenAPI Doc
65+
- Speakeasy CLI 1.637.2 (2.727.9) https://github.com/speakeasy-api/speakeasy
66+
### Generated
67+
- [typescript v0.0.1-beta.1] .
68+
### Releases
69+
- [NPM v0.0.1-beta.1] https://www.npmjs.com/package/@openrouter/sdk/v/0.0.1-beta.1 - .
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# ErrorResponse
2+
3+
Error response
4+
5+
## Example Usage
6+
7+
```typescript
8+
import { ErrorResponse } from "@openrouter/sdk/models/errors";
9+
10+
// No examples available for this model
11+
```
12+
13+
## Fields
14+
15+
| Field | Type | Required | Description |
16+
| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- |
17+
| `error` | [models.ErrorResponseError](../../models/errorresponseerror.md) | :heavy_check_mark: | N/A |
18+
| `userId` | *string* | :heavy_minus_sign: | N/A |

0 commit comments

Comments
 (0)