From c123c9b1eb7231aa4a3c450abb6631d1c8b0949e Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Tue, 2 Dec 2025 00:32:58 +0000 Subject: [PATCH 1/2] ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.666.0 --- .speakeasy/gen.lock | 64 +--- .speakeasy/gen.yaml | 7 +- .speakeasy/workflow.lock | 6 +- RELEASES.md | 12 +- docs/models/assistantmessage.md | 2 +- ...enerationparamsresponseformatjsonobject.md | 2 +- ...hatgenerationparamsresponseformatpython.md | 2 +- .../chatgenerationparamsresponseformattext.md | 2 +- docs/models/chatmessagecontentitemaudio.md | 2 +- docs/models/chatmessagecontentitemfile.md | 2 +- docs/models/chatmessagecontentitemimage.md | 2 +- docs/models/chatmessagecontentitemtext.md | 2 +- .../chatmessagecontentitemvideoinputvideo.md | 2 +- .../chatmessagecontentitemvideovideourl.md | 2 +- docs/models/chatmessagetoolcall.md | 2 +- docs/models/chatresponse.md | 2 +- docs/models/chatstreamingmessagetoolcall.md | 2 +- docs/models/chatstreamingresponsechunkdata.md | 2 +- ...ioncreateparamsresponseformatjsonobject.md | 2 +- ...pletioncreateparamsresponseformatpython.md | 2 +- ...ompletioncreateparamsresponseformattext.md | 2 +- docs/models/completionresponse.md | 2 +- docs/models/filecitation.md | 12 +- docs/models/filecitationtype.md | 15 - docs/models/filepath.md | 10 +- docs/models/filepathtype.md | 15 - docs/models/idfileparser.md | 15 - docs/models/idmoderation.md | 15 - docs/models/idweb.md | 15 - docs/models/messagedeveloper.md | 2 +- docs/models/namedtoolchoice.md | 2 +- docs/models/openairesponsesrefusalcontent.md | 8 +- .../openairesponsesrefusalcontenttype.md | 15 - docs/models/openresponseserrorevent.md | 14 +- docs/models/openresponseserroreventtype.md | 15 - .../openresponsesimagegencallcompleted.md | 12 +- .../openresponsesimagegencallcompletedtype.md | 16 - .../openresponsesimagegencallgenerating.md | 12 +- ...openresponsesimagegencallgeneratingtype.md | 16 - .../openresponsesimagegencallinprogress.md | 12 +- ...openresponsesimagegencallinprogresstype.md | 16 - .../openresponsesimagegencallpartialimage.md | 16 +- ...enresponsesimagegencallpartialimagetype.md | 16 - ...sponsesnonstreamingresponsetoolfunction.md | 14 +- .../openresponsesnonstreamingresponsetype.md | 15 - .../openresponsesreasoningdeltaevent.md | 16 +- .../openresponsesreasoningdeltaeventtype.md | 16 - .../models/openresponsesreasoningdoneevent.md | 16 +- .../openresponsesreasoningdoneeventtype.md | 15 - ...responsesreasoningsummarypartaddedevent.md | 16 +- ...onsesreasoningsummarypartaddedeventtype.md | 16 - ...responsesreasoningsummarytextdeltaevent.md | 16 +- ...onsesreasoningsummarytextdeltaeventtype.md | 16 - ...nresponsesreasoningsummarytextdoneevent.md | 16 +- ...ponsesreasoningsummarytextdoneeventtype.md | 16 - .../openresponsesrequesttoolfunction.md | 14 +- docs/models/openresponsesrequesttype.md | 15 - ...enresponsesstreameventresponsecompleted.md | 2 +- ...nsesstreameventresponsecontentpartadded.md | 16 +- ...onsesstreameventresponsecontentpartdone.md | 16 +- ...openresponsesstreameventresponsecreated.md | 2 +- .../openresponsesstreameventresponsefailed.md | 2 +- ...eventresponsefunctioncallargumentsdelta.md | 14 +- ...meventresponsefunctioncallargumentsdone.md | 16 +- ...nresponsesstreameventresponseincomplete.md | 2 +- ...nresponsesstreameventresponseinprogress.md | 2 +- ...onsesstreameventresponseoutputitemadded.md | 2 +- ...ponsesstreameventresponseoutputitemdone.md | 2 +- ...meventresponseoutputtextannotationadded.md | 18 +- ...onsesstreameventresponseoutputtextdelta.md | 18 +- ...ponsesstreameventresponseoutputtextdone.md | 18 +- ...ameventresponsereasoningsummarypartdone.md | 16 +- ...esponsesstreameventresponserefusaldelta.md | 16 +- ...responsesstreameventresponserefusaldone.md | 16 +- .../openresponseswebsearch20250826tool.md | 2 +- .../openresponseswebsearch20250826tooltype.md | 15 - ...enresponseswebsearchpreview20250311tool.md | 10 +- ...sponseswebsearchpreview20250311tooltype.md | 16 - .../openresponseswebsearchpreviewtool.md | 10 +- .../openresponseswebsearchpreviewtooltype.md | 15 - docs/models/openresponseswebsearchtool.md | 2 +- docs/models/openresponseswebsearchtooltype.md | 15 - docs/models/operations/contentimageurl.md | 8 +- docs/models/operations/contenttext.md | 8 +- docs/models/operations/deletekeysresponse.md | 2 +- docs/models/operations/typeimageurl.md | 15 - docs/models/operations/typetext.md | 15 - docs/models/pluginfileparser.md | 10 +- docs/models/pluginmoderation.md | 6 +- docs/models/pluginweb.md | 2 +- docs/models/responseformatjsonschema.md | 2 +- docs/models/responseformattextgrammar.md | 2 +- docs/models/responseinputaudio.md | 2 +- docs/models/responseinputaudiotype.md | 15 - docs/models/responseinputfile.md | 14 +- docs/models/responseinputfiletype.md | 15 - docs/models/responseinputimage.md | 2 +- docs/models/responseinputimagetype.md | 15 - docs/models/responseinputtext.md | 8 +- docs/models/responseinputtexttype.md | 15 - docs/models/responseoutputtext.md | 10 +- docs/models/responseoutputtexttype.md | 15 - docs/models/responsesformatjsonobject.md | 6 +- docs/models/responsesformatjsonobjecttype.md | 15 - docs/models/responsesformattext.md | 6 +- .../responsesformattextjsonschemaconfig.md | 14 +- ...responsesformattextjsonschemaconfigtype.md | 15 - docs/models/responsesformattexttype.md | 15 - docs/models/systemmessage.md | 2 +- docs/models/tooldefinitionjson.md | 2 +- docs/models/toolresponsemessage.md | 2 +- docs/models/typeresponsecompleted.md | 15 - docs/models/typeresponsecontentpartadded.md | 15 - docs/models/typeresponsecontentpartdone.md | 15 - docs/models/typeresponsecreated.md | 15 - docs/models/typeresponsefailed.md | 15 - .../typeresponsefunctioncallargumentsdelta.md | 16 - .../typeresponsefunctioncallargumentsdone.md | 16 - docs/models/typeresponseincomplete.md | 15 - docs/models/typeresponseinprogress.md | 15 - docs/models/typeresponseoutputitemadded.md | 15 - docs/models/typeresponseoutputitemdone.md | 15 - .../typeresponseoutputtextannotationadded.md | 16 - docs/models/typeresponseoutputtextdelta.md | 15 - docs/models/typeresponseoutputtextdone.md | 15 - .../typeresponsereasoningsummarypartdone.md | 16 - docs/models/typeresponserefusaldelta.md | 15 - docs/models/typeresponserefusaldone.md | 15 - docs/models/urlcitation.md | 14 +- docs/models/urlcitationtype.md | 15 - docs/models/usermessage.md | 2 +- jsr.json | 2 +- package-lock.json | 4 +- package.json | 2 +- src/lib/config.ts | 6 +- src/lib/encodings.ts | 20 +- src/models/chatgenerationparams.ts | 24 +- src/models/chatmessagecontentitem.ts | 52 +-- src/models/completioncreateparams.ts | 24 +- src/models/filecitation.ts | 23 +- src/models/filepath.ts | 21 +- src/models/message.ts | 10 +- src/models/openairesponsesannotation.ts | 8 +- src/models/openairesponsesinputunion.ts | 120 ++---- src/models/openairesponsesrefusalcontent.ts | 25 +- src/models/openresponseseasyinputmessage.ts | 96 ++--- src/models/openresponseserrorevent.ts | 17 +- .../openresponsesimagegencallcompleted.ts | 18 +- .../openresponsesimagegencallgenerating.ts | 18 +- .../openresponsesimagegencallinprogress.ts | 18 +- .../openresponsesimagegencallpartialimage.ts | 18 +- src/models/openresponsesinputmessageitem.ts | 64 ++-- .../openresponsesnonstreamingresponse.ts | 16 +- .../openresponsesreasoningdeltaevent.ts | 17 +- src/models/openresponsesreasoningdoneevent.ts | 17 +- ...responsesreasoningsummarypartaddedevent.ts | 18 +- ...responsesreasoningsummarytextdeltaevent.ts | 18 +- ...nresponsesreasoningsummarytextdoneevent.ts | 18 +- src/models/openresponsesrequest.ts | 64 +--- src/models/openresponsesstreamevent.ts | 347 ++++-------------- .../openresponseswebsearch20250826tool.ts | 25 +- ...enresponseswebsearchpreview20250311tool.ts | 26 +- .../openresponseswebsearchpreviewtool.ts | 25 +- src/models/openresponseswebsearchtool.ts | 25 +- src/models/operations/createembeddings.ts | 31 +- src/models/responseformattextconfig.ts | 12 +- src/models/responseinputaudio.ts | 24 +- src/models/responseinputfile.ts | 23 +- src/models/responseinputimage.ts | 24 +- src/models/responseinputtext.ts | 23 +- src/models/responseoutputtext.ts | 23 +- src/models/responsesformatjsonobject.ts | 25 +- src/models/responsesformattext.ts | 25 +- .../responsesformattextjsonschemaconfig.ts | 25 +- src/models/responsesoutputitem.ts | 36 +- src/models/urlcitation.ts | 21 +- src/types/unrecognized.ts | 10 +- tsconfig.json | 1 - 178 files changed, 713 insertions(+), 2218 deletions(-) delete mode 100644 docs/models/filecitationtype.md delete mode 100644 docs/models/filepathtype.md delete mode 100644 docs/models/idfileparser.md delete mode 100644 docs/models/idmoderation.md delete mode 100644 docs/models/idweb.md delete mode 100644 docs/models/openairesponsesrefusalcontenttype.md delete mode 100644 docs/models/openresponseserroreventtype.md delete mode 100644 docs/models/openresponsesimagegencallcompletedtype.md delete mode 100644 docs/models/openresponsesimagegencallgeneratingtype.md delete mode 100644 docs/models/openresponsesimagegencallinprogresstype.md delete mode 100644 docs/models/openresponsesimagegencallpartialimagetype.md delete mode 100644 docs/models/openresponsesnonstreamingresponsetype.md delete mode 100644 docs/models/openresponsesreasoningdeltaeventtype.md delete mode 100644 docs/models/openresponsesreasoningdoneeventtype.md delete mode 100644 docs/models/openresponsesreasoningsummarypartaddedeventtype.md delete mode 100644 docs/models/openresponsesreasoningsummarytextdeltaeventtype.md delete mode 100644 docs/models/openresponsesreasoningsummarytextdoneeventtype.md delete mode 100644 docs/models/openresponsesrequesttype.md delete mode 100644 docs/models/openresponseswebsearch20250826tooltype.md delete mode 100644 docs/models/openresponseswebsearchpreview20250311tooltype.md delete mode 100644 docs/models/openresponseswebsearchpreviewtooltype.md delete mode 100644 docs/models/openresponseswebsearchtooltype.md delete mode 100644 docs/models/operations/typeimageurl.md delete mode 100644 docs/models/operations/typetext.md delete mode 100644 docs/models/responseinputaudiotype.md delete mode 100644 docs/models/responseinputfiletype.md delete mode 100644 docs/models/responseinputimagetype.md delete mode 100644 docs/models/responseinputtexttype.md delete mode 100644 docs/models/responseoutputtexttype.md delete mode 100644 docs/models/responsesformatjsonobjecttype.md delete mode 100644 docs/models/responsesformattextjsonschemaconfigtype.md delete mode 100644 docs/models/responsesformattexttype.md delete mode 100644 docs/models/typeresponsecompleted.md delete mode 100644 docs/models/typeresponsecontentpartadded.md delete mode 100644 docs/models/typeresponsecontentpartdone.md delete mode 100644 docs/models/typeresponsecreated.md delete mode 100644 docs/models/typeresponsefailed.md delete mode 100644 docs/models/typeresponsefunctioncallargumentsdelta.md delete mode 100644 docs/models/typeresponsefunctioncallargumentsdone.md delete mode 100644 docs/models/typeresponseincomplete.md delete mode 100644 docs/models/typeresponseinprogress.md delete mode 100644 docs/models/typeresponseoutputitemadded.md delete mode 100644 docs/models/typeresponseoutputitemdone.md delete mode 100644 docs/models/typeresponseoutputtextannotationadded.md delete mode 100644 docs/models/typeresponseoutputtextdelta.md delete mode 100644 docs/models/typeresponseoutputtextdone.md delete mode 100644 docs/models/typeresponsereasoningsummarypartdone.md delete mode 100644 docs/models/typeresponserefusaldelta.md delete mode 100644 docs/models/typeresponserefusaldone.md delete mode 100644 docs/models/urlcitationtype.md diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index ed5f9bce..eace1ce1 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -3,10 +3,10 @@ id: 8b6cd71c-ea04-44da-af45-e43968b5928d management: docChecksum: 0ecf8d42d5f305a124cbca4ffbda5eee docVersion: 1.0.0 - speakeasyVersion: 1.660.0 - generationVersion: 2.760.2 - releaseVersion: 0.1.27 - configChecksum: 2c451c32d0e42b790ff08709ef1011b4 + speakeasyVersion: 1.666.0 + generationVersion: 2.768.0 + releaseVersion: 0.2.0 + configChecksum: 3177256c9833c29f2e39818f88d33135 repoURL: https://github.com/OpenRouterTeam/typescript-sdk.git installationURL: https://github.com/OpenRouterTeam/typescript-sdk published: true @@ -15,7 +15,7 @@ features: acceptHeaders: 2.81.2 additionalDependencies: 0.1.0 constsAndDefaults: 0.1.12 - core: 3.26.9 + core: 3.26.13 customCodeRegions: 0.1.0 defaultEnabledRetries: 0.1.0 deprecations: 2.81.1 @@ -35,11 +35,11 @@ features: openEnums: 0.1.1 responseFormat: 0.2.3 retries: 2.83.0 - sdkHooks: 0.3.0 + sdkHooks: 0.4.0 serverEvents: 0.1.12 serverEventsSentinels: 0.1.0 serverIDs: 2.81.2 - unions: 2.86.0 + unions: 2.86.3 generatedFiles: - .devcontainer/README.md - .devcontainer/devcontainer.json @@ -130,14 +130,9 @@ generatedFiles: - docs/models/errors/unauthorizedresponseerror.md - docs/models/errors/unprocessableentityresponseerror.md - docs/models/filecitation.md - - docs/models/filecitationtype.md - docs/models/filepath.md - - docs/models/filepathtype.md - docs/models/filet.md - docs/models/forbiddenresponseerrordata.md - - docs/models/idfileparser.md - - docs/models/idmoderation.md - - docs/models/idweb.md - docs/models/ignore.md - docs/models/imagegenerationstatus.md - docs/models/imageurl.md @@ -192,7 +187,6 @@ generatedFiles: - docs/models/openairesponsesreasoningconfig.md - docs/models/openairesponsesreasoningeffort.md - docs/models/openairesponsesrefusalcontent.md - - docs/models/openairesponsesrefusalcontenttype.md - docs/models/openairesponsesresponsestatus.md - docs/models/openairesponsesservicetier.md - docs/models/openairesponsestoolchoice.md @@ -215,19 +209,14 @@ generatedFiles: - docs/models/openresponseseasyinputmessageroleuser.md - docs/models/openresponseseasyinputmessagetype.md - docs/models/openresponseserrorevent.md - - docs/models/openresponseserroreventtype.md - docs/models/openresponsesfunctioncalloutput.md - docs/models/openresponsesfunctioncalloutputtype.md - docs/models/openresponsesfunctiontoolcall.md - docs/models/openresponsesfunctiontoolcalltype.md - docs/models/openresponsesimagegencallcompleted.md - - docs/models/openresponsesimagegencallcompletedtype.md - docs/models/openresponsesimagegencallgenerating.md - - docs/models/openresponsesimagegencallgeneratingtype.md - docs/models/openresponsesimagegencallinprogress.md - - docs/models/openresponsesimagegencallinprogresstype.md - docs/models/openresponsesimagegencallpartialimage.md - - docs/models/openresponsesimagegencallpartialimagetype.md - docs/models/openresponsesinput.md - docs/models/openresponsesinput1.md - docs/models/openresponsesinputmessageitem.md @@ -241,29 +230,22 @@ generatedFiles: - docs/models/openresponsesnonstreamingresponse.md - docs/models/openresponsesnonstreamingresponsetoolfunction.md - docs/models/openresponsesnonstreamingresponsetoolunion.md - - docs/models/openresponsesnonstreamingresponsetype.md - docs/models/openresponsesreasoning.md - docs/models/openresponsesreasoningconfig.md - docs/models/openresponsesreasoningdeltaevent.md - - docs/models/openresponsesreasoningdeltaeventtype.md - docs/models/openresponsesreasoningdoneevent.md - - docs/models/openresponsesreasoningdoneeventtype.md - docs/models/openresponsesreasoningformat.md - docs/models/openresponsesreasoningstatuscompleted.md - docs/models/openresponsesreasoningstatusincomplete.md - docs/models/openresponsesreasoningstatusinprogress.md - docs/models/openresponsesreasoningstatusunion.md - docs/models/openresponsesreasoningsummarypartaddedevent.md - - docs/models/openresponsesreasoningsummarypartaddedeventtype.md - docs/models/openresponsesreasoningsummarytextdeltaevent.md - - docs/models/openresponsesreasoningsummarytextdeltaeventtype.md - docs/models/openresponsesreasoningsummarytextdoneevent.md - - docs/models/openresponsesreasoningsummarytextdoneeventtype.md - docs/models/openresponsesreasoningtype.md - docs/models/openresponsesrequest.md - docs/models/openresponsesrequesttoolfunction.md - docs/models/openresponsesrequesttoolunion.md - - docs/models/openresponsesrequesttype.md - docs/models/openresponsesresponsetext.md - docs/models/openresponsesresponsetextverbosity.md - docs/models/openresponsesstreamevent.md @@ -288,14 +270,10 @@ generatedFiles: - docs/models/openresponsesusage.md - docs/models/openresponseswebsearch20250826tool.md - docs/models/openresponseswebsearch20250826toolfilters.md - - docs/models/openresponseswebsearch20250826tooltype.md - docs/models/openresponseswebsearchpreview20250311tool.md - - docs/models/openresponseswebsearchpreview20250311tooltype.md - docs/models/openresponseswebsearchpreviewtool.md - - docs/models/openresponseswebsearchpreviewtooltype.md - docs/models/openresponseswebsearchtool.md - docs/models/openresponseswebsearchtoolfilters.md - - docs/models/openresponseswebsearchtooltype.md - docs/models/operations/apitype.md - docs/models/operations/calldata.md - docs/models/operations/content.md @@ -366,8 +344,6 @@ generatedFiles: - docs/models/operations/sendchatcompletionrequestresponse.md - docs/models/operations/supportedparameter.md - docs/models/operations/transferintent.md - - docs/models/operations/typeimageurl.md - - docs/models/operations/typetext.md - docs/models/operations/updatekeysdata.md - docs/models/operations/updatekeyslimitreset.md - docs/models/operations/updatekeysrequest.md @@ -425,23 +401,15 @@ generatedFiles: - docs/models/responseinputaudio.md - docs/models/responseinputaudioformat.md - docs/models/responseinputaudioinputaudio.md - - docs/models/responseinputaudiotype.md - docs/models/responseinputfile.md - - docs/models/responseinputfiletype.md - docs/models/responseinputimage.md - docs/models/responseinputimagedetail.md - - docs/models/responseinputimagetype.md - docs/models/responseinputtext.md - - docs/models/responseinputtexttype.md - docs/models/responseoutputtext.md - - docs/models/responseoutputtexttype.md - docs/models/responseserrorfield.md - docs/models/responsesformatjsonobject.md - - docs/models/responsesformatjsonobjecttype.md - docs/models/responsesformattext.md - docs/models/responsesformattextjsonschemaconfig.md - - docs/models/responsesformattextjsonschemaconfigtype.md - - docs/models/responsesformattexttype.md - docs/models/responsesimagegenerationcall.md - docs/models/responsesimagegenerationcalltype.md - docs/models/responsesoutputitem.md @@ -491,27 +459,9 @@ generatedFiles: - docs/models/topproviderinfo.md - docs/models/truncation.md - docs/models/type.md - - docs/models/typeresponsecompleted.md - - docs/models/typeresponsecontentpartadded.md - - docs/models/typeresponsecontentpartdone.md - - docs/models/typeresponsecreated.md - - docs/models/typeresponsefailed.md - - docs/models/typeresponsefunctioncallargumentsdelta.md - - docs/models/typeresponsefunctioncallargumentsdone.md - - docs/models/typeresponseincomplete.md - - docs/models/typeresponseinprogress.md - - docs/models/typeresponseoutputitemadded.md - - docs/models/typeresponseoutputitemdone.md - - docs/models/typeresponseoutputtextannotationadded.md - - docs/models/typeresponseoutputtextdelta.md - - docs/models/typeresponseoutputtextdone.md - - docs/models/typeresponsereasoningsummarypartdone.md - - docs/models/typeresponserefusaldelta.md - - docs/models/typeresponserefusaldone.md - docs/models/unauthorizedresponseerrordata.md - docs/models/unprocessableentityresponseerrordata.md - docs/models/urlcitation.md - - docs/models/urlcitationtype.md - docs/models/usermessage.md - docs/models/usermessagecontent.md - docs/models/variables.md diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 049c4aa8..03223456 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -30,7 +30,7 @@ generation: generateNewTests: true skipResponseBodyAssertions: false typescript: - version: 0.1.27 + version: 0.2.0 acceptHeaderEnum: false additionalDependencies: dependencies: {} @@ -71,7 +71,9 @@ typescript: exportZodModelNamespace: false flattenGlobalSecurity: true flatteningOrder: parameters-first + formStringArrayEncodeMode: encoded-string forwardCompatibleEnumsByDefault: false + forwardCompatibleUnionsByDefault: "false" generateExamples: true imports: option: openapi @@ -82,6 +84,7 @@ typescript: shared: models webhooks: models/webhooks inferSSEOverload: true + inferUnionDiscriminators: true inputModelSuffix: input jsonpath: rfc9535 laxMode: strict @@ -89,8 +92,10 @@ typescript: methodArguments: infer-optional-args modelPropertyCasing: camel moduleFormat: esm + multipartArrayFormat: legacy outputModelSuffix: output packageName: '@openrouter/sdk' + preApplyUnionDiscriminators: true responseFormat: flat sseFlatResponse: true templateVersion: v2 diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 3f0d2fe6..9daba210 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,4 +1,4 @@ -speakeasyVersion: 1.660.0 +speakeasyVersion: 1.666.0 sources: OpenRouter API: sourceNamespace: open-router-chat-completions-api @@ -6,7 +6,7 @@ sources: sourceBlobDigest: sha256:4c80e48fd5e1cd030e68d664eb93984b4d5946867252ff1755a2bd2a05eccd4e tags: - latest - - matt-cache-control + - speakeasy-sdk-regen-1762734783 - 1.0.0 targets: openrouter: @@ -15,7 +15,7 @@ targets: sourceRevisionDigest: sha256:01256c8494de6bfc13c36d82ae316a6a13d402194f844618bcd4d59e34f325f3 sourceBlobDigest: sha256:4c80e48fd5e1cd030e68d664eb93984b4d5946867252ff1755a2bd2a05eccd4e codeSamplesNamespace: open-router-chat-completions-api-typescript-code-samples - codeSamplesRevisionDigest: sha256:b9f865c93ad3b73a288706cfe0cdbb54a0a2fe160c405b59bc45f567118e554a + codeSamplesRevisionDigest: sha256:4fb983d31ef998eb30f12c38e07fb278a3054a1def2a61c418d71d553c648a66 workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/RELEASES.md b/RELEASES.md index 66c880f4..5531fdbe 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -146,4 +146,14 @@ Based on: ### Generated - [typescript v0.1.2] . ### Releases -- [NPM v0.1.2] https://www.npmjs.com/package/@openrouter/sdk/v/0.1.2 - . \ No newline at end of file +- [NPM v0.1.2] https://www.npmjs.com/package/@openrouter/sdk/v/0.1.2 - . + +## 2025-12-02 00:31:49 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.666.0 (2.768.0) https://github.com/speakeasy-api/speakeasy +### Generated +- [typescript v0.2.0] . +### Releases +- [NPM v0.2.0] https://www.npmjs.com/package/@openrouter/sdk/v/0.2.0 - . \ No newline at end of file diff --git a/docs/models/assistantmessage.md b/docs/models/assistantmessage.md index 397fae22..93ce87bd 100644 --- a/docs/models/assistantmessage.md +++ b/docs/models/assistantmessage.md @@ -14,7 +14,7 @@ let value: AssistantMessage = { | Field | Type | Required | Description | | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | -| `role` | *string* | :heavy_check_mark: | N/A | +| `role` | *"assistant"* | :heavy_check_mark: | N/A | | `content` | *models.AssistantMessageContent* | :heavy_minus_sign: | N/A | | `name` | *string* | :heavy_minus_sign: | N/A | | `toolCalls` | [models.ChatMessageToolCall](../models/chatmessagetoolcall.md)[] | :heavy_minus_sign: | N/A | diff --git a/docs/models/chatgenerationparamsresponseformatjsonobject.md b/docs/models/chatgenerationparamsresponseformatjsonobject.md index 183130e2..814b5d85 100644 --- a/docs/models/chatgenerationparamsresponseformatjsonobject.md +++ b/docs/models/chatgenerationparamsresponseformatjsonobject.md @@ -14,4 +14,4 @@ let value: ChatGenerationParamsResponseFormatJSONObject = { | Field | Type | Required | Description | | ------------------ | ------------------ | ------------------ | ------------------ | -| `type` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file +| `type` | *"json_object"* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/chatgenerationparamsresponseformatpython.md b/docs/models/chatgenerationparamsresponseformatpython.md index 0d9982fa..8b822ea3 100644 --- a/docs/models/chatgenerationparamsresponseformatpython.md +++ b/docs/models/chatgenerationparamsresponseformatpython.md @@ -14,4 +14,4 @@ let value: ChatGenerationParamsResponseFormatPython = { | Field | Type | Required | Description | | ------------------ | ------------------ | ------------------ | ------------------ | -| `type` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file +| `type` | *"python"* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/chatgenerationparamsresponseformattext.md b/docs/models/chatgenerationparamsresponseformattext.md index e4cd2e76..1882e099 100644 --- a/docs/models/chatgenerationparamsresponseformattext.md +++ b/docs/models/chatgenerationparamsresponseformattext.md @@ -14,4 +14,4 @@ let value: ChatGenerationParamsResponseFormatText = { | Field | Type | Required | Description | | ------------------ | ------------------ | ------------------ | ------------------ | -| `type` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file +| `type` | *"text"* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/chatmessagecontentitemaudio.md b/docs/models/chatmessagecontentitemaudio.md index bb25a18e..e72e7a75 100644 --- a/docs/models/chatmessagecontentitemaudio.md +++ b/docs/models/chatmessagecontentitemaudio.md @@ -18,5 +18,5 @@ let value: ChatMessageContentItemAudio = { | Field | Type | Required | Description | | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -| `type` | *string* | :heavy_check_mark: | N/A | +| `type` | *"input_audio"* | :heavy_check_mark: | N/A | | `inputAudio` | [models.ChatMessageContentItemAudioInputAudio](../models/chatmessagecontentitemaudioinputaudio.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/chatmessagecontentitemfile.md b/docs/models/chatmessagecontentitemfile.md index e2b0d1fb..e234bebc 100644 --- a/docs/models/chatmessagecontentitemfile.md +++ b/docs/models/chatmessagecontentitemfile.md @@ -17,5 +17,5 @@ let value: ChatMessageContentItemFile = { | Field | Type | Required | Description | | ---------------------------------- | ---------------------------------- | ---------------------------------- | ---------------------------------- | -| `type` | *string* | :heavy_check_mark: | N/A | +| `type` | *"file"* | :heavy_check_mark: | N/A | | `file` | [models.FileT](../models/filet.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/chatmessagecontentitemimage.md b/docs/models/chatmessagecontentitemimage.md index aa9882d5..335bfe65 100644 --- a/docs/models/chatmessagecontentitemimage.md +++ b/docs/models/chatmessagecontentitemimage.md @@ -17,5 +17,5 @@ let value: ChatMessageContentItemImage = { | Field | Type | Required | Description | | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | -| `type` | *string* | :heavy_check_mark: | N/A | +| `type` | *"image_url"* | :heavy_check_mark: | N/A | | `imageUrl` | [models.ImageUrl](../models/imageurl.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/chatmessagecontentitemtext.md b/docs/models/chatmessagecontentitemtext.md index 621eef2b..4c4a53cd 100644 --- a/docs/models/chatmessagecontentitemtext.md +++ b/docs/models/chatmessagecontentitemtext.md @@ -15,5 +15,5 @@ let value: ChatMessageContentItemText = { | Field | Type | Required | Description | | ------------------ | ------------------ | ------------------ | ------------------ | -| `type` | *string* | :heavy_check_mark: | N/A | +| `type` | *"text"* | :heavy_check_mark: | N/A | | `text` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/chatmessagecontentitemvideoinputvideo.md b/docs/models/chatmessagecontentitemvideoinputvideo.md index 292a44ae..92b19432 100644 --- a/docs/models/chatmessagecontentitemvideoinputvideo.md +++ b/docs/models/chatmessagecontentitemvideoinputvideo.md @@ -17,5 +17,5 @@ let value: ChatMessageContentItemVideoInputVideo = { | Field | Type | Required | Description | | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | -| `type` | *string* | :heavy_check_mark: | N/A | +| `type` | *"input_video"* | :heavy_check_mark: | N/A | | `videoUrl` | [models.VideoURL](../models/videourl.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/chatmessagecontentitemvideovideourl.md b/docs/models/chatmessagecontentitemvideovideourl.md index c8118e04..54946715 100644 --- a/docs/models/chatmessagecontentitemvideovideourl.md +++ b/docs/models/chatmessagecontentitemvideovideourl.md @@ -17,5 +17,5 @@ let value: ChatMessageContentItemVideoVideoURL = { | Field | Type | Required | Description | | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -| `type` | *string* | :heavy_check_mark: | N/A | +| `type` | *"video_url"* | :heavy_check_mark: | N/A | | `videoUrl` | [models.ChatMessageContentItemVideoVideoUrlVideoUrl](../models/chatmessagecontentitemvideovideourlvideourl.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/chatmessagetoolcall.md b/docs/models/chatmessagetoolcall.md index 33215708..a56e6bc8 100644 --- a/docs/models/chatmessagetoolcall.md +++ b/docs/models/chatmessagetoolcall.md @@ -20,5 +20,5 @@ let value: ChatMessageToolCall = { | Field | Type | Required | Description | | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | | `id` | *string* | :heavy_check_mark: | N/A | -| `type` | *string* | :heavy_check_mark: | N/A | +| `type` | *"function"* | :heavy_check_mark: | N/A | | `function` | [models.ChatMessageToolCallFunction](../models/chatmessagetoolcallfunction.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/chatresponse.md b/docs/models/chatresponse.md index f9acf36c..2cab9bbc 100644 --- a/docs/models/chatresponse.md +++ b/docs/models/chatresponse.md @@ -22,6 +22,6 @@ let value: ChatResponse = { | `choices` | [models.ChatResponseChoice](../models/chatresponsechoice.md)[] | :heavy_check_mark: | N/A | | `created` | *number* | :heavy_check_mark: | N/A | | `model` | *string* | :heavy_check_mark: | N/A | -| `object` | *string* | :heavy_check_mark: | N/A | +| `object` | *"chat.completion"* | :heavy_check_mark: | N/A | | `systemFingerprint` | *string* | :heavy_minus_sign: | N/A | | `usage` | [models.ChatGenerationTokenUsage](../models/chatgenerationtokenusage.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/chatstreamingmessagetoolcall.md b/docs/models/chatstreamingmessagetoolcall.md index 5f7085db..d090a9e6 100644 --- a/docs/models/chatstreamingmessagetoolcall.md +++ b/docs/models/chatstreamingmessagetoolcall.md @@ -16,5 +16,5 @@ let value: ChatStreamingMessageToolCall = { | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | | `index` | *number* | :heavy_check_mark: | N/A | | `id` | *string* | :heavy_minus_sign: | N/A | -| `type` | *string* | :heavy_minus_sign: | N/A | +| `type` | *"function"* | :heavy_minus_sign: | N/A | | `function` | [models.ChatStreamingMessageToolCallFunction](../models/chatstreamingmessagetoolcallfunction.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/chatstreamingresponsechunkdata.md b/docs/models/chatstreamingresponsechunkdata.md index 550add27..65dbdc79 100644 --- a/docs/models/chatstreamingresponsechunkdata.md +++ b/docs/models/chatstreamingresponsechunkdata.md @@ -22,7 +22,7 @@ let value: ChatStreamingResponseChunkData = { | `choices` | [models.ChatStreamingChoice](../models/chatstreamingchoice.md)[] | :heavy_check_mark: | N/A | | `created` | *number* | :heavy_check_mark: | N/A | | `model` | *string* | :heavy_check_mark: | N/A | -| `object` | *string* | :heavy_check_mark: | N/A | +| `object` | *"chat.completion.chunk"* | :heavy_check_mark: | N/A | | `systemFingerprint` | *string* | :heavy_minus_sign: | N/A | | `error` | [models.ChatStreamingResponseChunkError](../models/chatstreamingresponsechunkerror.md) | :heavy_minus_sign: | N/A | | `usage` | [models.ChatGenerationTokenUsage](../models/chatgenerationtokenusage.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/completioncreateparamsresponseformatjsonobject.md b/docs/models/completioncreateparamsresponseformatjsonobject.md index 9c88b1c8..22c66a74 100644 --- a/docs/models/completioncreateparamsresponseformatjsonobject.md +++ b/docs/models/completioncreateparamsresponseformatjsonobject.md @@ -14,4 +14,4 @@ let value: CompletionCreateParamsResponseFormatJSONObject = { | Field | Type | Required | Description | | ------------------ | ------------------ | ------------------ | ------------------ | -| `type` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file +| `type` | *"json_object"* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/completioncreateparamsresponseformatpython.md b/docs/models/completioncreateparamsresponseformatpython.md index f04eadbd..ac8fe047 100644 --- a/docs/models/completioncreateparamsresponseformatpython.md +++ b/docs/models/completioncreateparamsresponseformatpython.md @@ -14,4 +14,4 @@ let value: CompletionCreateParamsResponseFormatPython = { | Field | Type | Required | Description | | ------------------ | ------------------ | ------------------ | ------------------ | -| `type` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file +| `type` | *"python"* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/completioncreateparamsresponseformattext.md b/docs/models/completioncreateparamsresponseformattext.md index 5a182dda..5b405e04 100644 --- a/docs/models/completioncreateparamsresponseformattext.md +++ b/docs/models/completioncreateparamsresponseformattext.md @@ -14,4 +14,4 @@ let value: CompletionCreateParamsResponseFormatText = { | Field | Type | Required | Description | | ------------------ | ------------------ | ------------------ | ------------------ | -| `type` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file +| `type` | *"text"* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/completionresponse.md b/docs/models/completionresponse.md index 325daa5c..c559bb24 100644 --- a/docs/models/completionresponse.md +++ b/docs/models/completionresponse.md @@ -19,7 +19,7 @@ let value: CompletionResponse = { | Field | Type | Required | Description | | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | | `id` | *string* | :heavy_check_mark: | N/A | -| `object` | *string* | :heavy_check_mark: | N/A | +| `object` | *"text_completion"* | :heavy_check_mark: | N/A | | `created` | *number* | :heavy_check_mark: | N/A | | `model` | *string* | :heavy_check_mark: | N/A | | `systemFingerprint` | *string* | :heavy_minus_sign: | N/A | diff --git a/docs/models/filecitation.md b/docs/models/filecitation.md index 892579f7..adfa205a 100644 --- a/docs/models/filecitation.md +++ b/docs/models/filecitation.md @@ -15,9 +15,9 @@ let value: FileCitation = { ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -| `type` | [models.FileCitationType](../models/filecitationtype.md) | :heavy_check_mark: | N/A | -| `fileId` | *string* | :heavy_check_mark: | N/A | -| `filename` | *string* | :heavy_check_mark: | N/A | -| `index` | *number* | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `type` | *"file_citation"* | :heavy_check_mark: | N/A | +| `fileId` | *string* | :heavy_check_mark: | N/A | +| `filename` | *string* | :heavy_check_mark: | N/A | +| `index` | *number* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/filecitationtype.md b/docs/models/filecitationtype.md deleted file mode 100644 index a7b13048..00000000 --- a/docs/models/filecitationtype.md +++ /dev/null @@ -1,15 +0,0 @@ -# FileCitationType - -## Example Usage - -```typescript -import { FileCitationType } from "@openrouter/sdk/models"; - -let value: FileCitationType = "file_citation"; -``` - -## Values - -```typescript -"file_citation" -``` \ No newline at end of file diff --git a/docs/models/filepath.md b/docs/models/filepath.md index 3f7cd3b1..1401b28f 100644 --- a/docs/models/filepath.md +++ b/docs/models/filepath.md @@ -14,8 +14,8 @@ let value: FilePath = { ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | -| `type` | [models.FilePathType](../models/filepathtype.md) | :heavy_check_mark: | N/A | -| `fileId` | *string* | :heavy_check_mark: | N/A | -| `index` | *number* | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `type` | *"file_path"* | :heavy_check_mark: | N/A | +| `fileId` | *string* | :heavy_check_mark: | N/A | +| `index` | *number* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/filepathtype.md b/docs/models/filepathtype.md deleted file mode 100644 index 8d73e233..00000000 --- a/docs/models/filepathtype.md +++ /dev/null @@ -1,15 +0,0 @@ -# FilePathType - -## Example Usage - -```typescript -import { FilePathType } from "@openrouter/sdk/models"; - -let value: FilePathType = "file_path"; -``` - -## Values - -```typescript -"file_path" -``` \ No newline at end of file diff --git a/docs/models/idfileparser.md b/docs/models/idfileparser.md deleted file mode 100644 index be3f38d0..00000000 --- a/docs/models/idfileparser.md +++ /dev/null @@ -1,15 +0,0 @@ -# IdFileParser - -## Example Usage - -```typescript -import { IdFileParser } from "@openrouter/sdk/models"; - -let value: IdFileParser = "file-parser"; -``` - -## Values - -```typescript -"file-parser" -``` \ No newline at end of file diff --git a/docs/models/idmoderation.md b/docs/models/idmoderation.md deleted file mode 100644 index 231b5f86..00000000 --- a/docs/models/idmoderation.md +++ /dev/null @@ -1,15 +0,0 @@ -# IdModeration - -## Example Usage - -```typescript -import { IdModeration } from "@openrouter/sdk/models"; - -let value: IdModeration = "moderation"; -``` - -## Values - -```typescript -"moderation" -``` \ No newline at end of file diff --git a/docs/models/idweb.md b/docs/models/idweb.md deleted file mode 100644 index b7fa3a36..00000000 --- a/docs/models/idweb.md +++ /dev/null @@ -1,15 +0,0 @@ -# IdWeb - -## Example Usage - -```typescript -import { IdWeb } from "@openrouter/sdk/models"; - -let value: IdWeb = "web"; -``` - -## Values - -```typescript -"web" -``` \ No newline at end of file diff --git a/docs/models/messagedeveloper.md b/docs/models/messagedeveloper.md index b695c064..7ea3ecb5 100644 --- a/docs/models/messagedeveloper.md +++ b/docs/models/messagedeveloper.md @@ -15,6 +15,6 @@ let value: MessageDeveloper = { | Field | Type | Required | Description | | ----------------------- | ----------------------- | ----------------------- | ----------------------- | -| `role` | *string* | :heavy_check_mark: | N/A | +| `role` | *"developer"* | :heavy_check_mark: | N/A | | `content` | *models.MessageContent* | :heavy_check_mark: | N/A | | `name` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/namedtoolchoice.md b/docs/models/namedtoolchoice.md index 1e9383c4..a1fb1102 100644 --- a/docs/models/namedtoolchoice.md +++ b/docs/models/namedtoolchoice.md @@ -17,5 +17,5 @@ let value: NamedToolChoice = { | Field | Type | Required | Description | | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | -| `type` | *string* | :heavy_check_mark: | N/A | +| `type` | *"function"* | :heavy_check_mark: | N/A | | `function` | [models.NamedToolChoiceFunction](../models/namedtoolchoicefunction.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/openairesponsesrefusalcontent.md b/docs/models/openairesponsesrefusalcontent.md index 4ba066a5..6e2def30 100644 --- a/docs/models/openairesponsesrefusalcontent.md +++ b/docs/models/openairesponsesrefusalcontent.md @@ -13,7 +13,7 @@ let value: OpenAIResponsesRefusalContent = { ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | -| `type` | [models.OpenAIResponsesRefusalContentType](../models/openairesponsesrefusalcontenttype.md) | :heavy_check_mark: | N/A | -| `refusal` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `type` | *"refusal"* | :heavy_check_mark: | N/A | +| `refusal` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/openairesponsesrefusalcontenttype.md b/docs/models/openairesponsesrefusalcontenttype.md deleted file mode 100644 index 33d435d2..00000000 --- a/docs/models/openairesponsesrefusalcontenttype.md +++ /dev/null @@ -1,15 +0,0 @@ -# OpenAIResponsesRefusalContentType - -## Example Usage - -```typescript -import { OpenAIResponsesRefusalContentType } from "@openrouter/sdk/models"; - -let value: OpenAIResponsesRefusalContentType = "refusal"; -``` - -## Values - -```typescript -"refusal" -``` \ No newline at end of file diff --git a/docs/models/openresponseserrorevent.md b/docs/models/openresponseserrorevent.md index e0b958e6..2f7c6c1c 100644 --- a/docs/models/openresponseserrorevent.md +++ b/docs/models/openresponseserrorevent.md @@ -18,10 +18,10 @@ let value: OpenResponsesErrorEvent = { ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | -| `type` | [models.OpenResponsesErrorEventType](../models/openresponseserroreventtype.md) | :heavy_check_mark: | N/A | -| `code` | *string* | :heavy_check_mark: | N/A | -| `message` | *string* | :heavy_check_mark: | N/A | -| `param` | *string* | :heavy_check_mark: | N/A | -| `sequenceNumber` | *number* | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `type` | *"error"* | :heavy_check_mark: | N/A | +| `code` | *string* | :heavy_check_mark: | N/A | +| `message` | *string* | :heavy_check_mark: | N/A | +| `param` | *string* | :heavy_check_mark: | N/A | +| `sequenceNumber` | *number* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/openresponseserroreventtype.md b/docs/models/openresponseserroreventtype.md deleted file mode 100644 index 1d2c02c4..00000000 --- a/docs/models/openresponseserroreventtype.md +++ /dev/null @@ -1,15 +0,0 @@ -# OpenResponsesErrorEventType - -## Example Usage - -```typescript -import { OpenResponsesErrorEventType } from "@openrouter/sdk/models"; - -let value: OpenResponsesErrorEventType = "error"; -``` - -## Values - -```typescript -"error" -``` \ No newline at end of file diff --git a/docs/models/openresponsesimagegencallcompleted.md b/docs/models/openresponsesimagegencallcompleted.md index ca3618f8..da20b2b6 100644 --- a/docs/models/openresponsesimagegencallcompleted.md +++ b/docs/models/openresponsesimagegencallcompleted.md @@ -17,9 +17,9 @@ let value: OpenResponsesImageGenCallCompleted = { ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | -| `type` | [models.OpenResponsesImageGenCallCompletedType](../models/openresponsesimagegencallcompletedtype.md) | :heavy_check_mark: | N/A | -| `itemId` | *string* | :heavy_check_mark: | N/A | -| `outputIndex` | *number* | :heavy_check_mark: | N/A | -| `sequenceNumber` | *number* | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | +| `type` | *"response.image_generation_call.completed"* | :heavy_check_mark: | N/A | +| `itemId` | *string* | :heavy_check_mark: | N/A | +| `outputIndex` | *number* | :heavy_check_mark: | N/A | +| `sequenceNumber` | *number* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/openresponsesimagegencallcompletedtype.md b/docs/models/openresponsesimagegencallcompletedtype.md deleted file mode 100644 index 91c408e4..00000000 --- a/docs/models/openresponsesimagegencallcompletedtype.md +++ /dev/null @@ -1,16 +0,0 @@ -# OpenResponsesImageGenCallCompletedType - -## Example Usage - -```typescript -import { OpenResponsesImageGenCallCompletedType } from "@openrouter/sdk/models"; - -let value: OpenResponsesImageGenCallCompletedType = - "response.image_generation_call.completed"; -``` - -## Values - -```typescript -"response.image_generation_call.completed" -``` \ No newline at end of file diff --git a/docs/models/openresponsesimagegencallgenerating.md b/docs/models/openresponsesimagegencallgenerating.md index 812305fd..9764abb6 100644 --- a/docs/models/openresponsesimagegencallgenerating.md +++ b/docs/models/openresponsesimagegencallgenerating.md @@ -17,9 +17,9 @@ let value: OpenResponsesImageGenCallGenerating = { ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | -| `type` | [models.OpenResponsesImageGenCallGeneratingType](../models/openresponsesimagegencallgeneratingtype.md) | :heavy_check_mark: | N/A | -| `itemId` | *string* | :heavy_check_mark: | N/A | -| `outputIndex` | *number* | :heavy_check_mark: | N/A | -| `sequenceNumber` | *number* | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | +| `type` | *"response.image_generation_call.generating"* | :heavy_check_mark: | N/A | +| `itemId` | *string* | :heavy_check_mark: | N/A | +| `outputIndex` | *number* | :heavy_check_mark: | N/A | +| `sequenceNumber` | *number* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/openresponsesimagegencallgeneratingtype.md b/docs/models/openresponsesimagegencallgeneratingtype.md deleted file mode 100644 index 51b8bfde..00000000 --- a/docs/models/openresponsesimagegencallgeneratingtype.md +++ /dev/null @@ -1,16 +0,0 @@ -# OpenResponsesImageGenCallGeneratingType - -## Example Usage - -```typescript -import { OpenResponsesImageGenCallGeneratingType } from "@openrouter/sdk/models"; - -let value: OpenResponsesImageGenCallGeneratingType = - "response.image_generation_call.generating"; -``` - -## Values - -```typescript -"response.image_generation_call.generating" -``` \ No newline at end of file diff --git a/docs/models/openresponsesimagegencallinprogress.md b/docs/models/openresponsesimagegencallinprogress.md index 37892214..8314f08b 100644 --- a/docs/models/openresponsesimagegencallinprogress.md +++ b/docs/models/openresponsesimagegencallinprogress.md @@ -17,9 +17,9 @@ let value: OpenResponsesImageGenCallInProgress = { ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | -| `type` | [models.OpenResponsesImageGenCallInProgressType](../models/openresponsesimagegencallinprogresstype.md) | :heavy_check_mark: | N/A | -| `itemId` | *string* | :heavy_check_mark: | N/A | -| `outputIndex` | *number* | :heavy_check_mark: | N/A | -| `sequenceNumber` | *number* | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | +| `type` | *"response.image_generation_call.in_progress"* | :heavy_check_mark: | N/A | +| `itemId` | *string* | :heavy_check_mark: | N/A | +| `outputIndex` | *number* | :heavy_check_mark: | N/A | +| `sequenceNumber` | *number* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/openresponsesimagegencallinprogresstype.md b/docs/models/openresponsesimagegencallinprogresstype.md deleted file mode 100644 index 34035740..00000000 --- a/docs/models/openresponsesimagegencallinprogresstype.md +++ /dev/null @@ -1,16 +0,0 @@ -# OpenResponsesImageGenCallInProgressType - -## Example Usage - -```typescript -import { OpenResponsesImageGenCallInProgressType } from "@openrouter/sdk/models"; - -let value: OpenResponsesImageGenCallInProgressType = - "response.image_generation_call.in_progress"; -``` - -## Values - -```typescript -"response.image_generation_call.in_progress" -``` \ No newline at end of file diff --git a/docs/models/openresponsesimagegencallpartialimage.md b/docs/models/openresponsesimagegencallpartialimage.md index 53c1c2f3..78fe0e8d 100644 --- a/docs/models/openresponsesimagegencallpartialimage.md +++ b/docs/models/openresponsesimagegencallpartialimage.md @@ -19,11 +19,11 @@ let value: OpenResponsesImageGenCallPartialImage = { ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | -| `type` | [models.OpenResponsesImageGenCallPartialImageType](../models/openresponsesimagegencallpartialimagetype.md) | :heavy_check_mark: | N/A | -| `itemId` | *string* | :heavy_check_mark: | N/A | -| `outputIndex` | *number* | :heavy_check_mark: | N/A | -| `sequenceNumber` | *number* | :heavy_check_mark: | N/A | -| `partialImageB64` | *string* | :heavy_check_mark: | N/A | -| `partialImageIndex` | *number* | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | +| `type` | *"response.image_generation_call.partial_image"* | :heavy_check_mark: | N/A | +| `itemId` | *string* | :heavy_check_mark: | N/A | +| `outputIndex` | *number* | :heavy_check_mark: | N/A | +| `sequenceNumber` | *number* | :heavy_check_mark: | N/A | +| `partialImageB64` | *string* | :heavy_check_mark: | N/A | +| `partialImageIndex` | *number* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/openresponsesimagegencallpartialimagetype.md b/docs/models/openresponsesimagegencallpartialimagetype.md deleted file mode 100644 index b8e1869a..00000000 --- a/docs/models/openresponsesimagegencallpartialimagetype.md +++ /dev/null @@ -1,16 +0,0 @@ -# OpenResponsesImageGenCallPartialImageType - -## Example Usage - -```typescript -import { OpenResponsesImageGenCallPartialImageType } from "@openrouter/sdk/models"; - -let value: OpenResponsesImageGenCallPartialImageType = - "response.image_generation_call.partial_image"; -``` - -## Values - -```typescript -"response.image_generation_call.partial_image" -``` \ No newline at end of file diff --git a/docs/models/openresponsesnonstreamingresponsetoolfunction.md b/docs/models/openresponsesnonstreamingresponsetoolfunction.md index 78454132..db249bb9 100644 --- a/docs/models/openresponsesnonstreamingresponsetoolfunction.md +++ b/docs/models/openresponsesnonstreamingresponsetoolfunction.md @@ -35,10 +35,10 @@ let value: OpenResponsesNonStreamingResponseToolFunction = { ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -| `type` | [models.OpenResponsesNonStreamingResponseType](../models/openresponsesnonstreamingresponsetype.md) | :heavy_check_mark: | N/A | -| `name` | *string* | :heavy_check_mark: | N/A | -| `description` | *string* | :heavy_minus_sign: | N/A | -| `strict` | *boolean* | :heavy_minus_sign: | N/A | -| `parameters` | Record | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| --------------------- | --------------------- | --------------------- | --------------------- | +| `type` | *"function"* | :heavy_check_mark: | N/A | +| `name` | *string* | :heavy_check_mark: | N/A | +| `description` | *string* | :heavy_minus_sign: | N/A | +| `strict` | *boolean* | :heavy_minus_sign: | N/A | +| `parameters` | Record | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/openresponsesnonstreamingresponsetype.md b/docs/models/openresponsesnonstreamingresponsetype.md deleted file mode 100644 index 4cb0cd83..00000000 --- a/docs/models/openresponsesnonstreamingresponsetype.md +++ /dev/null @@ -1,15 +0,0 @@ -# OpenResponsesNonStreamingResponseType - -## Example Usage - -```typescript -import { OpenResponsesNonStreamingResponseType } from "@openrouter/sdk/models"; - -let value: OpenResponsesNonStreamingResponseType = "function"; -``` - -## Values - -```typescript -"function" -``` \ No newline at end of file diff --git a/docs/models/openresponsesreasoningdeltaevent.md b/docs/models/openresponsesreasoningdeltaevent.md index a3040807..e76dc175 100644 --- a/docs/models/openresponsesreasoningdeltaevent.md +++ b/docs/models/openresponsesreasoningdeltaevent.md @@ -19,11 +19,11 @@ let value: OpenResponsesReasoningDeltaEvent = { ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | -| `type` | [models.OpenResponsesReasoningDeltaEventType](../models/openresponsesreasoningdeltaeventtype.md) | :heavy_check_mark: | N/A | -| `outputIndex` | *number* | :heavy_check_mark: | N/A | -| `itemId` | *string* | :heavy_check_mark: | N/A | -| `contentIndex` | *number* | :heavy_check_mark: | N/A | -| `delta` | *string* | :heavy_check_mark: | N/A | -| `sequenceNumber` | *number* | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| --------------------------------- | --------------------------------- | --------------------------------- | --------------------------------- | +| `type` | *"response.reasoning_text.delta"* | :heavy_check_mark: | N/A | +| `outputIndex` | *number* | :heavy_check_mark: | N/A | +| `itemId` | *string* | :heavy_check_mark: | N/A | +| `contentIndex` | *number* | :heavy_check_mark: | N/A | +| `delta` | *string* | :heavy_check_mark: | N/A | +| `sequenceNumber` | *number* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/openresponsesreasoningdeltaeventtype.md b/docs/models/openresponsesreasoningdeltaeventtype.md deleted file mode 100644 index 68421441..00000000 --- a/docs/models/openresponsesreasoningdeltaeventtype.md +++ /dev/null @@ -1,16 +0,0 @@ -# OpenResponsesReasoningDeltaEventType - -## Example Usage - -```typescript -import { OpenResponsesReasoningDeltaEventType } from "@openrouter/sdk/models"; - -let value: OpenResponsesReasoningDeltaEventType = - "response.reasoning_text.delta"; -``` - -## Values - -```typescript -"response.reasoning_text.delta" -``` \ No newline at end of file diff --git a/docs/models/openresponsesreasoningdoneevent.md b/docs/models/openresponsesreasoningdoneevent.md index d6a84c71..75667ccc 100644 --- a/docs/models/openresponsesreasoningdoneevent.md +++ b/docs/models/openresponsesreasoningdoneevent.md @@ -20,11 +20,11 @@ let value: OpenResponsesReasoningDoneEvent = { ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | -| `type` | [models.OpenResponsesReasoningDoneEventType](../models/openresponsesreasoningdoneeventtype.md) | :heavy_check_mark: | N/A | -| `outputIndex` | *number* | :heavy_check_mark: | N/A | -| `itemId` | *string* | :heavy_check_mark: | N/A | -| `contentIndex` | *number* | :heavy_check_mark: | N/A | -| `text` | *string* | :heavy_check_mark: | N/A | -| `sequenceNumber` | *number* | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | +| `type` | *"response.reasoning_text.done"* | :heavy_check_mark: | N/A | +| `outputIndex` | *number* | :heavy_check_mark: | N/A | +| `itemId` | *string* | :heavy_check_mark: | N/A | +| `contentIndex` | *number* | :heavy_check_mark: | N/A | +| `text` | *string* | :heavy_check_mark: | N/A | +| `sequenceNumber` | *number* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/openresponsesreasoningdoneeventtype.md b/docs/models/openresponsesreasoningdoneeventtype.md deleted file mode 100644 index ac02e7c3..00000000 --- a/docs/models/openresponsesreasoningdoneeventtype.md +++ /dev/null @@ -1,15 +0,0 @@ -# OpenResponsesReasoningDoneEventType - -## Example Usage - -```typescript -import { OpenResponsesReasoningDoneEventType } from "@openrouter/sdk/models"; - -let value: OpenResponsesReasoningDoneEventType = "response.reasoning_text.done"; -``` - -## Values - -```typescript -"response.reasoning_text.done" -``` \ No newline at end of file diff --git a/docs/models/openresponsesreasoningsummarypartaddedevent.md b/docs/models/openresponsesreasoningsummarypartaddedevent.md index 90634fff..d7561a17 100644 --- a/docs/models/openresponsesreasoningsummarypartaddedevent.md +++ b/docs/models/openresponsesreasoningsummarypartaddedevent.md @@ -22,11 +22,11 @@ let value: OpenResponsesReasoningSummaryPartAddedEvent = { ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | -| `type` | [models.OpenResponsesReasoningSummaryPartAddedEventType](../models/openresponsesreasoningsummarypartaddedeventtype.md) | :heavy_check_mark: | N/A | | -| `outputIndex` | *number* | :heavy_check_mark: | N/A | | -| `itemId` | *string* | :heavy_check_mark: | N/A | | -| `summaryIndex` | *number* | :heavy_check_mark: | N/A | | -| `part` | [models.ReasoningSummaryText](../models/reasoningsummarytext.md) | :heavy_check_mark: | N/A | {
"type": "summary_text",
"text": "Analyzed the problem using first principles"
} | -| `sequenceNumber` | *number* | :heavy_check_mark: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | +| `type` | *"response.reasoning_summary_part.added"* | :heavy_check_mark: | N/A | | +| `outputIndex` | *number* | :heavy_check_mark: | N/A | | +| `itemId` | *string* | :heavy_check_mark: | N/A | | +| `summaryIndex` | *number* | :heavy_check_mark: | N/A | | +| `part` | [models.ReasoningSummaryText](../models/reasoningsummarytext.md) | :heavy_check_mark: | N/A | {
"type": "summary_text",
"text": "Analyzed the problem using first principles"
} | +| `sequenceNumber` | *number* | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/openresponsesreasoningsummarypartaddedeventtype.md b/docs/models/openresponsesreasoningsummarypartaddedeventtype.md deleted file mode 100644 index 365c3bfe..00000000 --- a/docs/models/openresponsesreasoningsummarypartaddedeventtype.md +++ /dev/null @@ -1,16 +0,0 @@ -# OpenResponsesReasoningSummaryPartAddedEventType - -## Example Usage - -```typescript -import { OpenResponsesReasoningSummaryPartAddedEventType } from "@openrouter/sdk/models"; - -let value: OpenResponsesReasoningSummaryPartAddedEventType = - "response.reasoning_summary_part.added"; -``` - -## Values - -```typescript -"response.reasoning_summary_part.added" -``` \ No newline at end of file diff --git a/docs/models/openresponsesreasoningsummarytextdeltaevent.md b/docs/models/openresponsesreasoningsummarytextdeltaevent.md index dc385172..86a83262 100644 --- a/docs/models/openresponsesreasoningsummarytextdeltaevent.md +++ b/docs/models/openresponsesreasoningsummarytextdeltaevent.md @@ -19,11 +19,11 @@ let value: OpenResponsesReasoningSummaryTextDeltaEvent = { ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | -| `type` | [models.OpenResponsesReasoningSummaryTextDeltaEventType](../models/openresponsesreasoningsummarytextdeltaeventtype.md) | :heavy_check_mark: | N/A | -| `itemId` | *string* | :heavy_check_mark: | N/A | -| `outputIndex` | *number* | :heavy_check_mark: | N/A | -| `summaryIndex` | *number* | :heavy_check_mark: | N/A | -| `delta` | *string* | :heavy_check_mark: | N/A | -| `sequenceNumber` | *number* | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | +| `type` | *"response.reasoning_summary_text.delta"* | :heavy_check_mark: | N/A | +| `itemId` | *string* | :heavy_check_mark: | N/A | +| `outputIndex` | *number* | :heavy_check_mark: | N/A | +| `summaryIndex` | *number* | :heavy_check_mark: | N/A | +| `delta` | *string* | :heavy_check_mark: | N/A | +| `sequenceNumber` | *number* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/openresponsesreasoningsummarytextdeltaeventtype.md b/docs/models/openresponsesreasoningsummarytextdeltaeventtype.md deleted file mode 100644 index 5d7245d7..00000000 --- a/docs/models/openresponsesreasoningsummarytextdeltaeventtype.md +++ /dev/null @@ -1,16 +0,0 @@ -# OpenResponsesReasoningSummaryTextDeltaEventType - -## Example Usage - -```typescript -import { OpenResponsesReasoningSummaryTextDeltaEventType } from "@openrouter/sdk/models"; - -let value: OpenResponsesReasoningSummaryTextDeltaEventType = - "response.reasoning_summary_text.delta"; -``` - -## Values - -```typescript -"response.reasoning_summary_text.delta" -``` \ No newline at end of file diff --git a/docs/models/openresponsesreasoningsummarytextdoneevent.md b/docs/models/openresponsesreasoningsummarytextdoneevent.md index a8ff5002..458d59b3 100644 --- a/docs/models/openresponsesreasoningsummarytextdoneevent.md +++ b/docs/models/openresponsesreasoningsummarytextdoneevent.md @@ -19,11 +19,11 @@ let value: OpenResponsesReasoningSummaryTextDoneEvent = { ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `type` | [models.OpenResponsesReasoningSummaryTextDoneEventType](../models/openresponsesreasoningsummarytextdoneeventtype.md) | :heavy_check_mark: | N/A | -| `itemId` | *string* | :heavy_check_mark: | N/A | -| `outputIndex` | *number* | :heavy_check_mark: | N/A | -| `summaryIndex` | *number* | :heavy_check_mark: | N/A | -| `text` | *string* | :heavy_check_mark: | N/A | -| `sequenceNumber` | *number* | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | +| `type` | *"response.reasoning_summary_text.done"* | :heavy_check_mark: | N/A | +| `itemId` | *string* | :heavy_check_mark: | N/A | +| `outputIndex` | *number* | :heavy_check_mark: | N/A | +| `summaryIndex` | *number* | :heavy_check_mark: | N/A | +| `text` | *string* | :heavy_check_mark: | N/A | +| `sequenceNumber` | *number* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/openresponsesreasoningsummarytextdoneeventtype.md b/docs/models/openresponsesreasoningsummarytextdoneeventtype.md deleted file mode 100644 index eb399877..00000000 --- a/docs/models/openresponsesreasoningsummarytextdoneeventtype.md +++ /dev/null @@ -1,16 +0,0 @@ -# OpenResponsesReasoningSummaryTextDoneEventType - -## Example Usage - -```typescript -import { OpenResponsesReasoningSummaryTextDoneEventType } from "@openrouter/sdk/models"; - -let value: OpenResponsesReasoningSummaryTextDoneEventType = - "response.reasoning_summary_text.done"; -``` - -## Values - -```typescript -"response.reasoning_summary_text.done" -``` \ No newline at end of file diff --git a/docs/models/openresponsesrequesttoolfunction.md b/docs/models/openresponsesrequesttoolfunction.md index db8c2b4b..ca21d15d 100644 --- a/docs/models/openresponsesrequesttoolfunction.md +++ b/docs/models/openresponsesrequesttoolfunction.md @@ -35,10 +35,10 @@ let value: OpenResponsesRequestToolFunction = { ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | -| `type` | [models.OpenResponsesRequestType](../models/openresponsesrequesttype.md) | :heavy_check_mark: | N/A | -| `name` | *string* | :heavy_check_mark: | N/A | -| `description` | *string* | :heavy_minus_sign: | N/A | -| `strict` | *boolean* | :heavy_minus_sign: | N/A | -| `parameters` | Record | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| --------------------- | --------------------- | --------------------- | --------------------- | +| `type` | *"function"* | :heavy_check_mark: | N/A | +| `name` | *string* | :heavy_check_mark: | N/A | +| `description` | *string* | :heavy_minus_sign: | N/A | +| `strict` | *boolean* | :heavy_minus_sign: | N/A | +| `parameters` | Record | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/openresponsesrequesttype.md b/docs/models/openresponsesrequesttype.md deleted file mode 100644 index bdc7ee89..00000000 --- a/docs/models/openresponsesrequesttype.md +++ /dev/null @@ -1,15 +0,0 @@ -# OpenResponsesRequestType - -## Example Usage - -```typescript -import { OpenResponsesRequestType } from "@openrouter/sdk/models"; - -let value: OpenResponsesRequestType = "function"; -``` - -## Values - -```typescript -"function" -``` \ No newline at end of file diff --git a/docs/models/openresponsesstreameventresponsecompleted.md b/docs/models/openresponsesstreameventresponsecompleted.md index 78df7289..fb9d4c85 100644 --- a/docs/models/openresponsesstreameventresponsecompleted.md +++ b/docs/models/openresponsesstreameventresponsecompleted.md @@ -45,6 +45,6 @@ let value: OpenResponsesStreamEventResponseCompleted = { | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `type` | [models.TypeResponseCompleted](../models/typeresponsecompleted.md) | :heavy_check_mark: | N/A | | +| `type` | *"response.completed"* | :heavy_check_mark: | N/A | | | `response` | [models.OpenResponsesNonStreamingResponse](../models/openresponsesnonstreamingresponse.md) | :heavy_check_mark: | Complete non-streaming response from the Responses API | {
"id": "resp-abc123",
"object": "response",
"created_at": 1704067200,
"model": "gpt-4",
"status": "completed",
"output": [
{
"type": "message",
"id": "msg-abc123",
"status": "completed",
"role": "assistant",
"content": [
{
"type": "output_text",
"text": "Hello! How can I help you today?",
"annotations": []
}
]
}
],
"usage": {
"input_tokens": 10,
"output_tokens": 25,
"total_tokens": 35,
"input_tokens_details": {
"cached_tokens": 0
},
"output_tokens_details": {
"reasoning_tokens": 0
}
},
"tools": [],
"tool_choice": "auto",
"parallel_tool_calls": true,
"error": null,
"incomplete_details": null,
"temperature": null,
"top_p": null,
"max_output_tokens": null,
"metadata": null,
"instructions": null
} | | `sequenceNumber` | *number* | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/openresponsesstreameventresponsecontentpartadded.md b/docs/models/openresponsesstreameventresponsecontentpartadded.md index be64779a..c8d189a5 100644 --- a/docs/models/openresponsesstreameventresponsecontentpartadded.md +++ b/docs/models/openresponsesstreameventresponsecontentpartadded.md @@ -22,11 +22,11 @@ let value: OpenResponsesStreamEventResponseContentPartAdded = { ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -| `type` | [models.TypeResponseContentPartAdded](../models/typeresponsecontentpartadded.md) | :heavy_check_mark: | N/A | -| `outputIndex` | *number* | :heavy_check_mark: | N/A | -| `itemId` | *string* | :heavy_check_mark: | N/A | -| `contentIndex` | *number* | :heavy_check_mark: | N/A | -| `part` | *models.Part1* | :heavy_check_mark: | N/A | -| `sequenceNumber` | *number* | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `type` | *"response.content_part.added"* | :heavy_check_mark: | N/A | +| `outputIndex` | *number* | :heavy_check_mark: | N/A | +| `itemId` | *string* | :heavy_check_mark: | N/A | +| `contentIndex` | *number* | :heavy_check_mark: | N/A | +| `part` | *models.Part1* | :heavy_check_mark: | N/A | +| `sequenceNumber` | *number* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/openresponsesstreameventresponsecontentpartdone.md b/docs/models/openresponsesstreameventresponsecontentpartdone.md index 4d07ca6d..107bc14e 100644 --- a/docs/models/openresponsesstreameventresponsecontentpartdone.md +++ b/docs/models/openresponsesstreameventresponsecontentpartdone.md @@ -22,11 +22,11 @@ let value: OpenResponsesStreamEventResponseContentPartDone = { ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | -| `type` | [models.TypeResponseContentPartDone](../models/typeresponsecontentpartdone.md) | :heavy_check_mark: | N/A | -| `outputIndex` | *number* | :heavy_check_mark: | N/A | -| `itemId` | *string* | :heavy_check_mark: | N/A | -| `contentIndex` | *number* | :heavy_check_mark: | N/A | -| `part` | *models.Part2* | :heavy_check_mark: | N/A | -| `sequenceNumber` | *number* | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ | +| `type` | *"response.content_part.done"* | :heavy_check_mark: | N/A | +| `outputIndex` | *number* | :heavy_check_mark: | N/A | +| `itemId` | *string* | :heavy_check_mark: | N/A | +| `contentIndex` | *number* | :heavy_check_mark: | N/A | +| `part` | *models.Part2* | :heavy_check_mark: | N/A | +| `sequenceNumber` | *number* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/openresponsesstreameventresponsecreated.md b/docs/models/openresponsesstreameventresponsecreated.md index 6979157b..5edc0ed7 100644 --- a/docs/models/openresponsesstreameventresponsecreated.md +++ b/docs/models/openresponsesstreameventresponsecreated.md @@ -33,6 +33,6 @@ let value: OpenResponsesStreamEventResponseCreated = { | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `type` | [models.TypeResponseCreated](../models/typeresponsecreated.md) | :heavy_check_mark: | N/A | | +| `type` | *"response.created"* | :heavy_check_mark: | N/A | | | `response` | [models.OpenResponsesNonStreamingResponse](../models/openresponsesnonstreamingresponse.md) | :heavy_check_mark: | Complete non-streaming response from the Responses API | {
"id": "resp-abc123",
"object": "response",
"created_at": 1704067200,
"model": "gpt-4",
"status": "completed",
"output": [
{
"type": "message",
"id": "msg-abc123",
"status": "completed",
"role": "assistant",
"content": [
{
"type": "output_text",
"text": "Hello! How can I help you today?",
"annotations": []
}
]
}
],
"usage": {
"input_tokens": 10,
"output_tokens": 25,
"total_tokens": 35,
"input_tokens_details": {
"cached_tokens": 0
},
"output_tokens_details": {
"reasoning_tokens": 0
}
},
"tools": [],
"tool_choice": "auto",
"parallel_tool_calls": true,
"error": null,
"incomplete_details": null,
"temperature": null,
"top_p": null,
"max_output_tokens": null,
"metadata": null,
"instructions": null
} | | `sequenceNumber` | *number* | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/openresponsesstreameventresponsefailed.md b/docs/models/openresponsesstreameventresponsefailed.md index 651c831d..e9ec0bad 100644 --- a/docs/models/openresponsesstreameventresponsefailed.md +++ b/docs/models/openresponsesstreameventresponsefailed.md @@ -33,6 +33,6 @@ let value: OpenResponsesStreamEventResponseFailed = { | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `type` | [models.TypeResponseFailed](../models/typeresponsefailed.md) | :heavy_check_mark: | N/A | | +| `type` | *"response.failed"* | :heavy_check_mark: | N/A | | | `response` | [models.OpenResponsesNonStreamingResponse](../models/openresponsesnonstreamingresponse.md) | :heavy_check_mark: | Complete non-streaming response from the Responses API | {
"id": "resp-abc123",
"object": "response",
"created_at": 1704067200,
"model": "gpt-4",
"status": "completed",
"output": [
{
"type": "message",
"id": "msg-abc123",
"status": "completed",
"role": "assistant",
"content": [
{
"type": "output_text",
"text": "Hello! How can I help you today?",
"annotations": []
}
]
}
],
"usage": {
"input_tokens": 10,
"output_tokens": 25,
"total_tokens": 35,
"input_tokens_details": {
"cached_tokens": 0
},
"output_tokens_details": {
"reasoning_tokens": 0
}
},
"tools": [],
"tool_choice": "auto",
"parallel_tool_calls": true,
"error": null,
"incomplete_details": null,
"temperature": null,
"top_p": null,
"max_output_tokens": null,
"metadata": null,
"instructions": null
} | | `sequenceNumber` | *number* | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/openresponsesstreameventresponsefunctioncallargumentsdelta.md b/docs/models/openresponsesstreameventresponsefunctioncallargumentsdelta.md index 4204b87c..7c52c801 100644 --- a/docs/models/openresponsesstreameventresponsefunctioncallargumentsdelta.md +++ b/docs/models/openresponsesstreameventresponsefunctioncallargumentsdelta.md @@ -18,10 +18,10 @@ let value: OpenResponsesStreamEventResponseFunctionCallArgumentsDelta = { ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | -| `type` | [models.TypeResponseFunctionCallArgumentsDelta](../models/typeresponsefunctioncallargumentsdelta.md) | :heavy_check_mark: | N/A | -| `itemId` | *string* | :heavy_check_mark: | N/A | -| `outputIndex` | *number* | :heavy_check_mark: | N/A | -| `delta` | *string* | :heavy_check_mark: | N/A | -| `sequenceNumber` | *number* | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | +| `type` | *"response.function_call_arguments.delta"* | :heavy_check_mark: | N/A | +| `itemId` | *string* | :heavy_check_mark: | N/A | +| `outputIndex` | *number* | :heavy_check_mark: | N/A | +| `delta` | *string* | :heavy_check_mark: | N/A | +| `sequenceNumber` | *number* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/openresponsesstreameventresponsefunctioncallargumentsdone.md b/docs/models/openresponsesstreameventresponsefunctioncallargumentsdone.md index 6c5319a8..59d76784 100644 --- a/docs/models/openresponsesstreameventresponsefunctioncallargumentsdone.md +++ b/docs/models/openresponsesstreameventresponsefunctioncallargumentsdone.md @@ -19,11 +19,11 @@ let value: OpenResponsesStreamEventResponseFunctionCallArgumentsDone = { ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -| `type` | [models.TypeResponseFunctionCallArgumentsDone](../models/typeresponsefunctioncallargumentsdone.md) | :heavy_check_mark: | N/A | -| `itemId` | *string* | :heavy_check_mark: | N/A | -| `outputIndex` | *number* | :heavy_check_mark: | N/A | -| `name` | *string* | :heavy_check_mark: | N/A | -| `arguments` | *string* | :heavy_check_mark: | N/A | -| `sequenceNumber` | *number* | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | +| `type` | *"response.function_call_arguments.done"* | :heavy_check_mark: | N/A | +| `itemId` | *string* | :heavy_check_mark: | N/A | +| `outputIndex` | *number* | :heavy_check_mark: | N/A | +| `name` | *string* | :heavy_check_mark: | N/A | +| `arguments` | *string* | :heavy_check_mark: | N/A | +| `sequenceNumber` | *number* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/openresponsesstreameventresponseincomplete.md b/docs/models/openresponsesstreameventresponseincomplete.md index 6657cb4f..708abc70 100644 --- a/docs/models/openresponsesstreameventresponseincomplete.md +++ b/docs/models/openresponsesstreameventresponseincomplete.md @@ -33,6 +33,6 @@ let value: OpenResponsesStreamEventResponseIncomplete = { | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `type` | [models.TypeResponseIncomplete](../models/typeresponseincomplete.md) | :heavy_check_mark: | N/A | | +| `type` | *"response.incomplete"* | :heavy_check_mark: | N/A | | | `response` | [models.OpenResponsesNonStreamingResponse](../models/openresponsesnonstreamingresponse.md) | :heavy_check_mark: | Complete non-streaming response from the Responses API | {
"id": "resp-abc123",
"object": "response",
"created_at": 1704067200,
"model": "gpt-4",
"status": "completed",
"output": [
{
"type": "message",
"id": "msg-abc123",
"status": "completed",
"role": "assistant",
"content": [
{
"type": "output_text",
"text": "Hello! How can I help you today?",
"annotations": []
}
]
}
],
"usage": {
"input_tokens": 10,
"output_tokens": 25,
"total_tokens": 35,
"input_tokens_details": {
"cached_tokens": 0
},
"output_tokens_details": {
"reasoning_tokens": 0
}
},
"tools": [],
"tool_choice": "auto",
"parallel_tool_calls": true,
"error": null,
"incomplete_details": null,
"temperature": null,
"top_p": null,
"max_output_tokens": null,
"metadata": null,
"instructions": null
} | | `sequenceNumber` | *number* | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/openresponsesstreameventresponseinprogress.md b/docs/models/openresponsesstreameventresponseinprogress.md index c789e969..a5d342b1 100644 --- a/docs/models/openresponsesstreameventresponseinprogress.md +++ b/docs/models/openresponsesstreameventresponseinprogress.md @@ -33,6 +33,6 @@ let value: OpenResponsesStreamEventResponseInProgress = { | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `type` | [models.TypeResponseInProgress](../models/typeresponseinprogress.md) | :heavy_check_mark: | N/A | | +| `type` | *"response.in_progress"* | :heavy_check_mark: | N/A | | | `response` | [models.OpenResponsesNonStreamingResponse](../models/openresponsesnonstreamingresponse.md) | :heavy_check_mark: | Complete non-streaming response from the Responses API | {
"id": "resp-abc123",
"object": "response",
"created_at": 1704067200,
"model": "gpt-4",
"status": "completed",
"output": [
{
"type": "message",
"id": "msg-abc123",
"status": "completed",
"role": "assistant",
"content": [
{
"type": "output_text",
"text": "Hello! How can I help you today?",
"annotations": []
}
]
}
],
"usage": {
"input_tokens": 10,
"output_tokens": 25,
"total_tokens": 35,
"input_tokens_details": {
"cached_tokens": 0
},
"output_tokens_details": {
"reasoning_tokens": 0
}
},
"tools": [],
"tool_choice": "auto",
"parallel_tool_calls": true,
"error": null,
"incomplete_details": null,
"temperature": null,
"top_p": null,
"max_output_tokens": null,
"metadata": null,
"instructions": null
} | | `sequenceNumber` | *number* | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/openresponsesstreameventresponseoutputitemadded.md b/docs/models/openresponsesstreameventresponseoutputitemadded.md index 2ecc4bf2..c83b4e4c 100644 --- a/docs/models/openresponsesstreameventresponseoutputitemadded.md +++ b/docs/models/openresponsesstreameventresponseoutputitemadded.md @@ -24,7 +24,7 @@ let value: OpenResponsesStreamEventResponseOutputItemAdded = { | Field | Type | Required | Description | Example | | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `type` | [models.TypeResponseOutputItemAdded](../models/typeresponseoutputitemadded.md) | :heavy_check_mark: | N/A | | +| `type` | *"response.output_item.added"* | :heavy_check_mark: | N/A | | | `outputIndex` | *number* | :heavy_check_mark: | N/A | | | `item` | *models.ResponsesOutputItem* | :heavy_check_mark: | An output item from the response | {
"id": "msg-abc123",
"role": "assistant",
"type": "message",
"status": "completed",
"content": [
{
"type": "output_text",
"text": "Hello! How can I help you today?"
}
]
} | | `sequenceNumber` | *number* | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/openresponsesstreameventresponseoutputitemdone.md b/docs/models/openresponsesstreameventresponseoutputitemdone.md index 23ed3a45..3957c895 100644 --- a/docs/models/openresponsesstreameventresponseoutputitemdone.md +++ b/docs/models/openresponsesstreameventresponseoutputitemdone.md @@ -29,7 +29,7 @@ let value: OpenResponsesStreamEventResponseOutputItemDone = { | Field | Type | Required | Description | Example | | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `type` | [models.TypeResponseOutputItemDone](../models/typeresponseoutputitemdone.md) | :heavy_check_mark: | N/A | | +| `type` | *"response.output_item.done"* | :heavy_check_mark: | N/A | | | `outputIndex` | *number* | :heavy_check_mark: | N/A | | | `item` | *models.ResponsesOutputItem* | :heavy_check_mark: | An output item from the response | {
"id": "msg-abc123",
"role": "assistant",
"type": "message",
"status": "completed",
"content": [
{
"type": "output_text",
"text": "Hello! How can I help you today?"
}
]
} | | `sequenceNumber` | *number* | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/openresponsesstreameventresponseoutputtextannotationadded.md b/docs/models/openresponsesstreameventresponseoutputtextannotationadded.md index 82c5e4c2..86b18986 100644 --- a/docs/models/openresponsesstreameventresponseoutputtextannotationadded.md +++ b/docs/models/openresponsesstreameventresponseoutputtextannotationadded.md @@ -26,12 +26,12 @@ let value: OpenResponsesStreamEventResponseOutputTextAnnotationAdded = { ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -| `type` | [models.TypeResponseOutputTextAnnotationAdded](../models/typeresponseoutputtextannotationadded.md) | :heavy_check_mark: | N/A | -| `outputIndex` | *number* | :heavy_check_mark: | N/A | -| `itemId` | *string* | :heavy_check_mark: | N/A | -| `contentIndex` | *number* | :heavy_check_mark: | N/A | -| `sequenceNumber` | *number* | :heavy_check_mark: | N/A | -| `annotationIndex` | *number* | :heavy_check_mark: | N/A | -| `annotation` | *models.OpenAIResponsesAnnotation* | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | +| `type` | *"response.output_text.annotation.added"* | :heavy_check_mark: | N/A | +| `outputIndex` | *number* | :heavy_check_mark: | N/A | +| `itemId` | *string* | :heavy_check_mark: | N/A | +| `contentIndex` | *number* | :heavy_check_mark: | N/A | +| `sequenceNumber` | *number* | :heavy_check_mark: | N/A | +| `annotationIndex` | *number* | :heavy_check_mark: | N/A | +| `annotation` | *models.OpenAIResponsesAnnotation* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/openresponsesstreameventresponseoutputtextdelta.md b/docs/models/openresponsesstreameventresponseoutputtextdelta.md index b2acc734..f6253562 100644 --- a/docs/models/openresponsesstreameventresponseoutputtextdelta.md +++ b/docs/models/openresponsesstreameventresponseoutputtextdelta.md @@ -20,12 +20,12 @@ let value: OpenResponsesStreamEventResponseOutputTextDelta = { ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | -| `type` | [models.TypeResponseOutputTextDelta](../models/typeresponseoutputtextdelta.md) | :heavy_check_mark: | N/A | -| `logprobs` | [models.OpenResponsesLogProbs](../models/openresponseslogprobs.md)[] | :heavy_check_mark: | N/A | -| `outputIndex` | *number* | :heavy_check_mark: | N/A | -| `itemId` | *string* | :heavy_check_mark: | N/A | -| `contentIndex` | *number* | :heavy_check_mark: | N/A | -| `delta` | *string* | :heavy_check_mark: | N/A | -| `sequenceNumber` | *number* | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `type` | *"response.output_text.delta"* | :heavy_check_mark: | N/A | +| `logprobs` | [models.OpenResponsesLogProbs](../models/openresponseslogprobs.md)[] | :heavy_check_mark: | N/A | +| `outputIndex` | *number* | :heavy_check_mark: | N/A | +| `itemId` | *string* | :heavy_check_mark: | N/A | +| `contentIndex` | *number* | :heavy_check_mark: | N/A | +| `delta` | *string* | :heavy_check_mark: | N/A | +| `sequenceNumber` | *number* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/openresponsesstreameventresponseoutputtextdone.md b/docs/models/openresponsesstreameventresponseoutputtextdone.md index 79fe72f7..411ff0a1 100644 --- a/docs/models/openresponsesstreameventresponseoutputtextdone.md +++ b/docs/models/openresponsesstreameventresponseoutputtextdone.md @@ -20,12 +20,12 @@ let value: OpenResponsesStreamEventResponseOutputTextDone = { ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | -| `type` | [models.TypeResponseOutputTextDone](../models/typeresponseoutputtextdone.md) | :heavy_check_mark: | N/A | -| `outputIndex` | *number* | :heavy_check_mark: | N/A | -| `itemId` | *string* | :heavy_check_mark: | N/A | -| `contentIndex` | *number* | :heavy_check_mark: | N/A | -| `text` | *string* | :heavy_check_mark: | N/A | -| `sequenceNumber` | *number* | :heavy_check_mark: | N/A | -| `logprobs` | [models.OpenResponsesLogProbs](../models/openresponseslogprobs.md)[] | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `type` | *"response.output_text.done"* | :heavy_check_mark: | N/A | +| `outputIndex` | *number* | :heavy_check_mark: | N/A | +| `itemId` | *string* | :heavy_check_mark: | N/A | +| `contentIndex` | *number* | :heavy_check_mark: | N/A | +| `text` | *string* | :heavy_check_mark: | N/A | +| `sequenceNumber` | *number* | :heavy_check_mark: | N/A | +| `logprobs` | [models.OpenResponsesLogProbs](../models/openresponseslogprobs.md)[] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/openresponsesstreameventresponsereasoningsummarypartdone.md b/docs/models/openresponsesstreameventresponsereasoningsummarypartdone.md index d594ccea..80da7496 100644 --- a/docs/models/openresponsesstreameventresponsereasoningsummarypartdone.md +++ b/docs/models/openresponsesstreameventresponsereasoningsummarypartdone.md @@ -22,11 +22,11 @@ let value: OpenResponsesStreamEventResponseReasoningSummaryPartDone = { ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | -| `type` | [models.TypeResponseReasoningSummaryPartDone](../models/typeresponsereasoningsummarypartdone.md) | :heavy_check_mark: | N/A | | -| `outputIndex` | *number* | :heavy_check_mark: | N/A | | -| `itemId` | *string* | :heavy_check_mark: | N/A | | -| `summaryIndex` | *number* | :heavy_check_mark: | N/A | | -| `part` | [models.ReasoningSummaryText](../models/reasoningsummarytext.md) | :heavy_check_mark: | N/A | {
"type": "summary_text",
"text": "Analyzed the problem using first principles"
} | -| `sequenceNumber` | *number* | :heavy_check_mark: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | +| `type` | *"response.reasoning_summary_part.done"* | :heavy_check_mark: | N/A | | +| `outputIndex` | *number* | :heavy_check_mark: | N/A | | +| `itemId` | *string* | :heavy_check_mark: | N/A | | +| `summaryIndex` | *number* | :heavy_check_mark: | N/A | | +| `part` | [models.ReasoningSummaryText](../models/reasoningsummarytext.md) | :heavy_check_mark: | N/A | {
"type": "summary_text",
"text": "Analyzed the problem using first principles"
} | +| `sequenceNumber` | *number* | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/openresponsesstreameventresponserefusaldelta.md b/docs/models/openresponsesstreameventresponserefusaldelta.md index 6c44659e..28b1abb0 100644 --- a/docs/models/openresponsesstreameventresponserefusaldelta.md +++ b/docs/models/openresponsesstreameventresponserefusaldelta.md @@ -19,11 +19,11 @@ let value: OpenResponsesStreamEventResponseRefusalDelta = { ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | -| `type` | [models.TypeResponseRefusalDelta](../models/typeresponserefusaldelta.md) | :heavy_check_mark: | N/A | -| `outputIndex` | *number* | :heavy_check_mark: | N/A | -| `itemId` | *string* | :heavy_check_mark: | N/A | -| `contentIndex` | *number* | :heavy_check_mark: | N/A | -| `delta` | *string* | :heavy_check_mark: | N/A | -| `sequenceNumber` | *number* | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------- | -------------------------- | -------------------------- | -------------------------- | +| `type` | *"response.refusal.delta"* | :heavy_check_mark: | N/A | +| `outputIndex` | *number* | :heavy_check_mark: | N/A | +| `itemId` | *string* | :heavy_check_mark: | N/A | +| `contentIndex` | *number* | :heavy_check_mark: | N/A | +| `delta` | *string* | :heavy_check_mark: | N/A | +| `sequenceNumber` | *number* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/openresponsesstreameventresponserefusaldone.md b/docs/models/openresponsesstreameventresponserefusaldone.md index 68b6fff7..ca13a4cb 100644 --- a/docs/models/openresponsesstreameventresponserefusaldone.md +++ b/docs/models/openresponsesstreameventresponserefusaldone.md @@ -19,11 +19,11 @@ let value: OpenResponsesStreamEventResponseRefusalDone = { ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | -| `type` | [models.TypeResponseRefusalDone](../models/typeresponserefusaldone.md) | :heavy_check_mark: | N/A | -| `outputIndex` | *number* | :heavy_check_mark: | N/A | -| `itemId` | *string* | :heavy_check_mark: | N/A | -| `contentIndex` | *number* | :heavy_check_mark: | N/A | -| `refusal` | *string* | :heavy_check_mark: | N/A | -| `sequenceNumber` | *number* | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------- | ------------------------- | ------------------------- | ------------------------- | +| `type` | *"response.refusal.done"* | :heavy_check_mark: | N/A | +| `outputIndex` | *number* | :heavy_check_mark: | N/A | +| `itemId` | *string* | :heavy_check_mark: | N/A | +| `contentIndex` | *number* | :heavy_check_mark: | N/A | +| `refusal` | *string* | :heavy_check_mark: | N/A | +| `sequenceNumber` | *number* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/openresponseswebsearch20250826tool.md b/docs/models/openresponseswebsearch20250826tool.md index 594d329b..9cd8ec3a 100644 --- a/docs/models/openresponseswebsearch20250826tool.md +++ b/docs/models/openresponseswebsearch20250826tool.md @@ -16,7 +16,7 @@ let value: OpenResponsesWebSearch20250826Tool = { | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | -| `type` | [models.OpenResponsesWebSearch20250826ToolType](../models/openresponseswebsearch20250826tooltype.md) | :heavy_check_mark: | N/A | | +| `type` | *"web_search_2025_08_26"* | :heavy_check_mark: | N/A | | | `filters` | [models.OpenResponsesWebSearch20250826ToolFilters](../models/openresponseswebsearch20250826toolfilters.md) | :heavy_minus_sign: | N/A | | | `searchContextSize` | [models.ResponsesSearchContextSize](../models/responsessearchcontextsize.md) | :heavy_minus_sign: | Size of the search context for web search tools | medium | | `userLocation` | [models.ResponsesWebSearchUserLocation](../models/responseswebsearchuserlocation.md) | :heavy_minus_sign: | User location information for web search | {
"type": "approximate",
"city": "San Francisco",
"country": "USA",
"region": "California",
"timezone": "America/Los_Angeles"
} | \ No newline at end of file diff --git a/docs/models/openresponseswebsearch20250826tooltype.md b/docs/models/openresponseswebsearch20250826tooltype.md deleted file mode 100644 index 4f32bd23..00000000 --- a/docs/models/openresponseswebsearch20250826tooltype.md +++ /dev/null @@ -1,15 +0,0 @@ -# OpenResponsesWebSearch20250826ToolType - -## Example Usage - -```typescript -import { OpenResponsesWebSearch20250826ToolType } from "@openrouter/sdk/models"; - -let value: OpenResponsesWebSearch20250826ToolType = "web_search_2025_08_26"; -``` - -## Values - -```typescript -"web_search_2025_08_26" -``` \ No newline at end of file diff --git a/docs/models/openresponseswebsearchpreview20250311tool.md b/docs/models/openresponseswebsearchpreview20250311tool.md index 4b569f6f..bb47786c 100644 --- a/docs/models/openresponseswebsearchpreview20250311tool.md +++ b/docs/models/openresponseswebsearchpreview20250311tool.md @@ -14,8 +14,8 @@ let value: OpenResponsesWebSearchPreview20250311Tool = { ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | -| `type` | [models.OpenResponsesWebSearchPreview20250311ToolType](../models/openresponseswebsearchpreview20250311tooltype.md) | :heavy_check_mark: | N/A | | -| `searchContextSize` | [models.ResponsesSearchContextSize](../models/responsessearchcontextsize.md) | :heavy_minus_sign: | Size of the search context for web search tools | medium | -| `userLocation` | [models.WebSearchPreviewToolUserLocation](../models/websearchpreviewtooluserlocation.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | +| `type` | *"web_search_preview_2025_03_11"* | :heavy_check_mark: | N/A | | +| `searchContextSize` | [models.ResponsesSearchContextSize](../models/responsessearchcontextsize.md) | :heavy_minus_sign: | Size of the search context for web search tools | medium | +| `userLocation` | [models.WebSearchPreviewToolUserLocation](../models/websearchpreviewtooluserlocation.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/openresponseswebsearchpreview20250311tooltype.md b/docs/models/openresponseswebsearchpreview20250311tooltype.md deleted file mode 100644 index d869ef9d..00000000 --- a/docs/models/openresponseswebsearchpreview20250311tooltype.md +++ /dev/null @@ -1,16 +0,0 @@ -# OpenResponsesWebSearchPreview20250311ToolType - -## Example Usage - -```typescript -import { OpenResponsesWebSearchPreview20250311ToolType } from "@openrouter/sdk/models"; - -let value: OpenResponsesWebSearchPreview20250311ToolType = - "web_search_preview_2025_03_11"; -``` - -## Values - -```typescript -"web_search_preview_2025_03_11" -``` \ No newline at end of file diff --git a/docs/models/openresponseswebsearchpreviewtool.md b/docs/models/openresponseswebsearchpreviewtool.md index ba5a8ef0..69f214f2 100644 --- a/docs/models/openresponseswebsearchpreviewtool.md +++ b/docs/models/openresponseswebsearchpreviewtool.md @@ -14,8 +14,8 @@ let value: OpenResponsesWebSearchPreviewTool = { ## Fields -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -| `type` | [models.OpenResponsesWebSearchPreviewToolType](../models/openresponseswebsearchpreviewtooltype.md) | :heavy_check_mark: | N/A | | -| `searchContextSize` | [models.ResponsesSearchContextSize](../models/responsessearchcontextsize.md) | :heavy_minus_sign: | Size of the search context for web search tools | medium | -| `userLocation` | [models.WebSearchPreviewToolUserLocation](../models/websearchpreviewtooluserlocation.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | +| `type` | *"web_search_preview"* | :heavy_check_mark: | N/A | | +| `searchContextSize` | [models.ResponsesSearchContextSize](../models/responsessearchcontextsize.md) | :heavy_minus_sign: | Size of the search context for web search tools | medium | +| `userLocation` | [models.WebSearchPreviewToolUserLocation](../models/websearchpreviewtooluserlocation.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/openresponseswebsearchpreviewtooltype.md b/docs/models/openresponseswebsearchpreviewtooltype.md deleted file mode 100644 index 1cc60bdd..00000000 --- a/docs/models/openresponseswebsearchpreviewtooltype.md +++ /dev/null @@ -1,15 +0,0 @@ -# OpenResponsesWebSearchPreviewToolType - -## Example Usage - -```typescript -import { OpenResponsesWebSearchPreviewToolType } from "@openrouter/sdk/models"; - -let value: OpenResponsesWebSearchPreviewToolType = "web_search_preview"; -``` - -## Values - -```typescript -"web_search_preview" -``` \ No newline at end of file diff --git a/docs/models/openresponseswebsearchtool.md b/docs/models/openresponseswebsearchtool.md index 3c1a076e..067f0c26 100644 --- a/docs/models/openresponseswebsearchtool.md +++ b/docs/models/openresponseswebsearchtool.md @@ -16,7 +16,7 @@ let value: OpenResponsesWebSearchTool = { | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | -| `type` | [models.OpenResponsesWebSearchToolType](../models/openresponseswebsearchtooltype.md) | :heavy_check_mark: | N/A | | +| `type` | *"web_search"* | :heavy_check_mark: | N/A | | | `filters` | [models.OpenResponsesWebSearchToolFilters](../models/openresponseswebsearchtoolfilters.md) | :heavy_minus_sign: | N/A | | | `searchContextSize` | [models.ResponsesSearchContextSize](../models/responsessearchcontextsize.md) | :heavy_minus_sign: | Size of the search context for web search tools | medium | | `userLocation` | [models.ResponsesWebSearchUserLocation](../models/responseswebsearchuserlocation.md) | :heavy_minus_sign: | User location information for web search | {
"type": "approximate",
"city": "San Francisco",
"country": "USA",
"region": "California",
"timezone": "America/Los_Angeles"
} | \ No newline at end of file diff --git a/docs/models/openresponseswebsearchtooltype.md b/docs/models/openresponseswebsearchtooltype.md deleted file mode 100644 index 01413791..00000000 --- a/docs/models/openresponseswebsearchtooltype.md +++ /dev/null @@ -1,15 +0,0 @@ -# OpenResponsesWebSearchToolType - -## Example Usage - -```typescript -import { OpenResponsesWebSearchToolType } from "@openrouter/sdk/models"; - -let value: OpenResponsesWebSearchToolType = "web_search"; -``` - -## Values - -```typescript -"web_search" -``` \ No newline at end of file diff --git a/docs/models/operations/contentimageurl.md b/docs/models/operations/contentimageurl.md index c59de439..07dae3ef 100644 --- a/docs/models/operations/contentimageurl.md +++ b/docs/models/operations/contentimageurl.md @@ -15,7 +15,7 @@ let value: ContentImageURL = { ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | -| `type` | [operations.TypeImageURL](../../models/operations/typeimageurl.md) | :heavy_check_mark: | N/A | -| `imageUrl` | [operations.ImageUrl](../../models/operations/imageurl.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | +| `type` | *"image_url"* | :heavy_check_mark: | N/A | +| `imageUrl` | [operations.ImageUrl](../../models/operations/imageurl.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/contenttext.md b/docs/models/operations/contenttext.md index c0343ca4..85b3a967 100644 --- a/docs/models/operations/contenttext.md +++ b/docs/models/operations/contenttext.md @@ -13,7 +13,7 @@ let value: ContentText = { ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | -| `type` | [operations.TypeText](../../models/operations/typetext.md) | :heavy_check_mark: | N/A | -| `text` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `type` | *"text"* | :heavy_check_mark: | N/A | +| `text` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/deletekeysresponse.md b/docs/models/operations/deletekeysresponse.md index 5717ce71..5bab0e60 100644 --- a/docs/models/operations/deletekeysresponse.md +++ b/docs/models/operations/deletekeysresponse.md @@ -16,4 +16,4 @@ let value: DeleteKeysResponse = { | Field | Type | Required | Description | Example | | ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | -| `deleted` | *boolean* | :heavy_check_mark: | Confirmation that the API key was deleted | true | \ No newline at end of file +| `deleted` | *true* | :heavy_check_mark: | Confirmation that the API key was deleted | true | \ No newline at end of file diff --git a/docs/models/operations/typeimageurl.md b/docs/models/operations/typeimageurl.md deleted file mode 100644 index 1bbb306d..00000000 --- a/docs/models/operations/typeimageurl.md +++ /dev/null @@ -1,15 +0,0 @@ -# TypeImageURL - -## Example Usage - -```typescript -import { TypeImageURL } from "@openrouter/sdk/models/operations"; - -let value: TypeImageURL = "image_url"; -``` - -## Values - -```typescript -"image_url" -``` \ No newline at end of file diff --git a/docs/models/operations/typetext.md b/docs/models/operations/typetext.md deleted file mode 100644 index fa9f96fe..00000000 --- a/docs/models/operations/typetext.md +++ /dev/null @@ -1,15 +0,0 @@ -# TypeText - -## Example Usage - -```typescript -import { TypeText } from "@openrouter/sdk/models/operations"; - -let value: TypeText = "text"; -``` - -## Values - -```typescript -"text" -``` \ No newline at end of file diff --git a/docs/models/pluginfileparser.md b/docs/models/pluginfileparser.md index 22035248..942b84c1 100644 --- a/docs/models/pluginfileparser.md +++ b/docs/models/pluginfileparser.md @@ -12,8 +12,8 @@ let value: PluginFileParser = { ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | -| `id` | [models.IdFileParser](../models/idfileparser.md) | :heavy_check_mark: | N/A | -| `maxFiles` | *number* | :heavy_minus_sign: | N/A | -| `pdf` | [models.Pdf](../models/pdf.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ | +| `id` | *"file-parser"* | :heavy_check_mark: | N/A | +| `maxFiles` | *number* | :heavy_minus_sign: | N/A | +| `pdf` | [models.Pdf](../models/pdf.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/pluginmoderation.md b/docs/models/pluginmoderation.md index c5c4a8ab..69a9dba0 100644 --- a/docs/models/pluginmoderation.md +++ b/docs/models/pluginmoderation.md @@ -12,6 +12,6 @@ let value: PluginModeration = { ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | -| `id` | [models.IdModeration](../models/idmoderation.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *"moderation"* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/pluginweb.md b/docs/models/pluginweb.md index 5cfb0228..673a5fd6 100644 --- a/docs/models/pluginweb.md +++ b/docs/models/pluginweb.md @@ -14,7 +14,7 @@ let value: PluginWeb = { | Field | Type | Required | Description | | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | -| `id` | [models.IdWeb](../models/idweb.md) | :heavy_check_mark: | N/A | +| `id` | *"web"* | :heavy_check_mark: | N/A | | `maxResults` | *number* | :heavy_minus_sign: | N/A | | `searchPrompt` | *string* | :heavy_minus_sign: | N/A | | `engine` | [models.Engine](../models/engine.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/responseformatjsonschema.md b/docs/models/responseformatjsonschema.md index 7a72cb82..176cbbe3 100644 --- a/docs/models/responseformatjsonschema.md +++ b/docs/models/responseformatjsonschema.md @@ -17,5 +17,5 @@ let value: ResponseFormatJSONSchema = { | Field | Type | Required | Description | | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -| `type` | *string* | :heavy_check_mark: | N/A | +| `type` | *"json_schema"* | :heavy_check_mark: | N/A | | `jsonSchema` | [models.JSONSchemaConfig](../models/jsonschemaconfig.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/responseformattextgrammar.md b/docs/models/responseformattextgrammar.md index 7173f553..b3176d02 100644 --- a/docs/models/responseformattextgrammar.md +++ b/docs/models/responseformattextgrammar.md @@ -15,5 +15,5 @@ let value: ResponseFormatTextGrammar = { | Field | Type | Required | Description | | ------------------ | ------------------ | ------------------ | ------------------ | -| `type` | *string* | :heavy_check_mark: | N/A | +| `type` | *"grammar"* | :heavy_check_mark: | N/A | | `grammar` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/responseinputaudio.md b/docs/models/responseinputaudio.md index cad24bad..3fa1dcdb 100644 --- a/docs/models/responseinputaudio.md +++ b/docs/models/responseinputaudio.md @@ -20,5 +20,5 @@ let value: ResponseInputAudio = { | Field | Type | Required | Description | | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -| `type` | [models.ResponseInputAudioType](../models/responseinputaudiotype.md) | :heavy_check_mark: | N/A | +| `type` | *"input_audio"* | :heavy_check_mark: | N/A | | `inputAudio` | [models.ResponseInputAudioInputAudio](../models/responseinputaudioinputaudio.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/responseinputaudiotype.md b/docs/models/responseinputaudiotype.md deleted file mode 100644 index cb04089f..00000000 --- a/docs/models/responseinputaudiotype.md +++ /dev/null @@ -1,15 +0,0 @@ -# ResponseInputAudioType - -## Example Usage - -```typescript -import { ResponseInputAudioType } from "@openrouter/sdk/models"; - -let value: ResponseInputAudioType = "input_audio"; -``` - -## Values - -```typescript -"input_audio" -``` \ No newline at end of file diff --git a/docs/models/responseinputfile.md b/docs/models/responseinputfile.md index 93138048..24bc213c 100644 --- a/docs/models/responseinputfile.md +++ b/docs/models/responseinputfile.md @@ -14,10 +14,10 @@ let value: ResponseInputFile = { ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | -| `type` | [models.ResponseInputFileType](../models/responseinputfiletype.md) | :heavy_check_mark: | N/A | -| `fileId` | *string* | :heavy_minus_sign: | N/A | -| `fileData` | *string* | :heavy_minus_sign: | N/A | -| `filename` | *string* | :heavy_minus_sign: | N/A | -| `fileUrl` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `type` | *"input_file"* | :heavy_check_mark: | N/A | +| `fileId` | *string* | :heavy_minus_sign: | N/A | +| `fileData` | *string* | :heavy_minus_sign: | N/A | +| `filename` | *string* | :heavy_minus_sign: | N/A | +| `fileUrl` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/responseinputfiletype.md b/docs/models/responseinputfiletype.md deleted file mode 100644 index 41549fc1..00000000 --- a/docs/models/responseinputfiletype.md +++ /dev/null @@ -1,15 +0,0 @@ -# ResponseInputFileType - -## Example Usage - -```typescript -import { ResponseInputFileType } from "@openrouter/sdk/models"; - -let value: ResponseInputFileType = "input_file"; -``` - -## Values - -```typescript -"input_file" -``` \ No newline at end of file diff --git a/docs/models/responseinputimage.md b/docs/models/responseinputimage.md index f59b3fe8..fedb0ffe 100644 --- a/docs/models/responseinputimage.md +++ b/docs/models/responseinputimage.md @@ -17,6 +17,6 @@ let value: ResponseInputImage = { | Field | Type | Required | Description | | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | -| `type` | [models.ResponseInputImageType](../models/responseinputimagetype.md) | :heavy_check_mark: | N/A | +| `type` | *"input_image"* | :heavy_check_mark: | N/A | | `detail` | [models.ResponseInputImageDetail](../models/responseinputimagedetail.md) | :heavy_check_mark: | N/A | | `imageUrl` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/responseinputimagetype.md b/docs/models/responseinputimagetype.md deleted file mode 100644 index 17e83452..00000000 --- a/docs/models/responseinputimagetype.md +++ /dev/null @@ -1,15 +0,0 @@ -# ResponseInputImageType - -## Example Usage - -```typescript -import { ResponseInputImageType } from "@openrouter/sdk/models"; - -let value: ResponseInputImageType = "input_image"; -``` - -## Values - -```typescript -"input_image" -``` \ No newline at end of file diff --git a/docs/models/responseinputtext.md b/docs/models/responseinputtext.md index 0d152b19..cb509e89 100644 --- a/docs/models/responseinputtext.md +++ b/docs/models/responseinputtext.md @@ -15,7 +15,7 @@ let value: ResponseInputText = { ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | -| `type` | [models.ResponseInputTextType](../models/responseinputtexttype.md) | :heavy_check_mark: | N/A | -| `text` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `type` | *"input_text"* | :heavy_check_mark: | N/A | +| `text` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/responseinputtexttype.md b/docs/models/responseinputtexttype.md deleted file mode 100644 index 54b1700e..00000000 --- a/docs/models/responseinputtexttype.md +++ /dev/null @@ -1,15 +0,0 @@ -# ResponseInputTextType - -## Example Usage - -```typescript -import { ResponseInputTextType } from "@openrouter/sdk/models"; - -let value: ResponseInputTextType = "input_text"; -``` - -## Values - -```typescript -"input_text" -``` \ No newline at end of file diff --git a/docs/models/responseoutputtext.md b/docs/models/responseoutputtext.md index d6c70640..ea27fa62 100644 --- a/docs/models/responseoutputtext.md +++ b/docs/models/responseoutputtext.md @@ -13,8 +13,8 @@ let value: ResponseOutputText = { ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -| `type` | [models.ResponseOutputTextType](../models/responseoutputtexttype.md) | :heavy_check_mark: | N/A | -| `text` | *string* | :heavy_check_mark: | N/A | -| `annotations` | *models.OpenAIResponsesAnnotation*[] | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +| `type` | *"output_text"* | :heavy_check_mark: | N/A | +| `text` | *string* | :heavy_check_mark: | N/A | +| `annotations` | *models.OpenAIResponsesAnnotation*[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/responseoutputtexttype.md b/docs/models/responseoutputtexttype.md deleted file mode 100644 index 0bd0b6ff..00000000 --- a/docs/models/responseoutputtexttype.md +++ /dev/null @@ -1,15 +0,0 @@ -# ResponseOutputTextType - -## Example Usage - -```typescript -import { ResponseOutputTextType } from "@openrouter/sdk/models"; - -let value: ResponseOutputTextType = "output_text"; -``` - -## Values - -```typescript -"output_text" -``` \ No newline at end of file diff --git a/docs/models/responsesformatjsonobject.md b/docs/models/responsesformatjsonobject.md index f7b71412..8cd57234 100644 --- a/docs/models/responsesformatjsonobject.md +++ b/docs/models/responsesformatjsonobject.md @@ -14,6 +14,6 @@ let value: ResponsesFormatJSONObject = { ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | -| `type` | [models.ResponsesFormatJSONObjectType](../models/responsesformatjsonobjecttype.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `type` | *"json_object"* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/responsesformatjsonobjecttype.md b/docs/models/responsesformatjsonobjecttype.md deleted file mode 100644 index eb52f640..00000000 --- a/docs/models/responsesformatjsonobjecttype.md +++ /dev/null @@ -1,15 +0,0 @@ -# ResponsesFormatJSONObjectType - -## Example Usage - -```typescript -import { ResponsesFormatJSONObjectType } from "@openrouter/sdk/models"; - -let value: ResponsesFormatJSONObjectType = "json_object"; -``` - -## Values - -```typescript -"json_object" -``` \ No newline at end of file diff --git a/docs/models/responsesformattext.md b/docs/models/responsesformattext.md index 2f42de4f..c2bbe935 100644 --- a/docs/models/responsesformattext.md +++ b/docs/models/responsesformattext.md @@ -14,6 +14,6 @@ let value: ResponsesFormatText = { ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | -| `type` | [models.ResponsesFormatTextType](../models/responsesformattexttype.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `type` | *"text"* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/responsesformattextjsonschemaconfig.md b/docs/models/responsesformattextjsonschemaconfig.md index c641450e..fe60ef06 100644 --- a/docs/models/responsesformattextjsonschemaconfig.md +++ b/docs/models/responsesformattextjsonschemaconfig.md @@ -19,10 +19,10 @@ let value: ResponsesFormatTextJSONSchemaConfig = { ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | -| `type` | [models.ResponsesFormatTextJSONSchemaConfigType](../models/responsesformattextjsonschemaconfigtype.md) | :heavy_check_mark: | N/A | -| `name` | *string* | :heavy_check_mark: | N/A | -| `description` | *string* | :heavy_minus_sign: | N/A | -| `strict` | *boolean* | :heavy_minus_sign: | N/A | -| `schema` | Record | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| --------------------- | --------------------- | --------------------- | --------------------- | +| `type` | *"json_schema"* | :heavy_check_mark: | N/A | +| `name` | *string* | :heavy_check_mark: | N/A | +| `description` | *string* | :heavy_minus_sign: | N/A | +| `strict` | *boolean* | :heavy_minus_sign: | N/A | +| `schema` | Record | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/responsesformattextjsonschemaconfigtype.md b/docs/models/responsesformattextjsonschemaconfigtype.md deleted file mode 100644 index ef44ea20..00000000 --- a/docs/models/responsesformattextjsonschemaconfigtype.md +++ /dev/null @@ -1,15 +0,0 @@ -# ResponsesFormatTextJSONSchemaConfigType - -## Example Usage - -```typescript -import { ResponsesFormatTextJSONSchemaConfigType } from "@openrouter/sdk/models"; - -let value: ResponsesFormatTextJSONSchemaConfigType = "json_schema"; -``` - -## Values - -```typescript -"json_schema" -``` \ No newline at end of file diff --git a/docs/models/responsesformattexttype.md b/docs/models/responsesformattexttype.md deleted file mode 100644 index c91ce63d..00000000 --- a/docs/models/responsesformattexttype.md +++ /dev/null @@ -1,15 +0,0 @@ -# ResponsesFormatTextType - -## Example Usage - -```typescript -import { ResponsesFormatTextType } from "@openrouter/sdk/models"; - -let value: ResponsesFormatTextType = "text"; -``` - -## Values - -```typescript -"text" -``` \ No newline at end of file diff --git a/docs/models/systemmessage.md b/docs/models/systemmessage.md index 2b748473..5f7c34b4 100644 --- a/docs/models/systemmessage.md +++ b/docs/models/systemmessage.md @@ -15,6 +15,6 @@ let value: SystemMessage = { | Field | Type | Required | Description | | ----------------------------- | ----------------------------- | ----------------------------- | ----------------------------- | -| `role` | *string* | :heavy_check_mark: | N/A | +| `role` | *"system"* | :heavy_check_mark: | N/A | | `content` | *models.SystemMessageContent* | :heavy_check_mark: | N/A | | `name` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/tooldefinitionjson.md b/docs/models/tooldefinitionjson.md index 7a0360f0..d8993e62 100644 --- a/docs/models/tooldefinitionjson.md +++ b/docs/models/tooldefinitionjson.md @@ -17,5 +17,5 @@ let value: ToolDefinitionJson = { | Field | Type | Required | Description | | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | -| `type` | *string* | :heavy_check_mark: | N/A | +| `type` | *"function"* | :heavy_check_mark: | N/A | | `function` | [models.ToolDefinitionJsonFunction](../models/tooldefinitionjsonfunction.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/toolresponsemessage.md b/docs/models/toolresponsemessage.md index 9f43a201..0d66edc9 100644 --- a/docs/models/toolresponsemessage.md +++ b/docs/models/toolresponsemessage.md @@ -16,6 +16,6 @@ let value: ToolResponseMessage = { | Field | Type | Required | Description | | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `role` | *string* | :heavy_check_mark: | N/A | +| `role` | *"tool"* | :heavy_check_mark: | N/A | | `content` | *models.ToolResponseMessageContent* | :heavy_check_mark: | N/A | | `toolCallId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/typeresponsecompleted.md b/docs/models/typeresponsecompleted.md deleted file mode 100644 index 5a960069..00000000 --- a/docs/models/typeresponsecompleted.md +++ /dev/null @@ -1,15 +0,0 @@ -# TypeResponseCompleted - -## Example Usage - -```typescript -import { TypeResponseCompleted } from "@openrouter/sdk/models"; - -let value: TypeResponseCompleted = "response.completed"; -``` - -## Values - -```typescript -"response.completed" -``` \ No newline at end of file diff --git a/docs/models/typeresponsecontentpartadded.md b/docs/models/typeresponsecontentpartadded.md deleted file mode 100644 index 1b488042..00000000 --- a/docs/models/typeresponsecontentpartadded.md +++ /dev/null @@ -1,15 +0,0 @@ -# TypeResponseContentPartAdded - -## Example Usage - -```typescript -import { TypeResponseContentPartAdded } from "@openrouter/sdk/models"; - -let value: TypeResponseContentPartAdded = "response.content_part.added"; -``` - -## Values - -```typescript -"response.content_part.added" -``` \ No newline at end of file diff --git a/docs/models/typeresponsecontentpartdone.md b/docs/models/typeresponsecontentpartdone.md deleted file mode 100644 index 517631f3..00000000 --- a/docs/models/typeresponsecontentpartdone.md +++ /dev/null @@ -1,15 +0,0 @@ -# TypeResponseContentPartDone - -## Example Usage - -```typescript -import { TypeResponseContentPartDone } from "@openrouter/sdk/models"; - -let value: TypeResponseContentPartDone = "response.content_part.done"; -``` - -## Values - -```typescript -"response.content_part.done" -``` \ No newline at end of file diff --git a/docs/models/typeresponsecreated.md b/docs/models/typeresponsecreated.md deleted file mode 100644 index b6c6550e..00000000 --- a/docs/models/typeresponsecreated.md +++ /dev/null @@ -1,15 +0,0 @@ -# TypeResponseCreated - -## Example Usage - -```typescript -import { TypeResponseCreated } from "@openrouter/sdk/models"; - -let value: TypeResponseCreated = "response.created"; -``` - -## Values - -```typescript -"response.created" -``` \ No newline at end of file diff --git a/docs/models/typeresponsefailed.md b/docs/models/typeresponsefailed.md deleted file mode 100644 index 5b89fbe5..00000000 --- a/docs/models/typeresponsefailed.md +++ /dev/null @@ -1,15 +0,0 @@ -# TypeResponseFailed - -## Example Usage - -```typescript -import { TypeResponseFailed } from "@openrouter/sdk/models"; - -let value: TypeResponseFailed = "response.failed"; -``` - -## Values - -```typescript -"response.failed" -``` \ No newline at end of file diff --git a/docs/models/typeresponsefunctioncallargumentsdelta.md b/docs/models/typeresponsefunctioncallargumentsdelta.md deleted file mode 100644 index 2ab49027..00000000 --- a/docs/models/typeresponsefunctioncallargumentsdelta.md +++ /dev/null @@ -1,16 +0,0 @@ -# TypeResponseFunctionCallArgumentsDelta - -## Example Usage - -```typescript -import { TypeResponseFunctionCallArgumentsDelta } from "@openrouter/sdk/models"; - -let value: TypeResponseFunctionCallArgumentsDelta = - "response.function_call_arguments.delta"; -``` - -## Values - -```typescript -"response.function_call_arguments.delta" -``` \ No newline at end of file diff --git a/docs/models/typeresponsefunctioncallargumentsdone.md b/docs/models/typeresponsefunctioncallargumentsdone.md deleted file mode 100644 index 67a34ff4..00000000 --- a/docs/models/typeresponsefunctioncallargumentsdone.md +++ /dev/null @@ -1,16 +0,0 @@ -# TypeResponseFunctionCallArgumentsDone - -## Example Usage - -```typescript -import { TypeResponseFunctionCallArgumentsDone } from "@openrouter/sdk/models"; - -let value: TypeResponseFunctionCallArgumentsDone = - "response.function_call_arguments.done"; -``` - -## Values - -```typescript -"response.function_call_arguments.done" -``` \ No newline at end of file diff --git a/docs/models/typeresponseincomplete.md b/docs/models/typeresponseincomplete.md deleted file mode 100644 index a5661685..00000000 --- a/docs/models/typeresponseincomplete.md +++ /dev/null @@ -1,15 +0,0 @@ -# TypeResponseIncomplete - -## Example Usage - -```typescript -import { TypeResponseIncomplete } from "@openrouter/sdk/models"; - -let value: TypeResponseIncomplete = "response.incomplete"; -``` - -## Values - -```typescript -"response.incomplete" -``` \ No newline at end of file diff --git a/docs/models/typeresponseinprogress.md b/docs/models/typeresponseinprogress.md deleted file mode 100644 index 33d0b0f4..00000000 --- a/docs/models/typeresponseinprogress.md +++ /dev/null @@ -1,15 +0,0 @@ -# TypeResponseInProgress - -## Example Usage - -```typescript -import { TypeResponseInProgress } from "@openrouter/sdk/models"; - -let value: TypeResponseInProgress = "response.in_progress"; -``` - -## Values - -```typescript -"response.in_progress" -``` \ No newline at end of file diff --git a/docs/models/typeresponseoutputitemadded.md b/docs/models/typeresponseoutputitemadded.md deleted file mode 100644 index d315d045..00000000 --- a/docs/models/typeresponseoutputitemadded.md +++ /dev/null @@ -1,15 +0,0 @@ -# TypeResponseOutputItemAdded - -## Example Usage - -```typescript -import { TypeResponseOutputItemAdded } from "@openrouter/sdk/models"; - -let value: TypeResponseOutputItemAdded = "response.output_item.added"; -``` - -## Values - -```typescript -"response.output_item.added" -``` \ No newline at end of file diff --git a/docs/models/typeresponseoutputitemdone.md b/docs/models/typeresponseoutputitemdone.md deleted file mode 100644 index acf5d4ec..00000000 --- a/docs/models/typeresponseoutputitemdone.md +++ /dev/null @@ -1,15 +0,0 @@ -# TypeResponseOutputItemDone - -## Example Usage - -```typescript -import { TypeResponseOutputItemDone } from "@openrouter/sdk/models"; - -let value: TypeResponseOutputItemDone = "response.output_item.done"; -``` - -## Values - -```typescript -"response.output_item.done" -``` \ No newline at end of file diff --git a/docs/models/typeresponseoutputtextannotationadded.md b/docs/models/typeresponseoutputtextannotationadded.md deleted file mode 100644 index ef71545b..00000000 --- a/docs/models/typeresponseoutputtextannotationadded.md +++ /dev/null @@ -1,16 +0,0 @@ -# TypeResponseOutputTextAnnotationAdded - -## Example Usage - -```typescript -import { TypeResponseOutputTextAnnotationAdded } from "@openrouter/sdk/models"; - -let value: TypeResponseOutputTextAnnotationAdded = - "response.output_text.annotation.added"; -``` - -## Values - -```typescript -"response.output_text.annotation.added" -``` \ No newline at end of file diff --git a/docs/models/typeresponseoutputtextdelta.md b/docs/models/typeresponseoutputtextdelta.md deleted file mode 100644 index 607d72de..00000000 --- a/docs/models/typeresponseoutputtextdelta.md +++ /dev/null @@ -1,15 +0,0 @@ -# TypeResponseOutputTextDelta - -## Example Usage - -```typescript -import { TypeResponseOutputTextDelta } from "@openrouter/sdk/models"; - -let value: TypeResponseOutputTextDelta = "response.output_text.delta"; -``` - -## Values - -```typescript -"response.output_text.delta" -``` \ No newline at end of file diff --git a/docs/models/typeresponseoutputtextdone.md b/docs/models/typeresponseoutputtextdone.md deleted file mode 100644 index d4ff897c..00000000 --- a/docs/models/typeresponseoutputtextdone.md +++ /dev/null @@ -1,15 +0,0 @@ -# TypeResponseOutputTextDone - -## Example Usage - -```typescript -import { TypeResponseOutputTextDone } from "@openrouter/sdk/models"; - -let value: TypeResponseOutputTextDone = "response.output_text.done"; -``` - -## Values - -```typescript -"response.output_text.done" -``` \ No newline at end of file diff --git a/docs/models/typeresponsereasoningsummarypartdone.md b/docs/models/typeresponsereasoningsummarypartdone.md deleted file mode 100644 index af98210b..00000000 --- a/docs/models/typeresponsereasoningsummarypartdone.md +++ /dev/null @@ -1,16 +0,0 @@ -# TypeResponseReasoningSummaryPartDone - -## Example Usage - -```typescript -import { TypeResponseReasoningSummaryPartDone } from "@openrouter/sdk/models"; - -let value: TypeResponseReasoningSummaryPartDone = - "response.reasoning_summary_part.done"; -``` - -## Values - -```typescript -"response.reasoning_summary_part.done" -``` \ No newline at end of file diff --git a/docs/models/typeresponserefusaldelta.md b/docs/models/typeresponserefusaldelta.md deleted file mode 100644 index f3b2e039..00000000 --- a/docs/models/typeresponserefusaldelta.md +++ /dev/null @@ -1,15 +0,0 @@ -# TypeResponseRefusalDelta - -## Example Usage - -```typescript -import { TypeResponseRefusalDelta } from "@openrouter/sdk/models"; - -let value: TypeResponseRefusalDelta = "response.refusal.delta"; -``` - -## Values - -```typescript -"response.refusal.delta" -``` \ No newline at end of file diff --git a/docs/models/typeresponserefusaldone.md b/docs/models/typeresponserefusaldone.md deleted file mode 100644 index b425be6c..00000000 --- a/docs/models/typeresponserefusaldone.md +++ /dev/null @@ -1,15 +0,0 @@ -# TypeResponseRefusalDone - -## Example Usage - -```typescript -import { TypeResponseRefusalDone } from "@openrouter/sdk/models"; - -let value: TypeResponseRefusalDone = "response.refusal.done"; -``` - -## Values - -```typescript -"response.refusal.done" -``` \ No newline at end of file diff --git a/docs/models/urlcitation.md b/docs/models/urlcitation.md index cc7c350b..284cac10 100644 --- a/docs/models/urlcitation.md +++ b/docs/models/urlcitation.md @@ -16,10 +16,10 @@ let value: URLCitation = { ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | -| `type` | [models.URLCitationType](../models/urlcitationtype.md) | :heavy_check_mark: | N/A | -| `url` | *string* | :heavy_check_mark: | N/A | -| `title` | *string* | :heavy_check_mark: | N/A | -| `startIndex` | *number* | :heavy_check_mark: | N/A | -| `endIndex` | *number* | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `type` | *"url_citation"* | :heavy_check_mark: | N/A | +| `url` | *string* | :heavy_check_mark: | N/A | +| `title` | *string* | :heavy_check_mark: | N/A | +| `startIndex` | *number* | :heavy_check_mark: | N/A | +| `endIndex` | *number* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/urlcitationtype.md b/docs/models/urlcitationtype.md deleted file mode 100644 index 271ee45a..00000000 --- a/docs/models/urlcitationtype.md +++ /dev/null @@ -1,15 +0,0 @@ -# URLCitationType - -## Example Usage - -```typescript -import { URLCitationType } from "@openrouter/sdk/models"; - -let value: URLCitationType = "url_citation"; -``` - -## Values - -```typescript -"url_citation" -``` \ No newline at end of file diff --git a/docs/models/usermessage.md b/docs/models/usermessage.md index 4a060604..792d86b7 100644 --- a/docs/models/usermessage.md +++ b/docs/models/usermessage.md @@ -15,6 +15,6 @@ let value: UserMessage = { | Field | Type | Required | Description | | --------------------------- | --------------------------- | --------------------------- | --------------------------- | -| `role` | *string* | :heavy_check_mark: | N/A | +| `role` | *"user"* | :heavy_check_mark: | N/A | | `content` | *models.UserMessageContent* | :heavy_check_mark: | N/A | | `name` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/jsr.json b/jsr.json index 27ade2d4..a467b0ba 100644 --- a/jsr.json +++ b/jsr.json @@ -2,7 +2,7 @@ { "name": "@openrouter/sdk", - "version": "0.1.27", + "version": "0.2.0", "exports": { ".": "./src/index.ts", "./models/errors": "./src/models/errors/index.ts", diff --git a/package-lock.json b/package-lock.json index c846df18..3bded104 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@openrouter/sdk", - "version": "0.1.27", + "version": "0.2.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@openrouter/sdk", - "version": "0.1.27", + "version": "0.2.0", "license": "Apache-2.0", "dependencies": { "zod": "^3.25.0 || ^4.0.0" diff --git a/package.json b/package.json index 099dc891..4116f0be 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@openrouter/sdk", - "version": "0.1.27", + "version": "0.2.0", "author": "OpenRouter", "description": "The OpenRouter TypeScript SDK is a type-safe toolkit for building AI applications with access to 300+ language models through a unified API.", "keywords": [ diff --git a/src/lib/config.ts b/src/lib/config.ts index 30bae632..1ef36ac7 100644 --- a/src/lib/config.ts +++ b/src/lib/config.ts @@ -69,7 +69,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null { export const SDK_METADATA = { language: "typescript", openapiDocVersion: "1.0.0", - sdkVersion: "0.1.27", - genVersion: "2.760.2", - userAgent: "speakeasy-sdk/typescript 0.1.27 2.760.2 1.0.0 @openrouter/sdk", + sdkVersion: "0.2.0", + genVersion: "2.768.0", + userAgent: "speakeasy-sdk/typescript 0.2.0 2.768.0 1.0.0 @openrouter/sdk", } as const; diff --git a/src/lib/encodings.ts b/src/lib/encodings.ts index 25c9dcba..31cd3733 100644 --- a/src/lib/encodings.ts +++ b/src/lib/encodings.ts @@ -102,8 +102,9 @@ export function encodeLabel( }); encValue = mapped?.join("").slice(1); } else { - const k = - options?.explode && isPlainObject(value) ? `${encodeString(pk)}=` : ""; + const k = options?.explode && isPlainObject(value) + ? `${encodeString(pk)}=` + : ""; encValue = `${k}${encodeValue(pv)}`; } @@ -426,6 +427,7 @@ export function queryJoin(...args: (string | undefined)[]): string { type QueryEncoderOptions = { explode?: boolean; charEncoding?: "percent" | "none"; + allowEmptyValue?: string[]; }; type QueryEncoder = ( @@ -440,7 +442,7 @@ type BulkQueryEncoder = ( ) => string; export function queryEncoder(f: QueryEncoder): BulkQueryEncoder { - const bulkEncode = function ( + const bulkEncode = function( values: Record, options?: QueryEncoderOptions, ): string { @@ -450,7 +452,19 @@ export function queryEncoder(f: QueryEncoder): BulkQueryEncoder { charEncoding: options?.charEncoding ?? "percent", }; + const allowEmptySet = new Set(options?.allowEmptyValue ?? []); + const encoded = Object.entries(values).map(([key, value]) => { + if (allowEmptySet.has(key)) { + if ( + value === undefined + || value === null + || value === "" + || (Array.isArray(value) && value.length === 0) + ) { + return `${encodeURIComponent(key)}=`; + } + } return f(key, value, opts); }); return queryJoin(...encoded); diff --git a/src/models/chatgenerationparams.ts b/src/models/chatgenerationparams.ts index b50b2dac..c861290f 100644 --- a/src/models/chatgenerationparams.ts +++ b/src/models/chatgenerationparams.ts @@ -63,10 +63,10 @@ export type ChatGenerationParamsResponseFormatText = { }; export type ChatGenerationParamsResponseFormatUnion = - | ResponseFormatJSONSchema - | ResponseFormatTextGrammar | ChatGenerationParamsResponseFormatText | ChatGenerationParamsResponseFormatJSONObject + | ResponseFormatJSONSchema + | ResponseFormatTextGrammar | ChatGenerationParamsResponseFormatPython; export type ChatGenerationParamsStop = string | Array; @@ -85,10 +85,10 @@ export type ChatGenerationParams = { presencePenalty?: number | null | undefined; reasoning?: Reasoning | undefined; responseFormat?: - | ResponseFormatJSONSchema - | ResponseFormatTextGrammar | ChatGenerationParamsResponseFormatText | ChatGenerationParamsResponseFormatJSONObject + | ResponseFormatJSONSchema + | ResponseFormatTextGrammar | ChatGenerationParamsResponseFormatPython | undefined; seed?: number | null | undefined; @@ -200,10 +200,10 @@ export function chatGenerationParamsResponseFormatTextToJSON( /** @internal */ export type ChatGenerationParamsResponseFormatUnion$Outbound = - | ResponseFormatJSONSchema$Outbound - | ResponseFormatTextGrammar$Outbound | ChatGenerationParamsResponseFormatText$Outbound | ChatGenerationParamsResponseFormatJSONObject$Outbound + | ResponseFormatJSONSchema$Outbound + | ResponseFormatTextGrammar$Outbound | ChatGenerationParamsResponseFormatPython$Outbound; /** @internal */ @@ -211,10 +211,10 @@ export const ChatGenerationParamsResponseFormatUnion$outboundSchema: z.ZodType< ChatGenerationParamsResponseFormatUnion$Outbound, ChatGenerationParamsResponseFormatUnion > = z.union([ - ResponseFormatJSONSchema$outboundSchema, - ResponseFormatTextGrammar$outboundSchema, z.lazy(() => ChatGenerationParamsResponseFormatText$outboundSchema), z.lazy(() => ChatGenerationParamsResponseFormatJSONObject$outboundSchema), + ResponseFormatJSONSchema$outboundSchema, + ResponseFormatTextGrammar$outboundSchema, z.lazy(() => ChatGenerationParamsResponseFormatPython$outboundSchema), ]); @@ -261,10 +261,10 @@ export type ChatGenerationParams$Outbound = { presence_penalty?: number | null | undefined; reasoning?: Reasoning$Outbound | undefined; response_format?: - | ResponseFormatJSONSchema$Outbound - | ResponseFormatTextGrammar$Outbound | ChatGenerationParamsResponseFormatText$Outbound | ChatGenerationParamsResponseFormatJSONObject$Outbound + | ResponseFormatJSONSchema$Outbound + | ResponseFormatTextGrammar$Outbound | ChatGenerationParamsResponseFormatPython$Outbound | undefined; seed?: number | null | undefined; @@ -296,10 +296,10 @@ export const ChatGenerationParams$outboundSchema: z.ZodType< presencePenalty: z.nullable(z.number()).optional(), reasoning: z.lazy(() => Reasoning$outboundSchema).optional(), responseFormat: z.union([ - ResponseFormatJSONSchema$outboundSchema, - ResponseFormatTextGrammar$outboundSchema, z.lazy(() => ChatGenerationParamsResponseFormatText$outboundSchema), z.lazy(() => ChatGenerationParamsResponseFormatJSONObject$outboundSchema), + ResponseFormatJSONSchema$outboundSchema, + ResponseFormatTextGrammar$outboundSchema, z.lazy(() => ChatGenerationParamsResponseFormatPython$outboundSchema), ]).optional(), seed: z.nullable(z.int()).optional(), diff --git a/src/models/chatmessagecontentitem.ts b/src/models/chatmessagecontentitem.ts index 5cb3bbc8..ebefc6d9 100644 --- a/src/models/chatmessagecontentitem.ts +++ b/src/models/chatmessagecontentitem.ts @@ -38,69 +38,53 @@ import { import { SDKValidationError } from "./errors/sdkvalidationerror.js"; export type ChatMessageContentItem = - | (ChatMessageContentItemText & { type: "text" }) - | (ChatMessageContentItemImage & { type: "image_url" }) - | (ChatMessageContentItemAudio & { type: "input_audio" }) - | (ChatMessageContentItemFile & { type: "file" }) + | ChatMessageContentItemText + | ChatMessageContentItemImage + | ChatMessageContentItemAudio | (ChatMessageContentItemVideo & { type: "input_video" }) - | (ChatMessageContentItemVideo & { type: "video_url" }); + | (ChatMessageContentItemVideo & { type: "video_url" }) + | ChatMessageContentItemFile; /** @internal */ export const ChatMessageContentItem$inboundSchema: z.ZodType< ChatMessageContentItem, unknown > = z.union([ - ChatMessageContentItemText$inboundSchema.and( - z.object({ type: z.literal("text") }), - ), - ChatMessageContentItemImage$inboundSchema.and( - z.object({ type: z.literal("image_url") }), - ), - ChatMessageContentItemAudio$inboundSchema.and( - z.object({ type: z.literal("input_audio") }), - ), - ChatMessageContentItemFile$inboundSchema.and( - z.object({ type: z.literal("file") }), - ), + ChatMessageContentItemText$inboundSchema, + ChatMessageContentItemImage$inboundSchema, + ChatMessageContentItemAudio$inboundSchema, ChatMessageContentItemVideo$inboundSchema.and( z.object({ type: z.literal("input_video") }), ), z.lazy(() => ChatMessageContentItemVideo$inboundSchema).and( z.object({ type: z.literal("video_url") }), ), + ChatMessageContentItemFile$inboundSchema, ]); /** @internal */ export type ChatMessageContentItem$Outbound = - | (ChatMessageContentItemText$Outbound & { type: "text" }) - | (ChatMessageContentItemImage$Outbound & { type: "image_url" }) - | (ChatMessageContentItemAudio$Outbound & { type: "input_audio" }) - | (ChatMessageContentItemFile$Outbound & { type: "file" }) + | ChatMessageContentItemText$Outbound + | ChatMessageContentItemImage$Outbound + | ChatMessageContentItemAudio$Outbound | (ChatMessageContentItemVideo$Outbound & { type: "input_video" }) - | (ChatMessageContentItemVideo$Outbound & { type: "video_url" }); + | (ChatMessageContentItemVideo$Outbound & { type: "video_url" }) + | ChatMessageContentItemFile$Outbound; /** @internal */ export const ChatMessageContentItem$outboundSchema: z.ZodType< ChatMessageContentItem$Outbound, ChatMessageContentItem > = z.union([ - ChatMessageContentItemText$outboundSchema.and( - z.object({ type: z.literal("text") }), - ), - ChatMessageContentItemImage$outboundSchema.and( - z.object({ type: z.literal("image_url") }), - ), - ChatMessageContentItemAudio$outboundSchema.and( - z.object({ type: z.literal("input_audio") }), - ), - ChatMessageContentItemFile$outboundSchema.and( - z.object({ type: z.literal("file") }), - ), + ChatMessageContentItemText$outboundSchema, + ChatMessageContentItemImage$outboundSchema, + ChatMessageContentItemAudio$outboundSchema, ChatMessageContentItemVideo$outboundSchema.and( z.object({ type: z.literal("input_video") }), ), z.lazy(() => ChatMessageContentItemVideo$outboundSchema).and( z.object({ type: z.literal("video_url") }), ), + ChatMessageContentItemFile$outboundSchema, ]); export function chatMessageContentItemToJSON( diff --git a/src/models/completioncreateparams.ts b/src/models/completioncreateparams.ts index 3227fb77..cd68cfa2 100644 --- a/src/models/completioncreateparams.ts +++ b/src/models/completioncreateparams.ts @@ -40,10 +40,10 @@ export type CompletionCreateParamsResponseFormatText = { }; export type CompletionCreateParamsResponseFormatUnion = - | ResponseFormatJSONSchema - | ResponseFormatTextGrammar | CompletionCreateParamsResponseFormatText | CompletionCreateParamsResponseFormatJSONObject + | ResponseFormatJSONSchema + | ResponseFormatTextGrammar | CompletionCreateParamsResponseFormatPython; export type CompletionCreateParams = { @@ -68,10 +68,10 @@ export type CompletionCreateParams = { user?: string | undefined; metadata?: { [k: string]: string } | null | undefined; responseFormat?: - | ResponseFormatJSONSchema - | ResponseFormatTextGrammar | CompletionCreateParamsResponseFormatText | CompletionCreateParamsResponseFormatJSONObject + | ResponseFormatJSONSchema + | ResponseFormatTextGrammar | CompletionCreateParamsResponseFormatPython | null | undefined; @@ -211,10 +211,10 @@ export function completionCreateParamsResponseFormatTextToJSON( /** @internal */ export type CompletionCreateParamsResponseFormatUnion$Outbound = - | ResponseFormatJSONSchema$Outbound - | ResponseFormatTextGrammar$Outbound | CompletionCreateParamsResponseFormatText$Outbound | CompletionCreateParamsResponseFormatJSONObject$Outbound + | ResponseFormatJSONSchema$Outbound + | ResponseFormatTextGrammar$Outbound | CompletionCreateParamsResponseFormatPython$Outbound; /** @internal */ @@ -223,10 +223,10 @@ export const CompletionCreateParamsResponseFormatUnion$outboundSchema: CompletionCreateParamsResponseFormatUnion$Outbound, CompletionCreateParamsResponseFormatUnion > = z.union([ - ResponseFormatJSONSchema$outboundSchema, - ResponseFormatTextGrammar$outboundSchema, z.lazy(() => CompletionCreateParamsResponseFormatText$outboundSchema), z.lazy(() => CompletionCreateParamsResponseFormatJSONObject$outboundSchema), + ResponseFormatJSONSchema$outboundSchema, + ResponseFormatTextGrammar$outboundSchema, z.lazy(() => CompletionCreateParamsResponseFormatPython$outboundSchema), ]); @@ -264,10 +264,10 @@ export type CompletionCreateParams$Outbound = { user?: string | undefined; metadata?: { [k: string]: string } | null | undefined; response_format?: - | ResponseFormatJSONSchema$Outbound - | ResponseFormatTextGrammar$Outbound | CompletionCreateParamsResponseFormatText$Outbound | CompletionCreateParamsResponseFormatJSONObject$Outbound + | ResponseFormatJSONSchema$Outbound + | ResponseFormatTextGrammar$Outbound | CompletionCreateParamsResponseFormatPython$Outbound | null | undefined; @@ -306,12 +306,12 @@ export const CompletionCreateParams$outboundSchema: z.ZodType< metadata: z.nullable(z.record(z.string(), z.string())).optional(), responseFormat: z.nullable( z.union([ - ResponseFormatJSONSchema$outboundSchema, - ResponseFormatTextGrammar$outboundSchema, z.lazy(() => CompletionCreateParamsResponseFormatText$outboundSchema), z.lazy(() => CompletionCreateParamsResponseFormatJSONObject$outboundSchema ), + ResponseFormatJSONSchema$outboundSchema, + ResponseFormatTextGrammar$outboundSchema, z.lazy(() => CompletionCreateParamsResponseFormatPython$outboundSchema), ]), ).optional(), diff --git a/src/models/filecitation.ts b/src/models/filecitation.ts index cd3723da..00b7a5d7 100644 --- a/src/models/filecitation.ts +++ b/src/models/filecitation.ts @@ -5,35 +5,20 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; -import { ClosedEnum } from "../types/enums.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; -export const FileCitationType = { - FileCitation: "file_citation", -} as const; -export type FileCitationType = ClosedEnum; - export type FileCitation = { - type: FileCitationType; + type: "file_citation"; fileId: string; filename: string; index: number; }; -/** @internal */ -export const FileCitationType$inboundSchema: z.ZodEnum< - typeof FileCitationType -> = z.enum(FileCitationType); -/** @internal */ -export const FileCitationType$outboundSchema: z.ZodEnum< - typeof FileCitationType -> = FileCitationType$inboundSchema; - /** @internal */ export const FileCitation$inboundSchema: z.ZodType = z .object({ - type: FileCitationType$inboundSchema, + type: z.literal("file_citation"), file_id: z.string(), filename: z.string(), index: z.number(), @@ -44,7 +29,7 @@ export const FileCitation$inboundSchema: z.ZodType = z }); /** @internal */ export type FileCitation$Outbound = { - type: string; + type: "file_citation"; file_id: string; filename: string; index: number; @@ -55,7 +40,7 @@ export const FileCitation$outboundSchema: z.ZodType< FileCitation$Outbound, FileCitation > = z.object({ - type: FileCitationType$outboundSchema, + type: z.literal("file_citation"), fileId: z.string(), filename: z.string(), index: z.number(), diff --git a/src/models/filepath.ts b/src/models/filepath.ts index 32b84dd3..08abb411 100644 --- a/src/models/filepath.ts +++ b/src/models/filepath.ts @@ -5,31 +5,18 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; -import { ClosedEnum } from "../types/enums.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; -export const FilePathType = { - FilePath: "file_path", -} as const; -export type FilePathType = ClosedEnum; - export type FilePath = { - type: FilePathType; + type: "file_path"; fileId: string; index: number; }; -/** @internal */ -export const FilePathType$inboundSchema: z.ZodEnum = z - .enum(FilePathType); -/** @internal */ -export const FilePathType$outboundSchema: z.ZodEnum = - FilePathType$inboundSchema; - /** @internal */ export const FilePath$inboundSchema: z.ZodType = z.object({ - type: FilePathType$inboundSchema, + type: z.literal("file_path"), file_id: z.string(), index: z.number(), }).transform((v) => { @@ -39,7 +26,7 @@ export const FilePath$inboundSchema: z.ZodType = z.object({ }); /** @internal */ export type FilePath$Outbound = { - type: string; + type: "file_path"; file_id: string; index: number; }; @@ -47,7 +34,7 @@ export type FilePath$Outbound = { /** @internal */ export const FilePath$outboundSchema: z.ZodType = z .object({ - type: FilePathType$outboundSchema, + type: z.literal("file_path"), fileId: z.string(), index: z.number(), }).transform((v) => { diff --git a/src/models/message.ts b/src/models/message.ts index a28aff78..616bb498 100644 --- a/src/models/message.ts +++ b/src/models/message.ts @@ -38,11 +38,11 @@ export type MessageDeveloper = { }; export type Message = - | ToolResponseMessage | SystemMessage | UserMessage | MessageDeveloper - | AssistantMessage; + | AssistantMessage + | ToolResponseMessage; /** @internal */ export type MessageContent$Outbound = @@ -89,20 +89,20 @@ export function messageDeveloperToJSON( /** @internal */ export type Message$Outbound = - | ToolResponseMessage$Outbound | SystemMessage$Outbound | UserMessage$Outbound | MessageDeveloper$Outbound - | AssistantMessage$Outbound; + | AssistantMessage$Outbound + | ToolResponseMessage$Outbound; /** @internal */ export const Message$outboundSchema: z.ZodType = z .union([ - ToolResponseMessage$outboundSchema, SystemMessage$outboundSchema, UserMessage$outboundSchema, z.lazy(() => MessageDeveloper$outboundSchema), AssistantMessage$outboundSchema, + ToolResponseMessage$outboundSchema, ]); export function messageToJSON(message: Message): string { diff --git a/src/models/openairesponsesannotation.ts b/src/models/openairesponsesannotation.ts index 23596614..7720e9dc 100644 --- a/src/models/openairesponsesannotation.ts +++ b/src/models/openairesponsesannotation.ts @@ -25,21 +25,21 @@ import { URLCitation$outboundSchema, } from "./urlcitation.js"; -export type OpenAIResponsesAnnotation = URLCitation | FileCitation | FilePath; +export type OpenAIResponsesAnnotation = FileCitation | URLCitation | FilePath; /** @internal */ export const OpenAIResponsesAnnotation$inboundSchema: z.ZodType< OpenAIResponsesAnnotation, unknown > = z.union([ - URLCitation$inboundSchema, FileCitation$inboundSchema, + URLCitation$inboundSchema, FilePath$inboundSchema, ]); /** @internal */ export type OpenAIResponsesAnnotation$Outbound = - | URLCitation$Outbound | FileCitation$Outbound + | URLCitation$Outbound | FilePath$Outbound; /** @internal */ @@ -47,8 +47,8 @@ export const OpenAIResponsesAnnotation$outboundSchema: z.ZodType< OpenAIResponsesAnnotation$Outbound, OpenAIResponsesAnnotation > = z.union([ - URLCitation$outboundSchema, FileCitation$outboundSchema, + URLCitation$outboundSchema, FilePath$outboundSchema, ]); diff --git a/src/models/openairesponsesinputunion.ts b/src/models/openairesponsesinputunion.ts index 388f13d4..73702880 100644 --- a/src/models/openairesponsesinputunion.ts +++ b/src/models/openairesponsesinputunion.ts @@ -99,10 +99,10 @@ export type OpenAIResponsesInputRoleUnion2 = | OpenAIResponsesInputRoleDeveloper2; export type OpenAIResponsesInputContent3 = - | (ResponseInputText & { type: "input_text" }) - | (ResponseInputImage & { type: "input_image" }) - | (ResponseInputAudio & { type: "input_audio" }) - | (ResponseInputFile & { type: "input_file" }); + | ResponseInputText + | ResponseInputImage + | ResponseInputFile + | ResponseInputAudio; export type OpenAIResponsesInputMessage2 = { id: string; @@ -112,10 +112,10 @@ export type OpenAIResponsesInputMessage2 = { | OpenAIResponsesInputRoleSystem2 | OpenAIResponsesInputRoleDeveloper2; content: Array< - | (ResponseInputText & { type: "input_text" }) - | (ResponseInputImage & { type: "input_image" }) - | (ResponseInputAudio & { type: "input_audio" }) - | (ResponseInputFile & { type: "input_file" }) + | ResponseInputText + | ResponseInputImage + | ResponseInputFile + | ResponseInputAudio >; }; @@ -161,17 +161,17 @@ export type OpenAIResponsesInputRoleUnion1 = | OpenAIResponsesInputRoleDeveloper1; export type OpenAIResponsesInputContent1 = - | (ResponseInputText & { type: "input_text" }) - | (ResponseInputImage & { type: "input_image" }) - | (ResponseInputAudio & { type: "input_audio" }) - | (ResponseInputFile & { type: "input_file" }); + | ResponseInputText + | ResponseInputImage + | ResponseInputFile + | ResponseInputAudio; export type OpenAIResponsesInputContent2 = | Array< - | (ResponseInputText & { type: "input_text" }) - | (ResponseInputImage & { type: "input_image" }) - | (ResponseInputAudio & { type: "input_audio" }) - | (ResponseInputFile & { type: "input_file" }) + | ResponseInputText + | ResponseInputImage + | ResponseInputFile + | ResponseInputAudio > | string; @@ -184,10 +184,10 @@ export type OpenAIResponsesInputMessage1 = { | OpenAIResponsesInputRoleDeveloper1; content: | Array< - | (ResponseInputText & { type: "input_text" }) - | (ResponseInputImage & { type: "input_image" }) - | (ResponseInputAudio & { type: "input_audio" }) - | (ResponseInputFile & { type: "input_file" }) + | ResponseInputText + | ResponseInputImage + | ResponseInputFile + | ResponseInputAudio > | string; }; @@ -322,18 +322,10 @@ export const OpenAIResponsesInputContent3$inboundSchema: z.ZodType< OpenAIResponsesInputContent3, unknown > = z.union([ - ResponseInputText$inboundSchema.and( - z.object({ type: z.literal("input_text") }), - ), - ResponseInputImage$inboundSchema.and( - z.object({ type: z.literal("input_image") }), - ), - ResponseInputAudio$inboundSchema.and( - z.object({ type: z.literal("input_audio") }), - ), - ResponseInputFile$inboundSchema.and( - z.object({ type: z.literal("input_file") }), - ), + ResponseInputText$inboundSchema, + ResponseInputImage$inboundSchema, + ResponseInputFile$inboundSchema, + ResponseInputAudio$inboundSchema, ]); export function openAIResponsesInputContent3FromJSON( @@ -360,18 +352,10 @@ export const OpenAIResponsesInputMessage2$inboundSchema: z.ZodType< ]), content: z.array( z.union([ - ResponseInputText$inboundSchema.and( - z.object({ type: z.literal("input_text") }), - ), - ResponseInputImage$inboundSchema.and( - z.object({ type: z.literal("input_image") }), - ), - ResponseInputAudio$inboundSchema.and( - z.object({ type: z.literal("input_audio") }), - ), - ResponseInputFile$inboundSchema.and( - z.object({ type: z.literal("input_file") }), - ), + ResponseInputText$inboundSchema, + ResponseInputImage$inboundSchema, + ResponseInputFile$inboundSchema, + ResponseInputAudio$inboundSchema, ]), ), }); @@ -437,18 +421,10 @@ export const OpenAIResponsesInputContent1$inboundSchema: z.ZodType< OpenAIResponsesInputContent1, unknown > = z.union([ - ResponseInputText$inboundSchema.and( - z.object({ type: z.literal("input_text") }), - ), - ResponseInputImage$inboundSchema.and( - z.object({ type: z.literal("input_image") }), - ), - ResponseInputAudio$inboundSchema.and( - z.object({ type: z.literal("input_audio") }), - ), - ResponseInputFile$inboundSchema.and( - z.object({ type: z.literal("input_file") }), - ), + ResponseInputText$inboundSchema, + ResponseInputImage$inboundSchema, + ResponseInputFile$inboundSchema, + ResponseInputAudio$inboundSchema, ]); export function openAIResponsesInputContent1FromJSON( @@ -468,18 +444,10 @@ export const OpenAIResponsesInputContent2$inboundSchema: z.ZodType< > = z.union([ z.array( z.union([ - ResponseInputText$inboundSchema.and( - z.object({ type: z.literal("input_text") }), - ), - ResponseInputImage$inboundSchema.and( - z.object({ type: z.literal("input_image") }), - ), - ResponseInputAudio$inboundSchema.and( - z.object({ type: z.literal("input_audio") }), - ), - ResponseInputFile$inboundSchema.and( - z.object({ type: z.literal("input_file") }), - ), + ResponseInputText$inboundSchema, + ResponseInputImage$inboundSchema, + ResponseInputFile$inboundSchema, + ResponseInputAudio$inboundSchema, ]), ), z.string(), @@ -510,18 +478,10 @@ export const OpenAIResponsesInputMessage1$inboundSchema: z.ZodType< content: z.union([ z.array( z.union([ - ResponseInputText$inboundSchema.and( - z.object({ type: z.literal("input_text") }), - ), - ResponseInputImage$inboundSchema.and( - z.object({ type: z.literal("input_image") }), - ), - ResponseInputAudio$inboundSchema.and( - z.object({ type: z.literal("input_audio") }), - ), - ResponseInputFile$inboundSchema.and( - z.object({ type: z.literal("input_file") }), - ), + ResponseInputText$inboundSchema, + ResponseInputImage$inboundSchema, + ResponseInputFile$inboundSchema, + ResponseInputAudio$inboundSchema, ]), ), z.string(), diff --git a/src/models/openairesponsesrefusalcontent.ts b/src/models/openairesponsesrefusalcontent.ts index 0e9d2c92..dd3273b1 100644 --- a/src/models/openairesponsesrefusalcontent.ts +++ b/src/models/openairesponsesrefusalcontent.ts @@ -4,42 +4,25 @@ import * as z from "zod/v4"; import { safeParse } from "../lib/schemas.js"; -import { ClosedEnum } from "../types/enums.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; -export const OpenAIResponsesRefusalContentType = { - Refusal: "refusal", -} as const; -export type OpenAIResponsesRefusalContentType = ClosedEnum< - typeof OpenAIResponsesRefusalContentType ->; - export type OpenAIResponsesRefusalContent = { - type: OpenAIResponsesRefusalContentType; + type: "refusal"; refusal: string; }; -/** @internal */ -export const OpenAIResponsesRefusalContentType$inboundSchema: z.ZodEnum< - typeof OpenAIResponsesRefusalContentType -> = z.enum(OpenAIResponsesRefusalContentType); -/** @internal */ -export const OpenAIResponsesRefusalContentType$outboundSchema: z.ZodEnum< - typeof OpenAIResponsesRefusalContentType -> = OpenAIResponsesRefusalContentType$inboundSchema; - /** @internal */ export const OpenAIResponsesRefusalContent$inboundSchema: z.ZodType< OpenAIResponsesRefusalContent, unknown > = z.object({ - type: OpenAIResponsesRefusalContentType$inboundSchema, + type: z.literal("refusal"), refusal: z.string(), }); /** @internal */ export type OpenAIResponsesRefusalContent$Outbound = { - type: string; + type: "refusal"; refusal: string; }; @@ -48,7 +31,7 @@ export const OpenAIResponsesRefusalContent$outboundSchema: z.ZodType< OpenAIResponsesRefusalContent$Outbound, OpenAIResponsesRefusalContent > = z.object({ - type: OpenAIResponsesRefusalContentType$outboundSchema, + type: z.literal("refusal"), refusal: z.string(), }); diff --git a/src/models/openresponseseasyinputmessage.ts b/src/models/openresponseseasyinputmessage.ts index f1ecffdd..5e75df15 100644 --- a/src/models/openresponseseasyinputmessage.ts +++ b/src/models/openresponseseasyinputmessage.ts @@ -67,17 +67,17 @@ export type OpenResponsesEasyInputMessageRoleUnion = | OpenResponsesEasyInputMessageRoleDeveloper; export type OpenResponsesEasyInputMessageContent1 = - | (ResponseInputText & { type: "input_text" }) - | (ResponseInputImage & { type: "input_image" }) - | (ResponseInputAudio & { type: "input_audio" }) - | (ResponseInputFile & { type: "input_file" }); + | ResponseInputText + | ResponseInputImage + | ResponseInputFile + | ResponseInputAudio; export type OpenResponsesEasyInputMessageContent2 = | Array< - | (ResponseInputText & { type: "input_text" }) - | (ResponseInputImage & { type: "input_image" }) - | (ResponseInputAudio & { type: "input_audio" }) - | (ResponseInputFile & { type: "input_file" }) + | ResponseInputText + | ResponseInputImage + | ResponseInputFile + | ResponseInputAudio > | string; @@ -90,10 +90,10 @@ export type OpenResponsesEasyInputMessage = { | OpenResponsesEasyInputMessageRoleDeveloper; content: | Array< - | (ResponseInputText & { type: "input_text" }) - | (ResponseInputImage & { type: "input_image" }) - | (ResponseInputAudio & { type: "input_audio" }) - | (ResponseInputFile & { type: "input_file" }) + | ResponseInputText + | ResponseInputImage + | ResponseInputFile + | ResponseInputAudio > | string; }; @@ -156,28 +156,20 @@ export function openResponsesEasyInputMessageRoleUnionToJSON( /** @internal */ export type OpenResponsesEasyInputMessageContent1$Outbound = - | (ResponseInputText$Outbound & { type: "input_text" }) - | (ResponseInputImage$Outbound & { type: "input_image" }) - | (ResponseInputAudio$Outbound & { type: "input_audio" }) - | (ResponseInputFile$Outbound & { type: "input_file" }); + | ResponseInputText$Outbound + | ResponseInputImage$Outbound + | ResponseInputFile$Outbound + | ResponseInputAudio$Outbound; /** @internal */ export const OpenResponsesEasyInputMessageContent1$outboundSchema: z.ZodType< OpenResponsesEasyInputMessageContent1$Outbound, OpenResponsesEasyInputMessageContent1 > = z.union([ - ResponseInputText$outboundSchema.and( - z.object({ type: z.literal("input_text") }), - ), - ResponseInputImage$outboundSchema.and( - z.object({ type: z.literal("input_image") }), - ), - ResponseInputAudio$outboundSchema.and( - z.object({ type: z.literal("input_audio") }), - ), - ResponseInputFile$outboundSchema.and( - z.object({ type: z.literal("input_file") }), - ), + ResponseInputText$outboundSchema, + ResponseInputImage$outboundSchema, + ResponseInputFile$outboundSchema, + ResponseInputAudio$outboundSchema, ]); export function openResponsesEasyInputMessageContent1ToJSON( @@ -193,10 +185,10 @@ export function openResponsesEasyInputMessageContent1ToJSON( /** @internal */ export type OpenResponsesEasyInputMessageContent2$Outbound = | Array< - | (ResponseInputText$Outbound & { type: "input_text" }) - | (ResponseInputImage$Outbound & { type: "input_image" }) - | (ResponseInputAudio$Outbound & { type: "input_audio" }) - | (ResponseInputFile$Outbound & { type: "input_file" }) + | ResponseInputText$Outbound + | ResponseInputImage$Outbound + | ResponseInputFile$Outbound + | ResponseInputAudio$Outbound > | string; @@ -207,18 +199,10 @@ export const OpenResponsesEasyInputMessageContent2$outboundSchema: z.ZodType< > = z.union([ z.array( z.union([ - ResponseInputText$outboundSchema.and( - z.object({ type: z.literal("input_text") }), - ), - ResponseInputImage$outboundSchema.and( - z.object({ type: z.literal("input_image") }), - ), - ResponseInputAudio$outboundSchema.and( - z.object({ type: z.literal("input_audio") }), - ), - ResponseInputFile$outboundSchema.and( - z.object({ type: z.literal("input_file") }), - ), + ResponseInputText$outboundSchema, + ResponseInputImage$outboundSchema, + ResponseInputFile$outboundSchema, + ResponseInputAudio$outboundSchema, ]), ), z.string(), @@ -240,10 +224,10 @@ export type OpenResponsesEasyInputMessage$Outbound = { role: string | string | string | string; content: | Array< - | (ResponseInputText$Outbound & { type: "input_text" }) - | (ResponseInputImage$Outbound & { type: "input_image" }) - | (ResponseInputAudio$Outbound & { type: "input_audio" }) - | (ResponseInputFile$Outbound & { type: "input_file" }) + | ResponseInputText$Outbound + | ResponseInputImage$Outbound + | ResponseInputFile$Outbound + | ResponseInputAudio$Outbound > | string; }; @@ -263,18 +247,10 @@ export const OpenResponsesEasyInputMessage$outboundSchema: z.ZodType< content: z.union([ z.array( z.union([ - ResponseInputText$outboundSchema.and( - z.object({ type: z.literal("input_text") }), - ), - ResponseInputImage$outboundSchema.and( - z.object({ type: z.literal("input_image") }), - ), - ResponseInputAudio$outboundSchema.and( - z.object({ type: z.literal("input_audio") }), - ), - ResponseInputFile$outboundSchema.and( - z.object({ type: z.literal("input_file") }), - ), + ResponseInputText$outboundSchema, + ResponseInputImage$outboundSchema, + ResponseInputFile$outboundSchema, + ResponseInputAudio$outboundSchema, ]), ), z.string(), diff --git a/src/models/openresponseserrorevent.ts b/src/models/openresponseserrorevent.ts index 9ec64921..ad39bdad 100644 --- a/src/models/openresponseserrorevent.ts +++ b/src/models/openresponseserrorevent.ts @@ -5,39 +5,26 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; -import { ClosedEnum } from "../types/enums.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; -export const OpenResponsesErrorEventType = { - Error: "error", -} as const; -export type OpenResponsesErrorEventType = ClosedEnum< - typeof OpenResponsesErrorEventType ->; - /** * Event emitted when an error occurs during streaming */ export type OpenResponsesErrorEvent = { - type: OpenResponsesErrorEventType; + type: "error"; code: string | null; message: string; param: string | null; sequenceNumber: number; }; -/** @internal */ -export const OpenResponsesErrorEventType$inboundSchema: z.ZodEnum< - typeof OpenResponsesErrorEventType -> = z.enum(OpenResponsesErrorEventType); - /** @internal */ export const OpenResponsesErrorEvent$inboundSchema: z.ZodType< OpenResponsesErrorEvent, unknown > = z.object({ - type: OpenResponsesErrorEventType$inboundSchema, + type: z.literal("error"), code: z.nullable(z.string()), message: z.string(), param: z.nullable(z.string()), diff --git a/src/models/openresponsesimagegencallcompleted.ts b/src/models/openresponsesimagegencallcompleted.ts index 7d0cc6ba..83345a07 100644 --- a/src/models/openresponsesimagegencallcompleted.ts +++ b/src/models/openresponsesimagegencallcompleted.ts @@ -5,39 +5,25 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; -import { ClosedEnum } from "../types/enums.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; -export const OpenResponsesImageGenCallCompletedType = { - ResponseImageGenerationCallCompleted: - "response.image_generation_call.completed", -} as const; -export type OpenResponsesImageGenCallCompletedType = ClosedEnum< - typeof OpenResponsesImageGenCallCompletedType ->; - /** * Image generation call completed */ export type OpenResponsesImageGenCallCompleted = { - type: OpenResponsesImageGenCallCompletedType; + type: "response.image_generation_call.completed"; itemId: string; outputIndex: number; sequenceNumber: number; }; -/** @internal */ -export const OpenResponsesImageGenCallCompletedType$inboundSchema: z.ZodEnum< - typeof OpenResponsesImageGenCallCompletedType -> = z.enum(OpenResponsesImageGenCallCompletedType); - /** @internal */ export const OpenResponsesImageGenCallCompleted$inboundSchema: z.ZodType< OpenResponsesImageGenCallCompleted, unknown > = z.object({ - type: OpenResponsesImageGenCallCompletedType$inboundSchema, + type: z.literal("response.image_generation_call.completed"), item_id: z.string(), output_index: z.number(), sequence_number: z.number(), diff --git a/src/models/openresponsesimagegencallgenerating.ts b/src/models/openresponsesimagegencallgenerating.ts index bf1a51f3..71facbf7 100644 --- a/src/models/openresponsesimagegencallgenerating.ts +++ b/src/models/openresponsesimagegencallgenerating.ts @@ -5,39 +5,25 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; -import { ClosedEnum } from "../types/enums.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; -export const OpenResponsesImageGenCallGeneratingType = { - ResponseImageGenerationCallGenerating: - "response.image_generation_call.generating", -} as const; -export type OpenResponsesImageGenCallGeneratingType = ClosedEnum< - typeof OpenResponsesImageGenCallGeneratingType ->; - /** * Image generation call is generating */ export type OpenResponsesImageGenCallGenerating = { - type: OpenResponsesImageGenCallGeneratingType; + type: "response.image_generation_call.generating"; itemId: string; outputIndex: number; sequenceNumber: number; }; -/** @internal */ -export const OpenResponsesImageGenCallGeneratingType$inboundSchema: z.ZodEnum< - typeof OpenResponsesImageGenCallGeneratingType -> = z.enum(OpenResponsesImageGenCallGeneratingType); - /** @internal */ export const OpenResponsesImageGenCallGenerating$inboundSchema: z.ZodType< OpenResponsesImageGenCallGenerating, unknown > = z.object({ - type: OpenResponsesImageGenCallGeneratingType$inboundSchema, + type: z.literal("response.image_generation_call.generating"), item_id: z.string(), output_index: z.number(), sequence_number: z.number(), diff --git a/src/models/openresponsesimagegencallinprogress.ts b/src/models/openresponsesimagegencallinprogress.ts index 4dfe4986..04bb03c9 100644 --- a/src/models/openresponsesimagegencallinprogress.ts +++ b/src/models/openresponsesimagegencallinprogress.ts @@ -5,39 +5,25 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; -import { ClosedEnum } from "../types/enums.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; -export const OpenResponsesImageGenCallInProgressType = { - ResponseImageGenerationCallInProgress: - "response.image_generation_call.in_progress", -} as const; -export type OpenResponsesImageGenCallInProgressType = ClosedEnum< - typeof OpenResponsesImageGenCallInProgressType ->; - /** * Image generation call in progress */ export type OpenResponsesImageGenCallInProgress = { - type: OpenResponsesImageGenCallInProgressType; + type: "response.image_generation_call.in_progress"; itemId: string; outputIndex: number; sequenceNumber: number; }; -/** @internal */ -export const OpenResponsesImageGenCallInProgressType$inboundSchema: z.ZodEnum< - typeof OpenResponsesImageGenCallInProgressType -> = z.enum(OpenResponsesImageGenCallInProgressType); - /** @internal */ export const OpenResponsesImageGenCallInProgress$inboundSchema: z.ZodType< OpenResponsesImageGenCallInProgress, unknown > = z.object({ - type: OpenResponsesImageGenCallInProgressType$inboundSchema, + type: z.literal("response.image_generation_call.in_progress"), item_id: z.string(), output_index: z.number(), sequence_number: z.number(), diff --git a/src/models/openresponsesimagegencallpartialimage.ts b/src/models/openresponsesimagegencallpartialimage.ts index ad7cda33..e21d39d5 100644 --- a/src/models/openresponsesimagegencallpartialimage.ts +++ b/src/models/openresponsesimagegencallpartialimage.ts @@ -5,23 +5,14 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; -import { ClosedEnum } from "../types/enums.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; -export const OpenResponsesImageGenCallPartialImageType = { - ResponseImageGenerationCallPartialImage: - "response.image_generation_call.partial_image", -} as const; -export type OpenResponsesImageGenCallPartialImageType = ClosedEnum< - typeof OpenResponsesImageGenCallPartialImageType ->; - /** * Image generation call with partial image */ export type OpenResponsesImageGenCallPartialImage = { - type: OpenResponsesImageGenCallPartialImageType; + type: "response.image_generation_call.partial_image"; itemId: string; outputIndex: number; sequenceNumber: number; @@ -29,17 +20,12 @@ export type OpenResponsesImageGenCallPartialImage = { partialImageIndex: number; }; -/** @internal */ -export const OpenResponsesImageGenCallPartialImageType$inboundSchema: z.ZodEnum< - typeof OpenResponsesImageGenCallPartialImageType -> = z.enum(OpenResponsesImageGenCallPartialImageType); - /** @internal */ export const OpenResponsesImageGenCallPartialImage$inboundSchema: z.ZodType< OpenResponsesImageGenCallPartialImage, unknown > = z.object({ - type: OpenResponsesImageGenCallPartialImageType$inboundSchema, + type: z.literal("response.image_generation_call.partial_image"), item_id: z.string(), output_index: z.number(), sequence_number: z.number(), diff --git a/src/models/openresponsesinputmessageitem.ts b/src/models/openresponsesinputmessageitem.ts index f5d1f28f..4f210753 100644 --- a/src/models/openresponsesinputmessageitem.ts +++ b/src/models/openresponsesinputmessageitem.ts @@ -59,10 +59,10 @@ export type OpenResponsesInputMessageItemRoleUnion = | OpenResponsesInputMessageItemRoleDeveloper; export type OpenResponsesInputMessageItemContent = - | (ResponseInputText & { type: "input_text" }) - | (ResponseInputImage & { type: "input_image" }) - | (ResponseInputAudio & { type: "input_audio" }) - | (ResponseInputFile & { type: "input_file" }); + | ResponseInputText + | ResponseInputImage + | ResponseInputFile + | ResponseInputAudio; export type OpenResponsesInputMessageItem = { id?: string | undefined; @@ -72,10 +72,10 @@ export type OpenResponsesInputMessageItem = { | OpenResponsesInputMessageItemRoleSystem | OpenResponsesInputMessageItemRoleDeveloper; content: Array< - | (ResponseInputText & { type: "input_text" }) - | (ResponseInputImage & { type: "input_image" }) - | (ResponseInputAudio & { type: "input_audio" }) - | (ResponseInputFile & { type: "input_file" }) + | ResponseInputText + | ResponseInputImage + | ResponseInputFile + | ResponseInputAudio >; }; @@ -129,28 +129,20 @@ export function openResponsesInputMessageItemRoleUnionToJSON( /** @internal */ export type OpenResponsesInputMessageItemContent$Outbound = - | (ResponseInputText$Outbound & { type: "input_text" }) - | (ResponseInputImage$Outbound & { type: "input_image" }) - | (ResponseInputAudio$Outbound & { type: "input_audio" }) - | (ResponseInputFile$Outbound & { type: "input_file" }); + | ResponseInputText$Outbound + | ResponseInputImage$Outbound + | ResponseInputFile$Outbound + | ResponseInputAudio$Outbound; /** @internal */ export const OpenResponsesInputMessageItemContent$outboundSchema: z.ZodType< OpenResponsesInputMessageItemContent$Outbound, OpenResponsesInputMessageItemContent > = z.union([ - ResponseInputText$outboundSchema.and( - z.object({ type: z.literal("input_text") }), - ), - ResponseInputImage$outboundSchema.and( - z.object({ type: z.literal("input_image") }), - ), - ResponseInputAudio$outboundSchema.and( - z.object({ type: z.literal("input_audio") }), - ), - ResponseInputFile$outboundSchema.and( - z.object({ type: z.literal("input_file") }), - ), + ResponseInputText$outboundSchema, + ResponseInputImage$outboundSchema, + ResponseInputFile$outboundSchema, + ResponseInputAudio$outboundSchema, ]); export function openResponsesInputMessageItemContentToJSON( @@ -169,10 +161,10 @@ export type OpenResponsesInputMessageItem$Outbound = { type?: string | undefined; role: string | string | string; content: Array< - | (ResponseInputText$Outbound & { type: "input_text" }) - | (ResponseInputImage$Outbound & { type: "input_image" }) - | (ResponseInputAudio$Outbound & { type: "input_audio" }) - | (ResponseInputFile$Outbound & { type: "input_file" }) + | ResponseInputText$Outbound + | ResponseInputImage$Outbound + | ResponseInputFile$Outbound + | ResponseInputAudio$Outbound >; }; @@ -190,18 +182,10 @@ export const OpenResponsesInputMessageItem$outboundSchema: z.ZodType< ]), content: z.array( z.union([ - ResponseInputText$outboundSchema.and( - z.object({ type: z.literal("input_text") }), - ), - ResponseInputImage$outboundSchema.and( - z.object({ type: z.literal("input_image") }), - ), - ResponseInputAudio$outboundSchema.and( - z.object({ type: z.literal("input_audio") }), - ), - ResponseInputFile$outboundSchema.and( - z.object({ type: z.literal("input_file") }), - ), + ResponseInputText$outboundSchema, + ResponseInputImage$outboundSchema, + ResponseInputFile$outboundSchema, + ResponseInputAudio$outboundSchema, ]), ), }); diff --git a/src/models/openresponsesnonstreamingresponse.ts b/src/models/openresponsesnonstreamingresponse.ts index 7b5172f9..2467beaa 100644 --- a/src/models/openresponsesnonstreamingresponse.ts +++ b/src/models/openresponsesnonstreamingresponse.ts @@ -78,18 +78,11 @@ export const ObjectT = { } as const; export type ObjectT = ClosedEnum; -export const OpenResponsesNonStreamingResponseType = { - Function: "function", -} as const; -export type OpenResponsesNonStreamingResponseType = ClosedEnum< - typeof OpenResponsesNonStreamingResponseType ->; - /** * Function tool definition */ export type OpenResponsesNonStreamingResponseToolFunction = { - type: OpenResponsesNonStreamingResponseType; + type: "function"; name: string; description?: string | null | undefined; strict?: boolean | null | undefined; @@ -161,15 +154,10 @@ export type OpenResponsesNonStreamingResponse = { /** @internal */ export const ObjectT$inboundSchema: z.ZodEnum = z.enum(ObjectT); -/** @internal */ -export const OpenResponsesNonStreamingResponseType$inboundSchema: z.ZodEnum< - typeof OpenResponsesNonStreamingResponseType -> = z.enum(OpenResponsesNonStreamingResponseType); - /** @internal */ export const OpenResponsesNonStreamingResponseToolFunction$inboundSchema: z.ZodType = z.object({ - type: OpenResponsesNonStreamingResponseType$inboundSchema, + type: z.literal("function"), name: z.string(), description: z.nullable(z.string()).optional(), strict: z.nullable(z.boolean()).optional(), diff --git a/src/models/openresponsesreasoningdeltaevent.ts b/src/models/openresponsesreasoningdeltaevent.ts index ee3adf9e..82853c01 100644 --- a/src/models/openresponsesreasoningdeltaevent.ts +++ b/src/models/openresponsesreasoningdeltaevent.ts @@ -5,22 +5,14 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; -import { ClosedEnum } from "../types/enums.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; -export const OpenResponsesReasoningDeltaEventType = { - ResponseReasoningTextDelta: "response.reasoning_text.delta", -} as const; -export type OpenResponsesReasoningDeltaEventType = ClosedEnum< - typeof OpenResponsesReasoningDeltaEventType ->; - /** * Event emitted when reasoning text delta is streamed */ export type OpenResponsesReasoningDeltaEvent = { - type: OpenResponsesReasoningDeltaEventType; + type: "response.reasoning_text.delta"; outputIndex: number; itemId: string; contentIndex: number; @@ -28,17 +20,12 @@ export type OpenResponsesReasoningDeltaEvent = { sequenceNumber: number; }; -/** @internal */ -export const OpenResponsesReasoningDeltaEventType$inboundSchema: z.ZodEnum< - typeof OpenResponsesReasoningDeltaEventType -> = z.enum(OpenResponsesReasoningDeltaEventType); - /** @internal */ export const OpenResponsesReasoningDeltaEvent$inboundSchema: z.ZodType< OpenResponsesReasoningDeltaEvent, unknown > = z.object({ - type: OpenResponsesReasoningDeltaEventType$inboundSchema, + type: z.literal("response.reasoning_text.delta"), output_index: z.number(), item_id: z.string(), content_index: z.number(), diff --git a/src/models/openresponsesreasoningdoneevent.ts b/src/models/openresponsesreasoningdoneevent.ts index a164feef..5d037417 100644 --- a/src/models/openresponsesreasoningdoneevent.ts +++ b/src/models/openresponsesreasoningdoneevent.ts @@ -5,22 +5,14 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; -import { ClosedEnum } from "../types/enums.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; -export const OpenResponsesReasoningDoneEventType = { - ResponseReasoningTextDone: "response.reasoning_text.done", -} as const; -export type OpenResponsesReasoningDoneEventType = ClosedEnum< - typeof OpenResponsesReasoningDoneEventType ->; - /** * Event emitted when reasoning text streaming is complete */ export type OpenResponsesReasoningDoneEvent = { - type: OpenResponsesReasoningDoneEventType; + type: "response.reasoning_text.done"; outputIndex: number; itemId: string; contentIndex: number; @@ -28,17 +20,12 @@ export type OpenResponsesReasoningDoneEvent = { sequenceNumber: number; }; -/** @internal */ -export const OpenResponsesReasoningDoneEventType$inboundSchema: z.ZodEnum< - typeof OpenResponsesReasoningDoneEventType -> = z.enum(OpenResponsesReasoningDoneEventType); - /** @internal */ export const OpenResponsesReasoningDoneEvent$inboundSchema: z.ZodType< OpenResponsesReasoningDoneEvent, unknown > = z.object({ - type: OpenResponsesReasoningDoneEventType$inboundSchema, + type: z.literal("response.reasoning_text.done"), output_index: z.number(), item_id: z.string(), content_index: z.number(), diff --git a/src/models/openresponsesreasoningsummarypartaddedevent.ts b/src/models/openresponsesreasoningsummarypartaddedevent.ts index f6ecdca9..2aed51bb 100644 --- a/src/models/openresponsesreasoningsummarypartaddedevent.ts +++ b/src/models/openresponsesreasoningsummarypartaddedevent.ts @@ -5,7 +5,6 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; -import { ClosedEnum } from "../types/enums.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; import { @@ -13,18 +12,11 @@ import { ReasoningSummaryText$inboundSchema, } from "./reasoningsummarytext.js"; -export const OpenResponsesReasoningSummaryPartAddedEventType = { - ResponseReasoningSummaryPartAdded: "response.reasoning_summary_part.added", -} as const; -export type OpenResponsesReasoningSummaryPartAddedEventType = ClosedEnum< - typeof OpenResponsesReasoningSummaryPartAddedEventType ->; - /** * Event emitted when a reasoning summary part is added */ export type OpenResponsesReasoningSummaryPartAddedEvent = { - type: OpenResponsesReasoningSummaryPartAddedEventType; + type: "response.reasoning_summary_part.added"; outputIndex: number; itemId: string; summaryIndex: number; @@ -32,16 +24,10 @@ export type OpenResponsesReasoningSummaryPartAddedEvent = { sequenceNumber: number; }; -/** @internal */ -export const OpenResponsesReasoningSummaryPartAddedEventType$inboundSchema: - z.ZodEnum = z.enum( - OpenResponsesReasoningSummaryPartAddedEventType, - ); - /** @internal */ export const OpenResponsesReasoningSummaryPartAddedEvent$inboundSchema: z.ZodType = z.object({ - type: OpenResponsesReasoningSummaryPartAddedEventType$inboundSchema, + type: z.literal("response.reasoning_summary_part.added"), output_index: z.number(), item_id: z.string(), summary_index: z.number(), diff --git a/src/models/openresponsesreasoningsummarytextdeltaevent.ts b/src/models/openresponsesreasoningsummarytextdeltaevent.ts index a7e07d74..c0160cd6 100644 --- a/src/models/openresponsesreasoningsummarytextdeltaevent.ts +++ b/src/models/openresponsesreasoningsummarytextdeltaevent.ts @@ -5,22 +5,14 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; -import { ClosedEnum } from "../types/enums.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; -export const OpenResponsesReasoningSummaryTextDeltaEventType = { - ResponseReasoningSummaryTextDelta: "response.reasoning_summary_text.delta", -} as const; -export type OpenResponsesReasoningSummaryTextDeltaEventType = ClosedEnum< - typeof OpenResponsesReasoningSummaryTextDeltaEventType ->; - /** * Event emitted when reasoning summary text delta is streamed */ export type OpenResponsesReasoningSummaryTextDeltaEvent = { - type: OpenResponsesReasoningSummaryTextDeltaEventType; + type: "response.reasoning_summary_text.delta"; itemId: string; outputIndex: number; summaryIndex: number; @@ -28,16 +20,10 @@ export type OpenResponsesReasoningSummaryTextDeltaEvent = { sequenceNumber: number; }; -/** @internal */ -export const OpenResponsesReasoningSummaryTextDeltaEventType$inboundSchema: - z.ZodEnum = z.enum( - OpenResponsesReasoningSummaryTextDeltaEventType, - ); - /** @internal */ export const OpenResponsesReasoningSummaryTextDeltaEvent$inboundSchema: z.ZodType = z.object({ - type: OpenResponsesReasoningSummaryTextDeltaEventType$inboundSchema, + type: z.literal("response.reasoning_summary_text.delta"), item_id: z.string(), output_index: z.number(), summary_index: z.number(), diff --git a/src/models/openresponsesreasoningsummarytextdoneevent.ts b/src/models/openresponsesreasoningsummarytextdoneevent.ts index ee5782dd..cced6a23 100644 --- a/src/models/openresponsesreasoningsummarytextdoneevent.ts +++ b/src/models/openresponsesreasoningsummarytextdoneevent.ts @@ -5,22 +5,14 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; -import { ClosedEnum } from "../types/enums.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; -export const OpenResponsesReasoningSummaryTextDoneEventType = { - ResponseReasoningSummaryTextDone: "response.reasoning_summary_text.done", -} as const; -export type OpenResponsesReasoningSummaryTextDoneEventType = ClosedEnum< - typeof OpenResponsesReasoningSummaryTextDoneEventType ->; - /** * Event emitted when reasoning summary text streaming is complete */ export type OpenResponsesReasoningSummaryTextDoneEvent = { - type: OpenResponsesReasoningSummaryTextDoneEventType; + type: "response.reasoning_summary_text.done"; itemId: string; outputIndex: number; summaryIndex: number; @@ -28,16 +20,10 @@ export type OpenResponsesReasoningSummaryTextDoneEvent = { sequenceNumber: number; }; -/** @internal */ -export const OpenResponsesReasoningSummaryTextDoneEventType$inboundSchema: - z.ZodEnum = z.enum( - OpenResponsesReasoningSummaryTextDoneEventType, - ); - /** @internal */ export const OpenResponsesReasoningSummaryTextDoneEvent$inboundSchema: z.ZodType = z.object({ - type: OpenResponsesReasoningSummaryTextDoneEventType$inboundSchema, + type: z.literal("response.reasoning_summary_text.done"), item_id: z.string(), output_index: z.number(), summary_index: z.number(), diff --git a/src/models/openresponsesrequest.ts b/src/models/openresponsesrequest.ts index 142399b9..4ffc714e 100644 --- a/src/models/openresponsesrequest.ts +++ b/src/models/openresponsesrequest.ts @@ -5,7 +5,7 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../lib/primitives.js"; import * as openEnums from "../types/enums.js"; -import { ClosedEnum, OpenEnum } from "../types/enums.js"; +import { OpenEnum } from "../types/enums.js"; import { DataCollection, DataCollection$outboundSchema, @@ -63,18 +63,11 @@ import { ProviderName, ProviderName$outboundSchema } from "./providername.js"; import { ProviderSort, ProviderSort$outboundSchema } from "./providersort.js"; import { Quantization, Quantization$outboundSchema } from "./quantization.js"; -export const OpenResponsesRequestType = { - Function: "function", -} as const; -export type OpenResponsesRequestType = ClosedEnum< - typeof OpenResponsesRequestType ->; - /** * Function tool definition */ export type OpenResponsesRequestToolFunction = { - type: OpenResponsesRequestType; + type: "function"; name: string; description?: string | null | undefined; strict?: boolean | null | undefined; @@ -194,11 +187,6 @@ export type Provider = { maxPrice?: MaxPrice | undefined; }; -export const IdFileParser = { - FileParser: "file-parser", -} as const; -export type IdFileParser = ClosedEnum; - export const PdfEngine = { MistralOcr: "mistral-ocr", PdfText: "pdf-text", @@ -211,16 +199,11 @@ export type Pdf = { }; export type PluginFileParser = { - id: IdFileParser; + id: "file-parser"; maxFiles?: number | undefined; pdf?: Pdf | undefined; }; -export const IdWeb = { - Web: "web", -} as const; -export type IdWeb = ClosedEnum; - export const Engine = { Native: "native", Exa: "exa", @@ -228,19 +211,14 @@ export const Engine = { export type Engine = OpenEnum; export type PluginWeb = { - id: IdWeb; + id: "web"; maxResults?: number | undefined; searchPrompt?: string | undefined; engine?: Engine | undefined; }; -export const IdModeration = { - Moderation: "moderation", -} as const; -export type IdModeration = ClosedEnum; - export type PluginModeration = { - id: IdModeration; + id: "moderation"; }; export type Plugin = PluginModeration | PluginWeb | PluginFileParser; @@ -307,14 +285,9 @@ export type OpenResponsesRequest = { user?: string | undefined; }; -/** @internal */ -export const OpenResponsesRequestType$outboundSchema: z.ZodEnum< - typeof OpenResponsesRequestType -> = z.enum(OpenResponsesRequestType); - /** @internal */ export type OpenResponsesRequestToolFunction$Outbound = { - type: string; + type: "function"; name: string; description?: string | null | undefined; strict?: boolean | null | undefined; @@ -326,7 +299,7 @@ export const OpenResponsesRequestToolFunction$outboundSchema: z.ZodType< OpenResponsesRequestToolFunction$Outbound, OpenResponsesRequestToolFunction > = z.object({ - type: OpenResponsesRequestType$outboundSchema, + type: z.literal("function"), name: z.string(), description: z.nullable(z.string()).optional(), strict: z.nullable(z.boolean()).optional(), @@ -490,10 +463,6 @@ export function providerToJSON(provider: Provider): string { return JSON.stringify(Provider$outboundSchema.parse(provider)); } -/** @internal */ -export const IdFileParser$outboundSchema: z.ZodEnum = z - .enum(IdFileParser); - /** @internal */ export const PdfEngine$outboundSchema: z.ZodType = openEnums .outboundSchema(PdfEngine); @@ -514,7 +483,7 @@ export function pdfToJSON(pdf: Pdf): string { /** @internal */ export type PluginFileParser$Outbound = { - id: string; + id: "file-parser"; max_files?: number | undefined; pdf?: Pdf$Outbound | undefined; }; @@ -524,7 +493,7 @@ export const PluginFileParser$outboundSchema: z.ZodType< PluginFileParser$Outbound, PluginFileParser > = z.object({ - id: IdFileParser$outboundSchema, + id: z.literal("file-parser"), maxFiles: z.number().optional(), pdf: z.lazy(() => Pdf$outboundSchema).optional(), }).transform((v) => { @@ -541,16 +510,13 @@ export function pluginFileParserToJSON( ); } -/** @internal */ -export const IdWeb$outboundSchema: z.ZodEnum = z.enum(IdWeb); - /** @internal */ export const Engine$outboundSchema: z.ZodType = openEnums .outboundSchema(Engine); /** @internal */ export type PluginWeb$Outbound = { - id: string; + id: "web"; max_results?: number | undefined; search_prompt?: string | undefined; engine?: string | undefined; @@ -561,7 +527,7 @@ export const PluginWeb$outboundSchema: z.ZodType< PluginWeb$Outbound, PluginWeb > = z.object({ - id: IdWeb$outboundSchema, + id: z.literal("web"), maxResults: z.number().optional(), searchPrompt: z.string().optional(), engine: Engine$outboundSchema.optional(), @@ -576,13 +542,9 @@ export function pluginWebToJSON(pluginWeb: PluginWeb): string { return JSON.stringify(PluginWeb$outboundSchema.parse(pluginWeb)); } -/** @internal */ -export const IdModeration$outboundSchema: z.ZodEnum = z - .enum(IdModeration); - /** @internal */ export type PluginModeration$Outbound = { - id: string; + id: "moderation"; }; /** @internal */ @@ -590,7 +552,7 @@ export const PluginModeration$outboundSchema: z.ZodType< PluginModeration$Outbound, PluginModeration > = z.object({ - id: IdModeration$outboundSchema, + id: z.literal("moderation"), }); export function pluginModerationToJSON( diff --git a/src/models/openresponsesstreamevent.ts b/src/models/openresponsesstreamevent.ts index 4de1d671..f38f9125 100644 --- a/src/models/openresponsesstreamevent.ts +++ b/src/models/openresponsesstreamevent.ts @@ -5,7 +5,6 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; -import { ClosedEnum } from "../types/enums.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; import { @@ -81,18 +80,11 @@ import { ResponsesOutputItem$inboundSchema, } from "./responsesoutputitem.js"; -export const TypeResponseReasoningSummaryPartDone = { - ResponseReasoningSummaryPartDone: "response.reasoning_summary_part.done", -} as const; -export type TypeResponseReasoningSummaryPartDone = ClosedEnum< - typeof TypeResponseReasoningSummaryPartDone ->; - /** * Event emitted when a reasoning summary part is complete */ export type OpenResponsesStreamEventResponseReasoningSummaryPartDone = { - type: TypeResponseReasoningSummaryPartDone; + type: "response.reasoning_summary_part.done"; outputIndex: number; itemId: string; summaryIndex: number; @@ -100,18 +92,11 @@ export type OpenResponsesStreamEventResponseReasoningSummaryPartDone = { sequenceNumber: number; }; -export const TypeResponseFunctionCallArgumentsDone = { - ResponseFunctionCallArgumentsDone: "response.function_call_arguments.done", -} as const; -export type TypeResponseFunctionCallArgumentsDone = ClosedEnum< - typeof TypeResponseFunctionCallArgumentsDone ->; - /** * Event emitted when function call arguments streaming is complete */ export type OpenResponsesStreamEventResponseFunctionCallArgumentsDone = { - type: TypeResponseFunctionCallArgumentsDone; + type: "response.function_call_arguments.done"; itemId: string; outputIndex: number; name: string; @@ -119,36 +104,22 @@ export type OpenResponsesStreamEventResponseFunctionCallArgumentsDone = { sequenceNumber: number; }; -export const TypeResponseFunctionCallArgumentsDelta = { - ResponseFunctionCallArgumentsDelta: "response.function_call_arguments.delta", -} as const; -export type TypeResponseFunctionCallArgumentsDelta = ClosedEnum< - typeof TypeResponseFunctionCallArgumentsDelta ->; - /** * Event emitted when function call arguments are being streamed */ export type OpenResponsesStreamEventResponseFunctionCallArgumentsDelta = { - type: TypeResponseFunctionCallArgumentsDelta; + type: "response.function_call_arguments.delta"; itemId: string; outputIndex: number; delta: string; sequenceNumber: number; }; -export const TypeResponseOutputTextAnnotationAdded = { - ResponseOutputTextAnnotationAdded: "response.output_text.annotation.added", -} as const; -export type TypeResponseOutputTextAnnotationAdded = ClosedEnum< - typeof TypeResponseOutputTextAnnotationAdded ->; - /** * Event emitted when a text annotation is added to output */ export type OpenResponsesStreamEventResponseOutputTextAnnotationAdded = { - type: TypeResponseOutputTextAnnotationAdded; + type: "response.output_text.annotation.added"; outputIndex: number; itemId: string; contentIndex: number; @@ -157,18 +128,11 @@ export type OpenResponsesStreamEventResponseOutputTextAnnotationAdded = { annotation: OpenAIResponsesAnnotation; }; -export const TypeResponseRefusalDone = { - ResponseRefusalDone: "response.refusal.done", -} as const; -export type TypeResponseRefusalDone = ClosedEnum< - typeof TypeResponseRefusalDone ->; - /** * Event emitted when refusal streaming is complete */ export type OpenResponsesStreamEventResponseRefusalDone = { - type: TypeResponseRefusalDone; + type: "response.refusal.done"; outputIndex: number; itemId: string; contentIndex: number; @@ -176,18 +140,11 @@ export type OpenResponsesStreamEventResponseRefusalDone = { sequenceNumber: number; }; -export const TypeResponseRefusalDelta = { - ResponseRefusalDelta: "response.refusal.delta", -} as const; -export type TypeResponseRefusalDelta = ClosedEnum< - typeof TypeResponseRefusalDelta ->; - /** * Event emitted when a refusal delta is streamed */ export type OpenResponsesStreamEventResponseRefusalDelta = { - type: TypeResponseRefusalDelta; + type: "response.refusal.delta"; outputIndex: number; itemId: string; contentIndex: number; @@ -195,18 +152,11 @@ export type OpenResponsesStreamEventResponseRefusalDelta = { sequenceNumber: number; }; -export const TypeResponseOutputTextDone = { - ResponseOutputTextDone: "response.output_text.done", -} as const; -export type TypeResponseOutputTextDone = ClosedEnum< - typeof TypeResponseOutputTextDone ->; - /** * Event emitted when text streaming is complete */ export type OpenResponsesStreamEventResponseOutputTextDone = { - type: TypeResponseOutputTextDone; + type: "response.output_text.done"; outputIndex: number; itemId: string; contentIndex: number; @@ -215,18 +165,11 @@ export type OpenResponsesStreamEventResponseOutputTextDone = { logprobs: Array; }; -export const TypeResponseOutputTextDelta = { - ResponseOutputTextDelta: "response.output_text.delta", -} as const; -export type TypeResponseOutputTextDelta = ClosedEnum< - typeof TypeResponseOutputTextDelta ->; - /** * Event emitted when a text delta is streamed */ export type OpenResponsesStreamEventResponseOutputTextDelta = { - type: TypeResponseOutputTextDelta; + type: "response.output_text.delta"; logprobs: Array; outputIndex: number; itemId: string; @@ -235,72 +178,51 @@ export type OpenResponsesStreamEventResponseOutputTextDelta = { sequenceNumber: number; }; -export const TypeResponseContentPartDone = { - ResponseContentPartDone: "response.content_part.done", -} as const; -export type TypeResponseContentPartDone = ClosedEnum< - typeof TypeResponseContentPartDone ->; - export type Part2 = | ResponseOutputText - | ReasoningTextContent + | (ReasoningTextContent & { type: "reasoning_text" }) | OpenAIResponsesRefusalContent; /** * Event emitted when a content part is complete */ export type OpenResponsesStreamEventResponseContentPartDone = { - type: TypeResponseContentPartDone; + type: "response.content_part.done"; outputIndex: number; itemId: string; contentIndex: number; part: | ResponseOutputText - | ReasoningTextContent + | (ReasoningTextContent & { type: "reasoning_text" }) | OpenAIResponsesRefusalContent; sequenceNumber: number; }; -export const TypeResponseContentPartAdded = { - ResponseContentPartAdded: "response.content_part.added", -} as const; -export type TypeResponseContentPartAdded = ClosedEnum< - typeof TypeResponseContentPartAdded ->; - export type Part1 = | ResponseOutputText - | ReasoningTextContent + | (ReasoningTextContent & { type: "reasoning_text" }) | OpenAIResponsesRefusalContent; /** * Event emitted when a new content part is added to an output item */ export type OpenResponsesStreamEventResponseContentPartAdded = { - type: TypeResponseContentPartAdded; + type: "response.content_part.added"; outputIndex: number; itemId: string; contentIndex: number; part: | ResponseOutputText - | ReasoningTextContent + | (ReasoningTextContent & { type: "reasoning_text" }) | OpenAIResponsesRefusalContent; sequenceNumber: number; }; -export const TypeResponseOutputItemDone = { - ResponseOutputItemDone: "response.output_item.done", -} as const; -export type TypeResponseOutputItemDone = ClosedEnum< - typeof TypeResponseOutputItemDone ->; - /** * Event emitted when an output item is complete */ export type OpenResponsesStreamEventResponseOutputItemDone = { - type: TypeResponseOutputItemDone; + type: "response.output_item.done"; outputIndex: number; /** * An output item from the response @@ -309,18 +231,11 @@ export type OpenResponsesStreamEventResponseOutputItemDone = { sequenceNumber: number; }; -export const TypeResponseOutputItemAdded = { - ResponseOutputItemAdded: "response.output_item.added", -} as const; -export type TypeResponseOutputItemAdded = ClosedEnum< - typeof TypeResponseOutputItemAdded ->; - /** * Event emitted when a new output item is added to the response */ export type OpenResponsesStreamEventResponseOutputItemAdded = { - type: TypeResponseOutputItemAdded; + type: "response.output_item.added"; outputIndex: number; /** * An output item from the response @@ -329,16 +244,11 @@ export type OpenResponsesStreamEventResponseOutputItemAdded = { sequenceNumber: number; }; -export const TypeResponseFailed = { - ResponseFailed: "response.failed", -} as const; -export type TypeResponseFailed = ClosedEnum; - /** * Event emitted when a response has failed */ export type OpenResponsesStreamEventResponseFailed = { - type: TypeResponseFailed; + type: "response.failed"; /** * Complete non-streaming response from the Responses API */ @@ -346,16 +256,11 @@ export type OpenResponsesStreamEventResponseFailed = { sequenceNumber: number; }; -export const TypeResponseIncomplete = { - ResponseIncomplete: "response.incomplete", -} as const; -export type TypeResponseIncomplete = ClosedEnum; - /** * Event emitted when a response is incomplete */ export type OpenResponsesStreamEventResponseIncomplete = { - type: TypeResponseIncomplete; + type: "response.incomplete"; /** * Complete non-streaming response from the Responses API */ @@ -363,16 +268,11 @@ export type OpenResponsesStreamEventResponseIncomplete = { sequenceNumber: number; }; -export const TypeResponseCompleted = { - ResponseCompleted: "response.completed", -} as const; -export type TypeResponseCompleted = ClosedEnum; - /** * Event emitted when a response has completed successfully */ export type OpenResponsesStreamEventResponseCompleted = { - type: TypeResponseCompleted; + type: "response.completed"; /** * Complete non-streaming response from the Responses API */ @@ -380,16 +280,11 @@ export type OpenResponsesStreamEventResponseCompleted = { sequenceNumber: number; }; -export const TypeResponseInProgress = { - ResponseInProgress: "response.in_progress", -} as const; -export type TypeResponseInProgress = ClosedEnum; - /** * Event emitted when a response is in progress */ export type OpenResponsesStreamEventResponseInProgress = { - type: TypeResponseInProgress; + type: "response.in_progress"; /** * Complete non-streaming response from the Responses API */ @@ -397,16 +292,11 @@ export type OpenResponsesStreamEventResponseInProgress = { sequenceNumber: number; }; -export const TypeResponseCreated = { - ResponseCreated: "response.created", -} as const; -export type TypeResponseCreated = ClosedEnum; - /** * Event emitted when a response is created */ export type OpenResponsesStreamEventResponseCreated = { - type: TypeResponseCreated; + type: "response.created"; /** * Complete non-streaming response from the Responses API */ @@ -418,13 +308,22 @@ export type OpenResponsesStreamEventResponseCreated = { * Union of all possible event types emitted during response streaming */ export type OpenResponsesStreamEvent = - | OpenResponsesStreamEventResponseOutputTextDelta - | OpenResponsesStreamEventResponseOutputTextDone - | OpenResponsesStreamEventResponseOutputTextAnnotationAdded + | OpenResponsesStreamEventResponseCreated + | OpenResponsesStreamEventResponseInProgress + | OpenResponsesStreamEventResponseCompleted + | OpenResponsesStreamEventResponseIncomplete + | OpenResponsesStreamEventResponseFailed + | OpenResponsesErrorEvent + | OpenResponsesStreamEventResponseOutputItemAdded + | OpenResponsesStreamEventResponseOutputItemDone | OpenResponsesStreamEventResponseContentPartAdded | OpenResponsesStreamEventResponseContentPartDone + | OpenResponsesStreamEventResponseOutputTextDelta + | OpenResponsesStreamEventResponseOutputTextDone | OpenResponsesStreamEventResponseRefusalDelta | OpenResponsesStreamEventResponseRefusalDone + | OpenResponsesStreamEventResponseOutputTextAnnotationAdded + | OpenResponsesStreamEventResponseFunctionCallArgumentsDelta | OpenResponsesStreamEventResponseFunctionCallArgumentsDone | OpenResponsesReasoningDeltaEvent | OpenResponsesReasoningDoneEvent @@ -432,30 +331,16 @@ export type OpenResponsesStreamEvent = | OpenResponsesStreamEventResponseReasoningSummaryPartDone | OpenResponsesReasoningSummaryTextDeltaEvent | OpenResponsesReasoningSummaryTextDoneEvent - | OpenResponsesImageGenCallPartialImage - | OpenResponsesErrorEvent - | OpenResponsesStreamEventResponseFunctionCallArgumentsDelta - | OpenResponsesStreamEventResponseOutputItemAdded - | OpenResponsesStreamEventResponseOutputItemDone | OpenResponsesImageGenCallInProgress | OpenResponsesImageGenCallGenerating - | OpenResponsesImageGenCallCompleted - | OpenResponsesStreamEventResponseCreated - | OpenResponsesStreamEventResponseInProgress - | OpenResponsesStreamEventResponseCompleted - | OpenResponsesStreamEventResponseIncomplete - | OpenResponsesStreamEventResponseFailed; - -/** @internal */ -export const TypeResponseReasoningSummaryPartDone$inboundSchema: z.ZodEnum< - typeof TypeResponseReasoningSummaryPartDone -> = z.enum(TypeResponseReasoningSummaryPartDone); + | OpenResponsesImageGenCallPartialImage + | OpenResponsesImageGenCallCompleted; /** @internal */ export const OpenResponsesStreamEventResponseReasoningSummaryPartDone$inboundSchema: z.ZodType = z.object({ - type: TypeResponseReasoningSummaryPartDone$inboundSchema, + type: z.literal("response.reasoning_summary_part.done"), output_index: z.number(), item_id: z.string(), summary_index: z.number(), @@ -485,18 +370,13 @@ export function openResponsesStreamEventResponseReasoningSummaryPartDoneFromJSON ); } -/** @internal */ -export const TypeResponseFunctionCallArgumentsDone$inboundSchema: z.ZodEnum< - typeof TypeResponseFunctionCallArgumentsDone -> = z.enum(TypeResponseFunctionCallArgumentsDone); - /** @internal */ export const OpenResponsesStreamEventResponseFunctionCallArgumentsDone$inboundSchema: z.ZodType< OpenResponsesStreamEventResponseFunctionCallArgumentsDone, unknown > = z.object({ - type: TypeResponseFunctionCallArgumentsDone$inboundSchema, + type: z.literal("response.function_call_arguments.done"), item_id: z.string(), output_index: z.number(), name: z.string(), @@ -525,18 +405,13 @@ export function openResponsesStreamEventResponseFunctionCallArgumentsDoneFromJSO ); } -/** @internal */ -export const TypeResponseFunctionCallArgumentsDelta$inboundSchema: z.ZodEnum< - typeof TypeResponseFunctionCallArgumentsDelta -> = z.enum(TypeResponseFunctionCallArgumentsDelta); - /** @internal */ export const OpenResponsesStreamEventResponseFunctionCallArgumentsDelta$inboundSchema: z.ZodType< OpenResponsesStreamEventResponseFunctionCallArgumentsDelta, unknown > = z.object({ - type: TypeResponseFunctionCallArgumentsDelta$inboundSchema, + type: z.literal("response.function_call_arguments.delta"), item_id: z.string(), output_index: z.number(), delta: z.string(), @@ -564,18 +439,13 @@ export function openResponsesStreamEventResponseFunctionCallArgumentsDeltaFromJS ); } -/** @internal */ -export const TypeResponseOutputTextAnnotationAdded$inboundSchema: z.ZodEnum< - typeof TypeResponseOutputTextAnnotationAdded -> = z.enum(TypeResponseOutputTextAnnotationAdded); - /** @internal */ export const OpenResponsesStreamEventResponseOutputTextAnnotationAdded$inboundSchema: z.ZodType< OpenResponsesStreamEventResponseOutputTextAnnotationAdded, unknown > = z.object({ - type: TypeResponseOutputTextAnnotationAdded$inboundSchema, + type: z.literal("response.output_text.annotation.added"), output_index: z.number(), item_id: z.string(), content_index: z.number(), @@ -607,15 +477,10 @@ export function openResponsesStreamEventResponseOutputTextAnnotationAddedFromJSO ); } -/** @internal */ -export const TypeResponseRefusalDone$inboundSchema: z.ZodEnum< - typeof TypeResponseRefusalDone -> = z.enum(TypeResponseRefusalDone); - /** @internal */ export const OpenResponsesStreamEventResponseRefusalDone$inboundSchema: z.ZodType = z.object({ - type: TypeResponseRefusalDone$inboundSchema, + type: z.literal("response.refusal.done"), output_index: z.number(), item_id: z.string(), content_index: z.number(), @@ -646,15 +511,10 @@ export function openResponsesStreamEventResponseRefusalDoneFromJSON( ); } -/** @internal */ -export const TypeResponseRefusalDelta$inboundSchema: z.ZodEnum< - typeof TypeResponseRefusalDelta -> = z.enum(TypeResponseRefusalDelta); - /** @internal */ export const OpenResponsesStreamEventResponseRefusalDelta$inboundSchema: z.ZodType = z.object({ - type: TypeResponseRefusalDelta$inboundSchema, + type: z.literal("response.refusal.delta"), output_index: z.number(), item_id: z.string(), content_index: z.number(), @@ -685,16 +545,11 @@ export function openResponsesStreamEventResponseRefusalDeltaFromJSON( ); } -/** @internal */ -export const TypeResponseOutputTextDone$inboundSchema: z.ZodEnum< - typeof TypeResponseOutputTextDone -> = z.enum(TypeResponseOutputTextDone); - /** @internal */ export const OpenResponsesStreamEventResponseOutputTextDone$inboundSchema: z.ZodType = z.object( { - type: TypeResponseOutputTextDone$inboundSchema, + type: z.literal("response.output_text.done"), output_index: z.number(), item_id: z.string(), content_index: z.number(), @@ -727,16 +582,11 @@ export function openResponsesStreamEventResponseOutputTextDoneFromJSON( ); } -/** @internal */ -export const TypeResponseOutputTextDelta$inboundSchema: z.ZodEnum< - typeof TypeResponseOutputTextDelta -> = z.enum(TypeResponseOutputTextDelta); - /** @internal */ export const OpenResponsesStreamEventResponseOutputTextDelta$inboundSchema: z.ZodType = z .object({ - type: TypeResponseOutputTextDelta$inboundSchema, + type: z.literal("response.output_text.delta"), logprobs: z.array(OpenResponsesLogProbs$inboundSchema), output_index: z.number(), item_id: z.string(), @@ -768,15 +618,12 @@ export function openResponsesStreamEventResponseOutputTextDeltaFromJSON( ); } -/** @internal */ -export const TypeResponseContentPartDone$inboundSchema: z.ZodEnum< - typeof TypeResponseContentPartDone -> = z.enum(TypeResponseContentPartDone); - /** @internal */ export const Part2$inboundSchema: z.ZodType = z.union([ ResponseOutputText$inboundSchema, - ReasoningTextContent$inboundSchema, + ReasoningTextContent$inboundSchema.and( + z.object({ type: z.literal("reasoning_text") }), + ), OpenAIResponsesRefusalContent$inboundSchema, ]); @@ -794,13 +641,15 @@ export function part2FromJSON( export const OpenResponsesStreamEventResponseContentPartDone$inboundSchema: z.ZodType = z .object({ - type: TypeResponseContentPartDone$inboundSchema, + type: z.literal("response.content_part.done"), output_index: z.number(), item_id: z.string(), content_index: z.number(), part: z.union([ ResponseOutputText$inboundSchema, - ReasoningTextContent$inboundSchema, + ReasoningTextContent$inboundSchema.and( + z.object({ type: z.literal("reasoning_text") }), + ), OpenAIResponsesRefusalContent$inboundSchema, ]), sequence_number: z.number(), @@ -829,15 +678,12 @@ export function openResponsesStreamEventResponseContentPartDoneFromJSON( ); } -/** @internal */ -export const TypeResponseContentPartAdded$inboundSchema: z.ZodEnum< - typeof TypeResponseContentPartAdded -> = z.enum(TypeResponseContentPartAdded); - /** @internal */ export const Part1$inboundSchema: z.ZodType = z.union([ ResponseOutputText$inboundSchema, - ReasoningTextContent$inboundSchema, + ReasoningTextContent$inboundSchema.and( + z.object({ type: z.literal("reasoning_text") }), + ), OpenAIResponsesRefusalContent$inboundSchema, ]); @@ -855,13 +701,15 @@ export function part1FromJSON( export const OpenResponsesStreamEventResponseContentPartAdded$inboundSchema: z.ZodType = z .object({ - type: TypeResponseContentPartAdded$inboundSchema, + type: z.literal("response.content_part.added"), output_index: z.number(), item_id: z.string(), content_index: z.number(), part: z.union([ ResponseOutputText$inboundSchema, - ReasoningTextContent$inboundSchema, + ReasoningTextContent$inboundSchema.and( + z.object({ type: z.literal("reasoning_text") }), + ), OpenAIResponsesRefusalContent$inboundSchema, ]), sequence_number: z.number(), @@ -890,16 +738,11 @@ export function openResponsesStreamEventResponseContentPartAddedFromJSON( ); } -/** @internal */ -export const TypeResponseOutputItemDone$inboundSchema: z.ZodEnum< - typeof TypeResponseOutputItemDone -> = z.enum(TypeResponseOutputItemDone); - /** @internal */ export const OpenResponsesStreamEventResponseOutputItemDone$inboundSchema: z.ZodType = z.object( { - type: TypeResponseOutputItemDone$inboundSchema, + type: z.literal("response.output_item.done"), output_index: z.number(), item: ResponsesOutputItem$inboundSchema, sequence_number: z.number(), @@ -927,16 +770,11 @@ export function openResponsesStreamEventResponseOutputItemDoneFromJSON( ); } -/** @internal */ -export const TypeResponseOutputItemAdded$inboundSchema: z.ZodEnum< - typeof TypeResponseOutputItemAdded -> = z.enum(TypeResponseOutputItemAdded); - /** @internal */ export const OpenResponsesStreamEventResponseOutputItemAdded$inboundSchema: z.ZodType = z .object({ - type: TypeResponseOutputItemAdded$inboundSchema, + type: z.literal("response.output_item.added"), output_index: z.number(), item: ResponsesOutputItem$inboundSchema, sequence_number: z.number(), @@ -963,17 +801,12 @@ export function openResponsesStreamEventResponseOutputItemAddedFromJSON( ); } -/** @internal */ -export const TypeResponseFailed$inboundSchema: z.ZodEnum< - typeof TypeResponseFailed -> = z.enum(TypeResponseFailed); - /** @internal */ export const OpenResponsesStreamEventResponseFailed$inboundSchema: z.ZodType< OpenResponsesStreamEventResponseFailed, unknown > = z.object({ - type: TypeResponseFailed$inboundSchema, + type: z.literal("response.failed"), response: OpenResponsesNonStreamingResponse$inboundSchema, sequence_number: z.number(), }).transform((v) => { @@ -993,15 +826,10 @@ export function openResponsesStreamEventResponseFailedFromJSON( ); } -/** @internal */ -export const TypeResponseIncomplete$inboundSchema: z.ZodEnum< - typeof TypeResponseIncomplete -> = z.enum(TypeResponseIncomplete); - /** @internal */ export const OpenResponsesStreamEventResponseIncomplete$inboundSchema: z.ZodType = z.object({ - type: TypeResponseIncomplete$inboundSchema, + type: z.literal("response.incomplete"), response: OpenResponsesNonStreamingResponse$inboundSchema, sequence_number: z.number(), }).transform((v) => { @@ -1026,17 +854,12 @@ export function openResponsesStreamEventResponseIncompleteFromJSON( ); } -/** @internal */ -export const TypeResponseCompleted$inboundSchema: z.ZodEnum< - typeof TypeResponseCompleted -> = z.enum(TypeResponseCompleted); - /** @internal */ export const OpenResponsesStreamEventResponseCompleted$inboundSchema: z.ZodType< OpenResponsesStreamEventResponseCompleted, unknown > = z.object({ - type: TypeResponseCompleted$inboundSchema, + type: z.literal("response.completed"), response: OpenResponsesNonStreamingResponse$inboundSchema, sequence_number: z.number(), }).transform((v) => { @@ -1061,15 +884,10 @@ export function openResponsesStreamEventResponseCompletedFromJSON( ); } -/** @internal */ -export const TypeResponseInProgress$inboundSchema: z.ZodEnum< - typeof TypeResponseInProgress -> = z.enum(TypeResponseInProgress); - /** @internal */ export const OpenResponsesStreamEventResponseInProgress$inboundSchema: z.ZodType = z.object({ - type: TypeResponseInProgress$inboundSchema, + type: z.literal("response.in_progress"), response: OpenResponsesNonStreamingResponse$inboundSchema, sequence_number: z.number(), }).transform((v) => { @@ -1094,17 +912,12 @@ export function openResponsesStreamEventResponseInProgressFromJSON( ); } -/** @internal */ -export const TypeResponseCreated$inboundSchema: z.ZodEnum< - typeof TypeResponseCreated -> = z.enum(TypeResponseCreated); - /** @internal */ export const OpenResponsesStreamEventResponseCreated$inboundSchema: z.ZodType< OpenResponsesStreamEventResponseCreated, unknown > = z.object({ - type: TypeResponseCreated$inboundSchema, + type: z.literal("response.created"), response: OpenResponsesNonStreamingResponse$inboundSchema, sequence_number: z.number(), }).transform((v) => { @@ -1134,15 +947,26 @@ export const OpenResponsesStreamEvent$inboundSchema: z.ZodType< OpenResponsesStreamEvent, unknown > = z.union([ + z.lazy(() => OpenResponsesStreamEventResponseCreated$inboundSchema), + z.lazy(() => OpenResponsesStreamEventResponseInProgress$inboundSchema), + z.lazy(() => OpenResponsesStreamEventResponseCompleted$inboundSchema), + z.lazy(() => OpenResponsesStreamEventResponseIncomplete$inboundSchema), + z.lazy(() => OpenResponsesStreamEventResponseFailed$inboundSchema), + OpenResponsesErrorEvent$inboundSchema, + z.lazy(() => OpenResponsesStreamEventResponseOutputItemAdded$inboundSchema), + z.lazy(() => OpenResponsesStreamEventResponseOutputItemDone$inboundSchema), + z.lazy(() => OpenResponsesStreamEventResponseContentPartAdded$inboundSchema), + z.lazy(() => OpenResponsesStreamEventResponseContentPartDone$inboundSchema), z.lazy(() => OpenResponsesStreamEventResponseOutputTextDelta$inboundSchema), z.lazy(() => OpenResponsesStreamEventResponseOutputTextDone$inboundSchema), + z.lazy(() => OpenResponsesStreamEventResponseRefusalDelta$inboundSchema), + z.lazy(() => OpenResponsesStreamEventResponseRefusalDone$inboundSchema), z.lazy(() => OpenResponsesStreamEventResponseOutputTextAnnotationAdded$inboundSchema ), - z.lazy(() => OpenResponsesStreamEventResponseContentPartAdded$inboundSchema), - z.lazy(() => OpenResponsesStreamEventResponseContentPartDone$inboundSchema), - z.lazy(() => OpenResponsesStreamEventResponseRefusalDelta$inboundSchema), - z.lazy(() => OpenResponsesStreamEventResponseRefusalDone$inboundSchema), + z.lazy(() => + OpenResponsesStreamEventResponseFunctionCallArgumentsDelta$inboundSchema + ), z.lazy(() => OpenResponsesStreamEventResponseFunctionCallArgumentsDone$inboundSchema ), @@ -1154,21 +978,10 @@ export const OpenResponsesStreamEvent$inboundSchema: z.ZodType< ), OpenResponsesReasoningSummaryTextDeltaEvent$inboundSchema, OpenResponsesReasoningSummaryTextDoneEvent$inboundSchema, - OpenResponsesImageGenCallPartialImage$inboundSchema, - OpenResponsesErrorEvent$inboundSchema, - z.lazy(() => - OpenResponsesStreamEventResponseFunctionCallArgumentsDelta$inboundSchema - ), - z.lazy(() => OpenResponsesStreamEventResponseOutputItemAdded$inboundSchema), - z.lazy(() => OpenResponsesStreamEventResponseOutputItemDone$inboundSchema), OpenResponsesImageGenCallInProgress$inboundSchema, OpenResponsesImageGenCallGenerating$inboundSchema, + OpenResponsesImageGenCallPartialImage$inboundSchema, OpenResponsesImageGenCallCompleted$inboundSchema, - z.lazy(() => OpenResponsesStreamEventResponseCreated$inboundSchema), - z.lazy(() => OpenResponsesStreamEventResponseInProgress$inboundSchema), - z.lazy(() => OpenResponsesStreamEventResponseCompleted$inboundSchema), - z.lazy(() => OpenResponsesStreamEventResponseIncomplete$inboundSchema), - z.lazy(() => OpenResponsesStreamEventResponseFailed$inboundSchema), ]); export function openResponsesStreamEventFromJSON( diff --git a/src/models/openresponseswebsearch20250826tool.ts b/src/models/openresponseswebsearch20250826tool.ts index 180c7705..2b54b4f1 100644 --- a/src/models/openresponseswebsearch20250826tool.ts +++ b/src/models/openresponseswebsearch20250826tool.ts @@ -5,7 +5,6 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; -import { ClosedEnum } from "../types/enums.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; import { @@ -20,13 +19,6 @@ import { ResponsesWebSearchUserLocation$outboundSchema, } from "./responseswebsearchuserlocation.js"; -export const OpenResponsesWebSearch20250826ToolType = { - WebSearch20250826: "web_search_2025_08_26", -} as const; -export type OpenResponsesWebSearch20250826ToolType = ClosedEnum< - typeof OpenResponsesWebSearch20250826ToolType ->; - export type OpenResponsesWebSearch20250826ToolFilters = { allowedDomains?: Array | null | undefined; }; @@ -35,7 +27,7 @@ export type OpenResponsesWebSearch20250826ToolFilters = { * Web search tool configuration (2025-08-26 version) */ export type OpenResponsesWebSearch20250826Tool = { - type: OpenResponsesWebSearch20250826ToolType; + type: "web_search_2025_08_26"; filters?: OpenResponsesWebSearch20250826ToolFilters | null | undefined; /** * Size of the search context for web search tools @@ -47,15 +39,6 @@ export type OpenResponsesWebSearch20250826Tool = { userLocation?: ResponsesWebSearchUserLocation | null | undefined; }; -/** @internal */ -export const OpenResponsesWebSearch20250826ToolType$inboundSchema: z.ZodEnum< - typeof OpenResponsesWebSearch20250826ToolType -> = z.enum(OpenResponsesWebSearch20250826ToolType); -/** @internal */ -export const OpenResponsesWebSearch20250826ToolType$outboundSchema: z.ZodEnum< - typeof OpenResponsesWebSearch20250826ToolType -> = OpenResponsesWebSearch20250826ToolType$inboundSchema; - /** @internal */ export const OpenResponsesWebSearch20250826ToolFilters$inboundSchema: z.ZodType< OpenResponsesWebSearch20250826ToolFilters, @@ -116,7 +99,7 @@ export const OpenResponsesWebSearch20250826Tool$inboundSchema: z.ZodType< OpenResponsesWebSearch20250826Tool, unknown > = z.object({ - type: OpenResponsesWebSearch20250826ToolType$inboundSchema, + type: z.literal("web_search_2025_08_26"), filters: z.nullable( z.lazy(() => OpenResponsesWebSearch20250826ToolFilters$inboundSchema), ).optional(), @@ -131,7 +114,7 @@ export const OpenResponsesWebSearch20250826Tool$inboundSchema: z.ZodType< }); /** @internal */ export type OpenResponsesWebSearch20250826Tool$Outbound = { - type: string; + type: "web_search_2025_08_26"; filters?: | OpenResponsesWebSearch20250826ToolFilters$Outbound | null @@ -145,7 +128,7 @@ export const OpenResponsesWebSearch20250826Tool$outboundSchema: z.ZodType< OpenResponsesWebSearch20250826Tool$Outbound, OpenResponsesWebSearch20250826Tool > = z.object({ - type: OpenResponsesWebSearch20250826ToolType$outboundSchema, + type: z.literal("web_search_2025_08_26"), filters: z.nullable( z.lazy(() => OpenResponsesWebSearch20250826ToolFilters$outboundSchema), ).optional(), diff --git a/src/models/openresponseswebsearchpreview20250311tool.ts b/src/models/openresponseswebsearchpreview20250311tool.ts index a9ba0d63..a2ef0deb 100644 --- a/src/models/openresponseswebsearchpreview20250311tool.ts +++ b/src/models/openresponseswebsearchpreview20250311tool.ts @@ -5,7 +5,6 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; -import { ClosedEnum } from "../types/enums.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; import { @@ -20,18 +19,11 @@ import { WebSearchPreviewToolUserLocation$outboundSchema, } from "./websearchpreviewtooluserlocation.js"; -export const OpenResponsesWebSearchPreview20250311ToolType = { - WebSearchPreview20250311: "web_search_preview_2025_03_11", -} as const; -export type OpenResponsesWebSearchPreview20250311ToolType = ClosedEnum< - typeof OpenResponsesWebSearchPreview20250311ToolType ->; - /** * Web search preview tool configuration (2025-03-11 version) */ export type OpenResponsesWebSearchPreview20250311Tool = { - type: OpenResponsesWebSearchPreview20250311ToolType; + type: "web_search_preview_2025_03_11"; /** * Size of the search context for web search tools */ @@ -39,22 +31,12 @@ export type OpenResponsesWebSearchPreview20250311Tool = { userLocation?: WebSearchPreviewToolUserLocation | null | undefined; }; -/** @internal */ -export const OpenResponsesWebSearchPreview20250311ToolType$inboundSchema: - z.ZodEnum = z.enum( - OpenResponsesWebSearchPreview20250311ToolType, - ); -/** @internal */ -export const OpenResponsesWebSearchPreview20250311ToolType$outboundSchema: - z.ZodEnum = - OpenResponsesWebSearchPreview20250311ToolType$inboundSchema; - /** @internal */ export const OpenResponsesWebSearchPreview20250311Tool$inboundSchema: z.ZodType< OpenResponsesWebSearchPreview20250311Tool, unknown > = z.object({ - type: OpenResponsesWebSearchPreview20250311ToolType$inboundSchema, + type: z.literal("web_search_preview_2025_03_11"), search_context_size: ResponsesSearchContextSize$inboundSchema.optional(), user_location: z.nullable(WebSearchPreviewToolUserLocation$inboundSchema) .optional(), @@ -66,7 +48,7 @@ export const OpenResponsesWebSearchPreview20250311Tool$inboundSchema: z.ZodType< }); /** @internal */ export type OpenResponsesWebSearchPreview20250311Tool$Outbound = { - type: string; + type: "web_search_preview_2025_03_11"; search_context_size?: string | undefined; user_location?: WebSearchPreviewToolUserLocation$Outbound | null | undefined; }; @@ -77,7 +59,7 @@ export const OpenResponsesWebSearchPreview20250311Tool$outboundSchema: OpenResponsesWebSearchPreview20250311Tool$Outbound, OpenResponsesWebSearchPreview20250311Tool > = z.object({ - type: OpenResponsesWebSearchPreview20250311ToolType$outboundSchema, + type: z.literal("web_search_preview_2025_03_11"), searchContextSize: ResponsesSearchContextSize$outboundSchema.optional(), userLocation: z.nullable(WebSearchPreviewToolUserLocation$outboundSchema) .optional(), diff --git a/src/models/openresponseswebsearchpreviewtool.ts b/src/models/openresponseswebsearchpreviewtool.ts index 2ee856fc..02bf2042 100644 --- a/src/models/openresponseswebsearchpreviewtool.ts +++ b/src/models/openresponseswebsearchpreviewtool.ts @@ -5,7 +5,6 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; -import { ClosedEnum } from "../types/enums.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; import { @@ -20,18 +19,11 @@ import { WebSearchPreviewToolUserLocation$outboundSchema, } from "./websearchpreviewtooluserlocation.js"; -export const OpenResponsesWebSearchPreviewToolType = { - WebSearchPreview: "web_search_preview", -} as const; -export type OpenResponsesWebSearchPreviewToolType = ClosedEnum< - typeof OpenResponsesWebSearchPreviewToolType ->; - /** * Web search preview tool configuration */ export type OpenResponsesWebSearchPreviewTool = { - type: OpenResponsesWebSearchPreviewToolType; + type: "web_search_preview"; /** * Size of the search context for web search tools */ @@ -39,21 +31,12 @@ export type OpenResponsesWebSearchPreviewTool = { userLocation?: WebSearchPreviewToolUserLocation | null | undefined; }; -/** @internal */ -export const OpenResponsesWebSearchPreviewToolType$inboundSchema: z.ZodEnum< - typeof OpenResponsesWebSearchPreviewToolType -> = z.enum(OpenResponsesWebSearchPreviewToolType); -/** @internal */ -export const OpenResponsesWebSearchPreviewToolType$outboundSchema: z.ZodEnum< - typeof OpenResponsesWebSearchPreviewToolType -> = OpenResponsesWebSearchPreviewToolType$inboundSchema; - /** @internal */ export const OpenResponsesWebSearchPreviewTool$inboundSchema: z.ZodType< OpenResponsesWebSearchPreviewTool, unknown > = z.object({ - type: OpenResponsesWebSearchPreviewToolType$inboundSchema, + type: z.literal("web_search_preview"), search_context_size: ResponsesSearchContextSize$inboundSchema.optional(), user_location: z.nullable(WebSearchPreviewToolUserLocation$inboundSchema) .optional(), @@ -65,7 +48,7 @@ export const OpenResponsesWebSearchPreviewTool$inboundSchema: z.ZodType< }); /** @internal */ export type OpenResponsesWebSearchPreviewTool$Outbound = { - type: string; + type: "web_search_preview"; search_context_size?: string | undefined; user_location?: WebSearchPreviewToolUserLocation$Outbound | null | undefined; }; @@ -75,7 +58,7 @@ export const OpenResponsesWebSearchPreviewTool$outboundSchema: z.ZodType< OpenResponsesWebSearchPreviewTool$Outbound, OpenResponsesWebSearchPreviewTool > = z.object({ - type: OpenResponsesWebSearchPreviewToolType$outboundSchema, + type: z.literal("web_search_preview"), searchContextSize: ResponsesSearchContextSize$outboundSchema.optional(), userLocation: z.nullable(WebSearchPreviewToolUserLocation$outboundSchema) .optional(), diff --git a/src/models/openresponseswebsearchtool.ts b/src/models/openresponseswebsearchtool.ts index 8b683f1c..24137408 100644 --- a/src/models/openresponseswebsearchtool.ts +++ b/src/models/openresponseswebsearchtool.ts @@ -5,7 +5,6 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; -import { ClosedEnum } from "../types/enums.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; import { @@ -20,13 +19,6 @@ import { ResponsesWebSearchUserLocation$outboundSchema, } from "./responseswebsearchuserlocation.js"; -export const OpenResponsesWebSearchToolType = { - WebSearch: "web_search", -} as const; -export type OpenResponsesWebSearchToolType = ClosedEnum< - typeof OpenResponsesWebSearchToolType ->; - export type OpenResponsesWebSearchToolFilters = { allowedDomains?: Array | null | undefined; }; @@ -35,7 +27,7 @@ export type OpenResponsesWebSearchToolFilters = { * Web search tool configuration */ export type OpenResponsesWebSearchTool = { - type: OpenResponsesWebSearchToolType; + type: "web_search"; filters?: OpenResponsesWebSearchToolFilters | null | undefined; /** * Size of the search context for web search tools @@ -47,15 +39,6 @@ export type OpenResponsesWebSearchTool = { userLocation?: ResponsesWebSearchUserLocation | null | undefined; }; -/** @internal */ -export const OpenResponsesWebSearchToolType$inboundSchema: z.ZodEnum< - typeof OpenResponsesWebSearchToolType -> = z.enum(OpenResponsesWebSearchToolType); -/** @internal */ -export const OpenResponsesWebSearchToolType$outboundSchema: z.ZodEnum< - typeof OpenResponsesWebSearchToolType -> = OpenResponsesWebSearchToolType$inboundSchema; - /** @internal */ export const OpenResponsesWebSearchToolFilters$inboundSchema: z.ZodType< OpenResponsesWebSearchToolFilters, @@ -108,7 +91,7 @@ export const OpenResponsesWebSearchTool$inboundSchema: z.ZodType< OpenResponsesWebSearchTool, unknown > = z.object({ - type: OpenResponsesWebSearchToolType$inboundSchema, + type: z.literal("web_search"), filters: z.nullable( z.lazy(() => OpenResponsesWebSearchToolFilters$inboundSchema), ).optional(), @@ -123,7 +106,7 @@ export const OpenResponsesWebSearchTool$inboundSchema: z.ZodType< }); /** @internal */ export type OpenResponsesWebSearchTool$Outbound = { - type: string; + type: "web_search"; filters?: OpenResponsesWebSearchToolFilters$Outbound | null | undefined; search_context_size?: string | undefined; user_location?: ResponsesWebSearchUserLocation$Outbound | null | undefined; @@ -134,7 +117,7 @@ export const OpenResponsesWebSearchTool$outboundSchema: z.ZodType< OpenResponsesWebSearchTool$Outbound, OpenResponsesWebSearchTool > = z.object({ - type: OpenResponsesWebSearchToolType$outboundSchema, + type: z.literal("web_search"), filters: z.nullable( z.lazy(() => OpenResponsesWebSearchToolFilters$outboundSchema), ).optional(), diff --git a/src/models/operations/createembeddings.ts b/src/models/operations/createembeddings.ts index 9b438cc4..b533bbad 100644 --- a/src/models/operations/createembeddings.ts +++ b/src/models/operations/createembeddings.ts @@ -11,27 +11,17 @@ import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import * as models from "../index.js"; -export const TypeImageURL = { - ImageUrl: "image_url", -} as const; -export type TypeImageURL = ClosedEnum; - export type ImageUrl = { url: string; }; export type ContentImageURL = { - type: TypeImageURL; + type: "image_url"; imageUrl: ImageUrl; }; -export const TypeText = { - Text: "text", -} as const; -export type TypeText = ClosedEnum; - export type ContentText = { - type: TypeText; + type: "text"; text: string; }; @@ -194,10 +184,6 @@ export type CreateEmbeddingsResponseBody = { export type CreateEmbeddingsResponse = CreateEmbeddingsResponseBody | string; -/** @internal */ -export const TypeImageURL$outboundSchema: z.ZodEnum = z - .enum(TypeImageURL); - /** @internal */ export type ImageUrl$Outbound = { url: string; @@ -215,7 +201,7 @@ export function imageUrlToJSON(imageUrl: ImageUrl): string { /** @internal */ export type ContentImageURL$Outbound = { - type: string; + type: "image_url"; image_url: ImageUrl$Outbound; }; @@ -224,7 +210,7 @@ export const ContentImageURL$outboundSchema: z.ZodType< ContentImageURL$Outbound, ContentImageURL > = z.object({ - type: TypeImageURL$outboundSchema, + type: z.literal("image_url"), imageUrl: z.lazy(() => ImageUrl$outboundSchema), }).transform((v) => { return remap$(v, { @@ -238,14 +224,9 @@ export function contentImageURLToJSON( return JSON.stringify(ContentImageURL$outboundSchema.parse(contentImageURL)); } -/** @internal */ -export const TypeText$outboundSchema: z.ZodEnum = z.enum( - TypeText, -); - /** @internal */ export type ContentText$Outbound = { - type: string; + type: "text"; text: string; }; @@ -254,7 +235,7 @@ export const ContentText$outboundSchema: z.ZodType< ContentText$Outbound, ContentText > = z.object({ - type: TypeText$outboundSchema, + type: z.literal("text"), text: z.string(), }); diff --git a/src/models/responseformattextconfig.ts b/src/models/responseformattextconfig.ts index a62c7d8b..1deaf3cf 100644 --- a/src/models/responseformattextconfig.ts +++ b/src/models/responseformattextconfig.ts @@ -29,33 +29,33 @@ import { * Text response format configuration */ export type ResponseFormatTextConfig = - | ResponsesFormatTextJSONSchemaConfig | ResponsesFormatText - | ResponsesFormatJSONObject; + | ResponsesFormatJSONObject + | ResponsesFormatTextJSONSchemaConfig; /** @internal */ export const ResponseFormatTextConfig$inboundSchema: z.ZodType< ResponseFormatTextConfig, unknown > = z.union([ - ResponsesFormatTextJSONSchemaConfig$inboundSchema, ResponsesFormatText$inboundSchema, ResponsesFormatJSONObject$inboundSchema, + ResponsesFormatTextJSONSchemaConfig$inboundSchema, ]); /** @internal */ export type ResponseFormatTextConfig$Outbound = - | ResponsesFormatTextJSONSchemaConfig$Outbound | ResponsesFormatText$Outbound - | ResponsesFormatJSONObject$Outbound; + | ResponsesFormatJSONObject$Outbound + | ResponsesFormatTextJSONSchemaConfig$Outbound; /** @internal */ export const ResponseFormatTextConfig$outboundSchema: z.ZodType< ResponseFormatTextConfig$Outbound, ResponseFormatTextConfig > = z.union([ - ResponsesFormatTextJSONSchemaConfig$outboundSchema, ResponsesFormatText$outboundSchema, ResponsesFormatJSONObject$outboundSchema, + ResponsesFormatTextJSONSchemaConfig$outboundSchema, ]); export function responseFormatTextConfigToJSON( diff --git a/src/models/responseinputaudio.ts b/src/models/responseinputaudio.ts index c52ffda7..da7b24b1 100644 --- a/src/models/responseinputaudio.ts +++ b/src/models/responseinputaudio.ts @@ -6,15 +6,10 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import * as openEnums from "../types/enums.js"; -import { ClosedEnum, OpenEnum } from "../types/enums.js"; +import { OpenEnum } from "../types/enums.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; -export const ResponseInputAudioType = { - InputAudio: "input_audio", -} as const; -export type ResponseInputAudioType = ClosedEnum; - export const ResponseInputAudioFormat = { Mp3: "mp3", Wav: "wav", @@ -32,19 +27,10 @@ export type ResponseInputAudioInputAudio = { * Audio input content item */ export type ResponseInputAudio = { - type: ResponseInputAudioType; + type: "input_audio"; inputAudio: ResponseInputAudioInputAudio; }; -/** @internal */ -export const ResponseInputAudioType$inboundSchema: z.ZodEnum< - typeof ResponseInputAudioType -> = z.enum(ResponseInputAudioType); -/** @internal */ -export const ResponseInputAudioType$outboundSchema: z.ZodEnum< - typeof ResponseInputAudioType -> = ResponseInputAudioType$inboundSchema; - /** @internal */ export const ResponseInputAudioFormat$inboundSchema: z.ZodType< ResponseInputAudioFormat, @@ -103,7 +89,7 @@ export const ResponseInputAudio$inboundSchema: z.ZodType< ResponseInputAudio, unknown > = z.object({ - type: ResponseInputAudioType$inboundSchema, + type: z.literal("input_audio"), input_audio: z.lazy(() => ResponseInputAudioInputAudio$inboundSchema), }).transform((v) => { return remap$(v, { @@ -112,7 +98,7 @@ export const ResponseInputAudio$inboundSchema: z.ZodType< }); /** @internal */ export type ResponseInputAudio$Outbound = { - type: string; + type: "input_audio"; input_audio: ResponseInputAudioInputAudio$Outbound; }; @@ -121,7 +107,7 @@ export const ResponseInputAudio$outboundSchema: z.ZodType< ResponseInputAudio$Outbound, ResponseInputAudio > = z.object({ - type: ResponseInputAudioType$outboundSchema, + type: z.literal("input_audio"), inputAudio: z.lazy(() => ResponseInputAudioInputAudio$outboundSchema), }).transform((v) => { return remap$(v, { diff --git a/src/models/responseinputfile.ts b/src/models/responseinputfile.ts index 7774bd2c..8f59ccd2 100644 --- a/src/models/responseinputfile.ts +++ b/src/models/responseinputfile.ts @@ -5,41 +5,26 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; -import { ClosedEnum } from "../types/enums.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; -export const ResponseInputFileType = { - InputFile: "input_file", -} as const; -export type ResponseInputFileType = ClosedEnum; - /** * File input content item */ export type ResponseInputFile = { - type: ResponseInputFileType; + type: "input_file"; fileId?: string | null | undefined; fileData?: string | undefined; filename?: string | undefined; fileUrl?: string | undefined; }; -/** @internal */ -export const ResponseInputFileType$inboundSchema: z.ZodEnum< - typeof ResponseInputFileType -> = z.enum(ResponseInputFileType); -/** @internal */ -export const ResponseInputFileType$outboundSchema: z.ZodEnum< - typeof ResponseInputFileType -> = ResponseInputFileType$inboundSchema; - /** @internal */ export const ResponseInputFile$inboundSchema: z.ZodType< ResponseInputFile, unknown > = z.object({ - type: ResponseInputFileType$inboundSchema, + type: z.literal("input_file"), file_id: z.nullable(z.string()).optional(), file_data: z.string().optional(), filename: z.string().optional(), @@ -53,7 +38,7 @@ export const ResponseInputFile$inboundSchema: z.ZodType< }); /** @internal */ export type ResponseInputFile$Outbound = { - type: string; + type: "input_file"; file_id?: string | null | undefined; file_data?: string | undefined; filename?: string | undefined; @@ -65,7 +50,7 @@ export const ResponseInputFile$outboundSchema: z.ZodType< ResponseInputFile$Outbound, ResponseInputFile > = z.object({ - type: ResponseInputFileType$outboundSchema, + type: z.literal("input_file"), fileId: z.nullable(z.string()).optional(), fileData: z.string().optional(), filename: z.string().optional(), diff --git a/src/models/responseinputimage.ts b/src/models/responseinputimage.ts index 1e9aa447..1e26f22b 100644 --- a/src/models/responseinputimage.ts +++ b/src/models/responseinputimage.ts @@ -6,15 +6,10 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import * as openEnums from "../types/enums.js"; -import { ClosedEnum, OpenEnum } from "../types/enums.js"; +import { OpenEnum } from "../types/enums.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; -export const ResponseInputImageType = { - InputImage: "input_image", -} as const; -export type ResponseInputImageType = ClosedEnum; - export const ResponseInputImageDetail = { Auto: "auto", High: "high", @@ -28,20 +23,11 @@ export type ResponseInputImageDetail = OpenEnum< * Image input content item */ export type ResponseInputImage = { - type: ResponseInputImageType; + type: "input_image"; detail: ResponseInputImageDetail; imageUrl?: string | null | undefined; }; -/** @internal */ -export const ResponseInputImageType$inboundSchema: z.ZodEnum< - typeof ResponseInputImageType -> = z.enum(ResponseInputImageType); -/** @internal */ -export const ResponseInputImageType$outboundSchema: z.ZodEnum< - typeof ResponseInputImageType -> = ResponseInputImageType$inboundSchema; - /** @internal */ export const ResponseInputImageDetail$inboundSchema: z.ZodType< ResponseInputImageDetail, @@ -58,7 +44,7 @@ export const ResponseInputImage$inboundSchema: z.ZodType< ResponseInputImage, unknown > = z.object({ - type: ResponseInputImageType$inboundSchema, + type: z.literal("input_image"), detail: ResponseInputImageDetail$inboundSchema, image_url: z.nullable(z.string()).optional(), }).transform((v) => { @@ -68,7 +54,7 @@ export const ResponseInputImage$inboundSchema: z.ZodType< }); /** @internal */ export type ResponseInputImage$Outbound = { - type: string; + type: "input_image"; detail: string; image_url?: string | null | undefined; }; @@ -78,7 +64,7 @@ export const ResponseInputImage$outboundSchema: z.ZodType< ResponseInputImage$Outbound, ResponseInputImage > = z.object({ - type: ResponseInputImageType$outboundSchema, + type: z.literal("input_image"), detail: ResponseInputImageDetail$outboundSchema, imageUrl: z.nullable(z.string()).optional(), }).transform((v) => { diff --git a/src/models/responseinputtext.ts b/src/models/responseinputtext.ts index d97504a5..56f8bb7a 100644 --- a/src/models/responseinputtext.ts +++ b/src/models/responseinputtext.ts @@ -4,43 +4,28 @@ import * as z from "zod/v4"; import { safeParse } from "../lib/schemas.js"; -import { ClosedEnum } from "../types/enums.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; -export const ResponseInputTextType = { - InputText: "input_text", -} as const; -export type ResponseInputTextType = ClosedEnum; - /** * Text input content item */ export type ResponseInputText = { - type: ResponseInputTextType; + type: "input_text"; text: string; }; -/** @internal */ -export const ResponseInputTextType$inboundSchema: z.ZodEnum< - typeof ResponseInputTextType -> = z.enum(ResponseInputTextType); -/** @internal */ -export const ResponseInputTextType$outboundSchema: z.ZodEnum< - typeof ResponseInputTextType -> = ResponseInputTextType$inboundSchema; - /** @internal */ export const ResponseInputText$inboundSchema: z.ZodType< ResponseInputText, unknown > = z.object({ - type: ResponseInputTextType$inboundSchema, + type: z.literal("input_text"), text: z.string(), }); /** @internal */ export type ResponseInputText$Outbound = { - type: string; + type: "input_text"; text: string; }; @@ -49,7 +34,7 @@ export const ResponseInputText$outboundSchema: z.ZodType< ResponseInputText$Outbound, ResponseInputText > = z.object({ - type: ResponseInputTextType$outboundSchema, + type: z.literal("input_text"), text: z.string(), }); diff --git a/src/models/responseoutputtext.ts b/src/models/responseoutputtext.ts index 3d3a6534..6b6f99bb 100644 --- a/src/models/responseoutputtext.ts +++ b/src/models/responseoutputtext.ts @@ -4,7 +4,6 @@ import * as z from "zod/v4"; import { safeParse } from "../lib/schemas.js"; -import { ClosedEnum } from "../types/enums.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; import { @@ -14,38 +13,24 @@ import { OpenAIResponsesAnnotation$outboundSchema, } from "./openairesponsesannotation.js"; -export const ResponseOutputTextType = { - OutputText: "output_text", -} as const; -export type ResponseOutputTextType = ClosedEnum; - export type ResponseOutputText = { - type: ResponseOutputTextType; + type: "output_text"; text: string; annotations?: Array | undefined; }; -/** @internal */ -export const ResponseOutputTextType$inboundSchema: z.ZodEnum< - typeof ResponseOutputTextType -> = z.enum(ResponseOutputTextType); -/** @internal */ -export const ResponseOutputTextType$outboundSchema: z.ZodEnum< - typeof ResponseOutputTextType -> = ResponseOutputTextType$inboundSchema; - /** @internal */ export const ResponseOutputText$inboundSchema: z.ZodType< ResponseOutputText, unknown > = z.object({ - type: ResponseOutputTextType$inboundSchema, + type: z.literal("output_text"), text: z.string(), annotations: z.array(OpenAIResponsesAnnotation$inboundSchema).optional(), }); /** @internal */ export type ResponseOutputText$Outbound = { - type: string; + type: "output_text"; text: string; annotations?: Array | undefined; }; @@ -55,7 +40,7 @@ export const ResponseOutputText$outboundSchema: z.ZodType< ResponseOutputText$Outbound, ResponseOutputText > = z.object({ - type: ResponseOutputTextType$outboundSchema, + type: z.literal("output_text"), text: z.string(), annotations: z.array(OpenAIResponsesAnnotation$outboundSchema).optional(), }); diff --git a/src/models/responsesformatjsonobject.ts b/src/models/responsesformatjsonobject.ts index 9a59e149..a13fdf60 100644 --- a/src/models/responsesformatjsonobject.ts +++ b/src/models/responsesformatjsonobject.ts @@ -4,43 +4,26 @@ import * as z from "zod/v4"; import { safeParse } from "../lib/schemas.js"; -import { ClosedEnum } from "../types/enums.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; -export const ResponsesFormatJSONObjectType = { - JsonObject: "json_object", -} as const; -export type ResponsesFormatJSONObjectType = ClosedEnum< - typeof ResponsesFormatJSONObjectType ->; - /** * JSON object response format */ export type ResponsesFormatJSONObject = { - type: ResponsesFormatJSONObjectType; + type: "json_object"; }; -/** @internal */ -export const ResponsesFormatJSONObjectType$inboundSchema: z.ZodEnum< - typeof ResponsesFormatJSONObjectType -> = z.enum(ResponsesFormatJSONObjectType); -/** @internal */ -export const ResponsesFormatJSONObjectType$outboundSchema: z.ZodEnum< - typeof ResponsesFormatJSONObjectType -> = ResponsesFormatJSONObjectType$inboundSchema; - /** @internal */ export const ResponsesFormatJSONObject$inboundSchema: z.ZodType< ResponsesFormatJSONObject, unknown > = z.object({ - type: ResponsesFormatJSONObjectType$inboundSchema, + type: z.literal("json_object"), }); /** @internal */ export type ResponsesFormatJSONObject$Outbound = { - type: string; + type: "json_object"; }; /** @internal */ @@ -48,7 +31,7 @@ export const ResponsesFormatJSONObject$outboundSchema: z.ZodType< ResponsesFormatJSONObject$Outbound, ResponsesFormatJSONObject > = z.object({ - type: ResponsesFormatJSONObjectType$outboundSchema, + type: z.literal("json_object"), }); export function responsesFormatJSONObjectToJSON( diff --git a/src/models/responsesformattext.ts b/src/models/responsesformattext.ts index de5a4e67..3e45270a 100644 --- a/src/models/responsesformattext.ts +++ b/src/models/responsesformattext.ts @@ -4,43 +4,26 @@ import * as z from "zod/v4"; import { safeParse } from "../lib/schemas.js"; -import { ClosedEnum } from "../types/enums.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; -export const ResponsesFormatTextType = { - Text: "text", -} as const; -export type ResponsesFormatTextType = ClosedEnum< - typeof ResponsesFormatTextType ->; - /** * Plain text response format */ export type ResponsesFormatText = { - type: ResponsesFormatTextType; + type: "text"; }; -/** @internal */ -export const ResponsesFormatTextType$inboundSchema: z.ZodEnum< - typeof ResponsesFormatTextType -> = z.enum(ResponsesFormatTextType); -/** @internal */ -export const ResponsesFormatTextType$outboundSchema: z.ZodEnum< - typeof ResponsesFormatTextType -> = ResponsesFormatTextType$inboundSchema; - /** @internal */ export const ResponsesFormatText$inboundSchema: z.ZodType< ResponsesFormatText, unknown > = z.object({ - type: ResponsesFormatTextType$inboundSchema, + type: z.literal("text"), }); /** @internal */ export type ResponsesFormatText$Outbound = { - type: string; + type: "text"; }; /** @internal */ @@ -48,7 +31,7 @@ export const ResponsesFormatText$outboundSchema: z.ZodType< ResponsesFormatText$Outbound, ResponsesFormatText > = z.object({ - type: ResponsesFormatTextType$outboundSchema, + type: z.literal("text"), }); export function responsesFormatTextToJSON( diff --git a/src/models/responsesformattextjsonschemaconfig.ts b/src/models/responsesformattextjsonschemaconfig.ts index 9e4ef10e..e5c98a85 100644 --- a/src/models/responsesformattextjsonschemaconfig.ts +++ b/src/models/responsesformattextjsonschemaconfig.ts @@ -4,43 +4,26 @@ import * as z from "zod/v4"; import { safeParse } from "../lib/schemas.js"; -import { ClosedEnum } from "../types/enums.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; -export const ResponsesFormatTextJSONSchemaConfigType = { - JsonSchema: "json_schema", -} as const; -export type ResponsesFormatTextJSONSchemaConfigType = ClosedEnum< - typeof ResponsesFormatTextJSONSchemaConfigType ->; - /** * JSON schema constrained response format */ export type ResponsesFormatTextJSONSchemaConfig = { - type: ResponsesFormatTextJSONSchemaConfigType; + type: "json_schema"; name: string; description?: string | undefined; strict?: boolean | null | undefined; schema: { [k: string]: any | null }; }; -/** @internal */ -export const ResponsesFormatTextJSONSchemaConfigType$inboundSchema: z.ZodEnum< - typeof ResponsesFormatTextJSONSchemaConfigType -> = z.enum(ResponsesFormatTextJSONSchemaConfigType); -/** @internal */ -export const ResponsesFormatTextJSONSchemaConfigType$outboundSchema: z.ZodEnum< - typeof ResponsesFormatTextJSONSchemaConfigType -> = ResponsesFormatTextJSONSchemaConfigType$inboundSchema; - /** @internal */ export const ResponsesFormatTextJSONSchemaConfig$inboundSchema: z.ZodType< ResponsesFormatTextJSONSchemaConfig, unknown > = z.object({ - type: ResponsesFormatTextJSONSchemaConfigType$inboundSchema, + type: z.literal("json_schema"), name: z.string(), description: z.string().optional(), strict: z.nullable(z.boolean()).optional(), @@ -48,7 +31,7 @@ export const ResponsesFormatTextJSONSchemaConfig$inboundSchema: z.ZodType< }); /** @internal */ export type ResponsesFormatTextJSONSchemaConfig$Outbound = { - type: string; + type: "json_schema"; name: string; description?: string | undefined; strict?: boolean | null | undefined; @@ -60,7 +43,7 @@ export const ResponsesFormatTextJSONSchemaConfig$outboundSchema: z.ZodType< ResponsesFormatTextJSONSchemaConfig$Outbound, ResponsesFormatTextJSONSchemaConfig > = z.object({ - type: ResponsesFormatTextJSONSchemaConfigType$outboundSchema, + type: z.literal("json_schema"), name: z.string(), description: z.string().optional(), strict: z.nullable(z.boolean()).optional(), diff --git a/src/models/responsesoutputitem.ts b/src/models/responsesoutputitem.ts index cd83fb3b..3ae6f029 100644 --- a/src/models/responsesoutputitem.ts +++ b/src/models/responsesoutputitem.ts @@ -35,24 +35,36 @@ import { * An output item from the response */ export type ResponsesOutputItem = - | ResponsesOutputMessage - | ResponsesOutputItemFunctionCall - | ResponsesOutputItemFileSearchCall - | ResponsesOutputItemReasoning - | ResponsesWebSearchCallOutput - | ResponsesImageGenerationCall; + | (ResponsesOutputMessage & { type: "message" }) + | (ResponsesOutputItemReasoning & { type: "reasoning" }) + | (ResponsesOutputItemFunctionCall & { type: "function_call" }) + | (ResponsesWebSearchCallOutput & { type: "web_search_call" }) + | (ResponsesOutputItemFileSearchCall & { type: "file_search_call" }) + | (ResponsesImageGenerationCall & { type: "image_generation_call" }); /** @internal */ export const ResponsesOutputItem$inboundSchema: z.ZodType< ResponsesOutputItem, unknown > = z.union([ - ResponsesOutputMessage$inboundSchema, - ResponsesOutputItemFunctionCall$inboundSchema, - ResponsesOutputItemFileSearchCall$inboundSchema, - ResponsesOutputItemReasoning$inboundSchema, - ResponsesWebSearchCallOutput$inboundSchema, - ResponsesImageGenerationCall$inboundSchema, + ResponsesOutputMessage$inboundSchema.and( + z.object({ type: z.literal("message") }), + ), + ResponsesOutputItemReasoning$inboundSchema.and( + z.object({ type: z.literal("reasoning") }), + ), + ResponsesOutputItemFunctionCall$inboundSchema.and( + z.object({ type: z.literal("function_call") }), + ), + ResponsesWebSearchCallOutput$inboundSchema.and( + z.object({ type: z.literal("web_search_call") }), + ), + ResponsesOutputItemFileSearchCall$inboundSchema.and( + z.object({ type: z.literal("file_search_call") }), + ), + ResponsesImageGenerationCall$inboundSchema.and( + z.object({ type: z.literal("image_generation_call") }), + ), ]); export function responsesOutputItemFromJSON( diff --git a/src/models/urlcitation.ts b/src/models/urlcitation.ts index 0b88d1f7..69471973 100644 --- a/src/models/urlcitation.ts +++ b/src/models/urlcitation.ts @@ -5,34 +5,21 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; -import { ClosedEnum } from "../types/enums.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; -export const URLCitationType = { - UrlCitation: "url_citation", -} as const; -export type URLCitationType = ClosedEnum; - export type URLCitation = { - type: URLCitationType; + type: "url_citation"; url: string; title: string; startIndex: number; endIndex: number; }; -/** @internal */ -export const URLCitationType$inboundSchema: z.ZodEnum = - z.enum(URLCitationType); -/** @internal */ -export const URLCitationType$outboundSchema: z.ZodEnum = - URLCitationType$inboundSchema; - /** @internal */ export const URLCitation$inboundSchema: z.ZodType = z .object({ - type: URLCitationType$inboundSchema, + type: z.literal("url_citation"), url: z.string(), title: z.string(), start_index: z.number(), @@ -45,7 +32,7 @@ export const URLCitation$inboundSchema: z.ZodType = z }); /** @internal */ export type URLCitation$Outbound = { - type: string; + type: "url_citation"; url: string; title: string; start_index: number; @@ -57,7 +44,7 @@ export const URLCitation$outboundSchema: z.ZodType< URLCitation$Outbound, URLCitation > = z.object({ - type: URLCitationType$outboundSchema, + type: z.literal("url_citation"), url: z.string(), title: z.string(), startIndex: z.number(), diff --git a/src/types/unrecognized.ts b/src/types/unrecognized.ts index 08227f26..b7a2a13f 100644 --- a/src/types/unrecognized.ts +++ b/src/types/unrecognized.ts @@ -16,8 +16,16 @@ export function startCountingUnrecognized() { refCount++; const start = globalCount; return { - end: () => { + /** + * Ends counting and returns the delta. + * @param delta - If provided, only this amount is added to the parent counter + * (used for nested unions where we only want to record the winning option's count). + * If not provided, records all counts since start(). + */ + end: (delta?: number) => { const count = globalCount - start; + // Reset globalCount back to start, then add only the specified delta + globalCount = start + (delta ?? count); if (--refCount === 0) globalCount = 0; return count; }, diff --git a/tsconfig.json b/tsconfig.json index 8a8858bf..a9f80db5 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,7 +1,6 @@ { "compilerOptions": { "incremental": true, - "tsBuildInfoFile": ".tsbuildinfo", "target": "ES2020", "lib": ["ES2022", "DOM", "DOM.Iterable"], "jsx": "react-jsx", From 3c255ceea192d55d9da63b1146735b6672ac7ade Mon Sep 17 00:00:00 2001 From: "speakeasy-github[bot]" <128539517+speakeasy-github[bot]@users.noreply.github.com> Date: Tue, 2 Dec 2025 00:33:05 +0000 Subject: [PATCH 2/2] empty commit to trigger [run-tests] workflow