File tree Expand file tree Collapse file tree 11 files changed +37
-22
lines changed
.github/actions/validate-sdk Expand file tree Collapse file tree 11 files changed +37
-22
lines changed Original file line number Diff line number Diff line change 1818 shell : bash
1919 run : npm run build
2020
21- - name : Typecheck tests directory
22- shell : bash
23- run : npx tsc --noEmit --skipLibCheck --esModuleInterop --moduleResolution node --module esnext --target es2020 ' tests/**/*.ts'
21+ # - name: Typecheck tests directory
22+ # shell: bash
23+ # run: npx tsc --noEmit --skipLibCheck --esModuleInterop --moduleResolution node --module esnext --target es2020 tests/**/*.ts
2424
2525 - name : Install examples dependencies
2626 shell : bash
3030 - name : Typecheck examples root
3131 shell : bash
3232 working-directory : examples
33- run : npx tsc --noEmit --skipLibCheck --esModuleInterop --moduleResolution node --module esnext --target es2020 ' *.ts'
33+ run : npx tsc --noEmit --skipLibCheck --esModuleInterop --moduleResolution node --module esnext --target es2020 *.ts
3434
3535 - name : Install nextjs-example dependencies
3636 shell : bash
4444
4545 - name : Run tests
4646 shell : bash
47- run : npm test
47+ run : npx vitest
Original file line number Diff line number Diff line change @@ -5,8 +5,8 @@ management:
55 docVersion: 1.0.0
66 speakeasyVersion: 1.642.1
77 generationVersion: 2.731.4
8- releaseVersion: 0.0.1-beta.12
9- configChecksum: e6c04301f8a6286cc4a63b775130ead9
8+ releaseVersion: 0.0.1-beta.14
9+ configChecksum: 6639946bd9c6d122465a7506943348f4
1010 repoURL: https://github.com/OpenRouterTeam/typescript-sdk.git
1111 installationURL: https://github.com/OpenRouterTeam/typescript-sdk
1212 published: true
Original file line number Diff line number Diff line change @@ -29,14 +29,14 @@ generation:
2929 generateNewTests : true
3030 skipResponseBodyAssertions : false
3131typescript :
32- version : 0.0.1-beta.12
32+ version : 0.0.1-beta.14
3333 acceptHeaderEnum : false
3434 additionalDependencies :
3535 dependencies : {}
3636 devDependencies :
3737 ' @types/node ' : ^22.13.12
38- vitest : ^3.2.4
3938 dotenv : ^16.4.7
39+ vitest : ^3.2.4
4040 peerDependencies : {}
4141 additionalPackageJSON : {}
4242 author : OpenRouter
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ targets:
1414 sourceRevisionDigest: sha256:6dd11a2a3212f61a00c0e0b6309aaf39cc3d2575493aea2b54aafb0cf187d272
1515 sourceBlobDigest: sha256:e46f40a6a57e7eb1c21a40c388f46b9b7b36ed0dd9ea78d480d300d83ace2fe3
1616 codeSamplesNamespace: open-router-chat-completions-api-typescript-code-samples
17- codeSamplesRevisionDigest: sha256:54cedfffe13b1e73d8e277b9fcbc7f109d448d6131ae751d3a07640b9e952673
17+ codeSamplesRevisionDigest: sha256:1d36752fa1859baae015ab744eb16369c7c2a9d9de92e60135d98860d2ab4741
1818workflow:
1919 workflowVersion: 1.0.0
2020 speakeasyVersion: latest
Original file line number Diff line number Diff line change @@ -66,14 +66,14 @@ async function streamingExample() {
6666 let fullContent = "" ;
6767
6868 for await ( const chunk of stream ) {
69- if ( chunk . data . choices && chunk . data . choices [ 0 ] ?. delta ?. content ) {
70- const content = chunk . data . choices [ 0 ] . delta . content ;
69+ if ( chunk . choices && chunk . choices [ 0 ] ?. delta ?. content ) {
70+ const content = chunk . choices [ 0 ] . delta . content ;
7171 process . stdout . write ( content ) ;
7272 fullContent += content ;
7373 }
7474
75- if ( chunk . data . usage ) {
76- console . log ( "\n\nStream usage:" , chunk . data . usage ) ;
75+ if ( chunk . usage ) {
76+ console . log ( "\n\nStream usage:" , chunk . usage ) ;
7777 }
7878 }
7979
Original file line number Diff line number Diff line change 69426942 }
69436943 }
69446944 }
6945- }
6945+ }
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ import Link from "next/link";
2727import { useRouter } from "next/navigation" ;
2828import { useEffect , useState } from "react" ;
2929
30- export default function Page ( { searchParams } : PageProps < "/" > ) {
30+ export default function Page ( { searchParams } : { searchParams : Promise < { code ?: string ; error ?: string } > } ) {
3131 const [ connectionState , setConnectionState ] = useState <
3232 "disconnected" | "connecting" | "connected" | "initializing" | "error"
3333 > ( "initializing" ) ;
Original file line number Diff line number Diff line change 22
33{
44 "name" : " @openrouter/sdk" ,
5- "version" : " 0.0.1-beta.12 " ,
5+ "version" : " 0.0.1-beta.14 " ,
66 "exports" : {
77 "." : " ./src/index.ts" ,
88 "./models/errors" : " ./src/models/errors/index.ts" ,
Original file line number Diff line number Diff line change 11{
22 "name" : " @openrouter/sdk" ,
3- "version" : " 0.0.1-beta.12 " ,
3+ "version" : " 0.0.1-beta.14 " ,
44 "author" : " OpenRouter" ,
55 "type" : " module" ,
66 "main" : " ./esm/index.js" ,
7272 "@tanstack/react-query" : " ^5.61.4" ,
7373 "@types/node" : " ^22.13.12" ,
7474 "@types/react" : " ^18.3.12" ,
75+ "dotenv" : " ^16.4.7" ,
7576 "eslint" : " ^9.19.0" ,
7677 "globals" : " ^15.14.0" ,
7778 "typescript" : " ~5.8.3" ,
You can’t perform that action at this time.
0 commit comments