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
35 changes: 16 additions & 19 deletions .github/workflows/speakeasy_run_on_pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,31 +20,28 @@ jobs:
ref: ${{ github.event.pull_request.head.ref }}
token: ${{ secrets.GITHUB_TOKEN }}

- name: Setup Speakeasy
uses: speakeasy-api/sdk-generation-action@v15
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
speakeasy_api_key: ${{ secrets.SPEAKEASY_API_KEY }}
speakeasy_version: latest
- name: Install Speakeasy CLI
run: |
curl -fsSL https://raw.githubusercontent.com/speakeasy-api/speakeasy/main/install.sh | sh
# Verify speakeasy command is available
if ! command -v speakeasy &> /dev/null; then
echo "Error: speakeasy command not found after installation"
exit 1
fi
speakeasy --version

- name: Run Speakeasy
run: speakeasy run
env:
SPEAKEASY_API_KEY: ${{ secrets.SPEAKEASY_API_KEY }}

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

- name: Commit changes
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add .
if git diff --staged --quiet; then
echo "No changes to commit"
else
git commit -m "chore: run speakeasy and update generated files"
git push
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Auto-commit generated SDK and API docs
uses: int128/update-generated-files-action@v2
with:
# Set a custom message to the new commit (optional)
commit-message: 'Chore: auto-generate SDK and API documentation'
10 changes: 5 additions & 5 deletions .speakeasy/gen.lock
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
lockVersion: 2.0.0
id: 8b6cd71c-ea04-44da-af45-e43968b5928d
management:
docChecksum: 9d79e7680beab7c04249798b91065cc4
docChecksum: 6676183700397400ca1cc3c4e2b3fa14
docVersion: 1.0.0
speakeasyVersion: 1.642.1
generationVersion: 2.731.4
releaseVersion: 0.0.1-beta.16
configChecksum: 4a7712d499110c49acf1cf697001b209
speakeasyVersion: 1.643.2
generationVersion: 2.731.6
releaseVersion: 0.0.1-beta.18
configChecksum: 26a31da22297e3c3dabf0f160c041dca
repoURL: https://github.com/OpenRouterTeam/typescript-sdk.git
installationURL: https://github.com/OpenRouterTeam/typescript-sdk
published: true
Expand Down
2 changes: 1 addition & 1 deletion .speakeasy/gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ generation:
generateNewTests: true
skipResponseBodyAssertions: false
typescript:
version: 0.0.1-beta.16
version: 0.0.1-beta.18
acceptHeaderEnum: false
additionalDependencies:
dependencies: {}
Expand Down
15 changes: 9 additions & 6 deletions .speakeasy/in.openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4041,6 +4041,7 @@ components:
- image
- file
- audio
- video
example: text
OutputModality:
type: string
Expand Down Expand Up @@ -4756,12 +4757,14 @@ components:
rejected_prediction_tokens:
type: number
prompt_tokens_details:
type: object
properties:
cached_tokens:
type: number
audio_tokens:
type: number
anyOf:
- type: object
properties:
cached_tokens:
type: number
audio_tokens:
type: number
- type: 'null'
required:
- completion_tokens
- prompt_tokens
Expand Down
1 change: 1 addition & 0 deletions .speakeasy/out.openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4056,6 +4056,7 @@ components:
- image
- file
- audio
- video
example: text
x-speakeasy-unknown-values: allow
OutputModality:
Expand Down
13 changes: 7 additions & 6 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
speakeasyVersion: 1.642.1
speakeasyVersion: 1.643.2
sources:
OpenRouter API:
sourceNamespace: open-router-chat-completions-api
sourceRevisionDigest: sha256:d5386ba830642c25b458e63884bd42475fcb8b37d442312cbc7468a541d3e5c0
sourceBlobDigest: sha256:c4cf70faabb2eed400c9b5e1a9185ae65baf8f5cb2575ad4457f6a4fe340a931
sourceRevisionDigest: sha256:1076c98248df2a8c6c6a22cb2fcefd3a517f2dc346c0c5b410abfe301bdb1dad
sourceBlobDigest: sha256:da053f100fc1b8b64975f7612dd8970661444f9156cd295a6cc49fd5914e8247
tags:
- latest
- staging
- 1.0.0
targets:
openrouter:
source: OpenRouter API
sourceNamespace: open-router-chat-completions-api
sourceRevisionDigest: sha256:d5386ba830642c25b458e63884bd42475fcb8b37d442312cbc7468a541d3e5c0
sourceBlobDigest: sha256:c4cf70faabb2eed400c9b5e1a9185ae65baf8f5cb2575ad4457f6a4fe340a931
sourceRevisionDigest: sha256:1076c98248df2a8c6c6a22cb2fcefd3a517f2dc346c0c5b410abfe301bdb1dad
sourceBlobDigest: sha256:da053f100fc1b8b64975f7612dd8970661444f9156cd295a6cc49fd5914e8247
codeSamplesNamespace: open-router-chat-completions-api-typescript-code-samples
codeSamplesRevisionDigest: sha256:c880eaee9f97ea8027b797a2fc9b2b561f763470c9f68c1e0b865b78150ff5b3
codeSamplesRevisionDigest: sha256:adbc72c41ea0d8b705a76a082a80a369ae3aa971d7ecacfcc3fa512d384f057d
workflow:
workflowVersion: 1.0.0
speakeasyVersion: latest
Expand Down
2 changes: 1 addition & 1 deletion docs/models/inputmodality.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ let value: InputModality = "text";
This is an open enum. Unrecognized values will be captured as the `Unrecognized<string>` branded type.

```typescript
"text" | "image" | "file" | "audio" | Unrecognized<string>
"text" | "image" | "file" | "audio" | "video" | Unrecognized<string>
```
2 changes: 1 addition & 1 deletion examples/nextjs-example/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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": "0.0.1-beta.16",
"version": "0.0.1-beta.18",
"exports": {
".": "./src/index.ts",
"./models/errors": "./src/models/errors/index.ts",
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@openrouter/sdk",
"version": "0.0.1-beta.16",
"version": "0.0.1-beta.18",
"author": "OpenRouter",
"type": "module",
"main": "./esm/index.js",
Expand Down
6 changes: 3 additions & 3 deletions src/lib/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
export const SDK_METADATA = {
language: "typescript",
openapiDocVersion: "1.0.0",
sdkVersion: "0.0.1-beta.16",
genVersion: "2.731.4",
sdkVersion: "0.0.1-beta.18",
genVersion: "2.731.6",
userAgent:
"speakeasy-sdk/typescript 0.0.1-beta.16 2.731.4 1.0.0 @openrouter/sdk",
"speakeasy-sdk/typescript 0.0.1-beta.18 2.731.6 1.0.0 @openrouter/sdk",
} as const;
1 change: 1 addition & 0 deletions src/models/inputmodality.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export const InputModality = {
Image: "image",
File: "file",
Audio: "audio",
Video: "video",
} as const;
export type InputModality = OpenEnum<typeof InputModality>;

Expand Down
Loading