Skip to content

Commit fdb3005

Browse files
authored
chore: update OpenAPI specification from openrouter-web (#47)
2 parents 1c22f59 + fb1b820 commit fdb3005

File tree

13 files changed

+49
-46
lines changed

13 files changed

+49
-46
lines changed

.github/workflows/speakeasy_run_on_pr.yaml

Lines changed: 16 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -20,31 +20,28 @@ jobs:
2020
ref: ${{ github.event.pull_request.head.ref }}
2121
token: ${{ secrets.GITHUB_TOKEN }}
2222

23-
- name: Setup Speakeasy
24-
uses: speakeasy-api/sdk-generation-action@v15
25-
with:
26-
github_access_token: ${{ secrets.GITHUB_TOKEN }}
27-
speakeasy_api_key: ${{ secrets.SPEAKEASY_API_KEY }}
28-
speakeasy_version: latest
23+
- name: Install Speakeasy CLI
24+
run: |
25+
curl -fsSL https://raw.githubusercontent.com/speakeasy-api/speakeasy/main/install.sh | sh
26+
# Verify speakeasy command is available
27+
if ! command -v speakeasy &> /dev/null; then
28+
echo "Error: speakeasy command not found after installation"
29+
exit 1
30+
fi
31+
speakeasy --version
2932
3033
- name: Run Speakeasy
3134
run: speakeasy run
35+
env:
36+
SPEAKEASY_API_KEY: ${{ secrets.SPEAKEASY_API_KEY }}
3237

3338
- name: Validate SDK
3439
uses: ./.github/actions/validate-sdk
3540
with:
3641
openrouter-api-key: ${{ secrets.OPENROUTER_API_KEY }}
3742

38-
- name: Commit changes
39-
run: |
40-
git config --global user.name 'github-actions[bot]'
41-
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
42-
git add .
43-
if git diff --staged --quiet; then
44-
echo "No changes to commit"
45-
else
46-
git commit -m "chore: run speakeasy and update generated files"
47-
git push
48-
fi
49-
env:
50-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
43+
- name: Auto-commit generated SDK and API docs
44+
uses: int128/update-generated-files-action@v2
45+
with:
46+
# Set a custom message to the new commit (optional)
47+
commit-message: 'Chore: auto-generate SDK and API documentation'

.speakeasy/gen.lock

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
lockVersion: 2.0.0
22
id: 8b6cd71c-ea04-44da-af45-e43968b5928d
33
management:
4-
docChecksum: 9d79e7680beab7c04249798b91065cc4
4+
docChecksum: 6676183700397400ca1cc3c4e2b3fa14
55
docVersion: 1.0.0
6-
speakeasyVersion: 1.642.1
7-
generationVersion: 2.731.4
8-
releaseVersion: 0.0.1-beta.16
9-
configChecksum: 4a7712d499110c49acf1cf697001b209
6+
speakeasyVersion: 1.643.2
7+
generationVersion: 2.731.6
8+
releaseVersion: 0.0.1-beta.18
9+
configChecksum: 26a31da22297e3c3dabf0f160c041dca
1010
repoURL: https://github.com/OpenRouterTeam/typescript-sdk.git
1111
installationURL: https://github.com/OpenRouterTeam/typescript-sdk
1212
published: true

.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.16
32+
version: 0.0.1-beta.18
3333
acceptHeaderEnum: false
3434
additionalDependencies:
3535
dependencies: {}

.speakeasy/in.openapi.yaml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4041,6 +4041,7 @@ components:
40414041
- image
40424042
- file
40434043
- audio
4044+
- video
40444045
example: text
40454046
OutputModality:
40464047
type: string
@@ -4756,12 +4757,14 @@ components:
47564757
rejected_prediction_tokens:
47574758
type: number
47584759
prompt_tokens_details:
4759-
type: object
4760-
properties:
4761-
cached_tokens:
4762-
type: number
4763-
audio_tokens:
4764-
type: number
4760+
anyOf:
4761+
- type: object
4762+
properties:
4763+
cached_tokens:
4764+
type: number
4765+
audio_tokens:
4766+
type: number
4767+
- type: 'null'
47654768
required:
47664769
- completion_tokens
47674770
- prompt_tokens

.speakeasy/out.openapi.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4056,6 +4056,7 @@ components:
40564056
- image
40574057
- file
40584058
- audio
4059+
- video
40594060
example: text
40604061
x-speakeasy-unknown-values: allow
40614062
OutputModality:

.speakeasy/workflow.lock

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
1-
speakeasyVersion: 1.642.1
1+
speakeasyVersion: 1.643.2
22
sources:
33
OpenRouter API:
44
sourceNamespace: open-router-chat-completions-api
5-
sourceRevisionDigest: sha256:d5386ba830642c25b458e63884bd42475fcb8b37d442312cbc7468a541d3e5c0
6-
sourceBlobDigest: sha256:c4cf70faabb2eed400c9b5e1a9185ae65baf8f5cb2575ad4457f6a4fe340a931
5+
sourceRevisionDigest: sha256:1076c98248df2a8c6c6a22cb2fcefd3a517f2dc346c0c5b410abfe301bdb1dad
6+
sourceBlobDigest: sha256:da053f100fc1b8b64975f7612dd8970661444f9156cd295a6cc49fd5914e8247
77
tags:
88
- latest
9+
- staging
910
- 1.0.0
1011
targets:
1112
openrouter:
1213
source: OpenRouter API
1314
sourceNamespace: open-router-chat-completions-api
14-
sourceRevisionDigest: sha256:d5386ba830642c25b458e63884bd42475fcb8b37d442312cbc7468a541d3e5c0
15-
sourceBlobDigest: sha256:c4cf70faabb2eed400c9b5e1a9185ae65baf8f5cb2575ad4457f6a4fe340a931
15+
sourceRevisionDigest: sha256:1076c98248df2a8c6c6a22cb2fcefd3a517f2dc346c0c5b410abfe301bdb1dad
16+
sourceBlobDigest: sha256:da053f100fc1b8b64975f7612dd8970661444f9156cd295a6cc49fd5914e8247
1617
codeSamplesNamespace: open-router-chat-completions-api-typescript-code-samples
17-
codeSamplesRevisionDigest: sha256:c880eaee9f97ea8027b797a2fc9b2b561f763470c9f68c1e0b865b78150ff5b3
18+
codeSamplesRevisionDigest: sha256:adbc72c41ea0d8b705a76a082a80a369ae3aa971d7ecacfcc3fa512d384f057d
1819
workflow:
1920
workflowVersion: 1.0.0
2021
speakeasyVersion: latest

docs/models/inputmodality.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ let value: InputModality = "text";
1313
This is an open enum. Unrecognized values will be captured as the `Unrecognized<string>` branded type.
1414

1515
```typescript
16-
"text" | "image" | "file" | "audio" | Unrecognized<string>
16+
"text" | "image" | "file" | "audio" | "video" | Unrecognized<string>
1717
```

examples/nextjs-example/package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

jsr.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
{
44
"name": "@openrouter/sdk",
5-
"version": "0.0.1-beta.16",
5+
"version": "0.0.1-beta.18",
66
"exports": {
77
".": "./src/index.ts",
88
"./models/errors": "./src/models/errors/index.ts",

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)