mirror of
https://github.com/wassname/openrouter-python-sdk-retry-errors.git
synced 2026-08-01 12:40:23 +08:00
This commit is contained in:
+99
-51
@@ -1,12 +1,12 @@
|
||||
lockVersion: 2.0.0
|
||||
id: 232c6d4f-b0fd-4172-8f1b-e2421566e9b4
|
||||
management:
|
||||
docChecksum: 3b6b1c16df754c251634311623cd5995
|
||||
docChecksum: f7eafe8edffbaf9ef5bb835b345c5a9e
|
||||
docVersion: 1.0.0
|
||||
speakeasyVersion: 1.611.1
|
||||
generationVersion: 2.694.1
|
||||
releaseVersion: 0.3.3
|
||||
configChecksum: 6887da24cc6e150f7e0b5ab6d9e6f2f5
|
||||
releaseVersion: 0.4.1
|
||||
configChecksum: 613707bdc6463db5dce971bc9cb430bb
|
||||
repoURL: https://github.com/speakeasy-sdks/openrouter-python-sdk.git
|
||||
installationURL: https://github.com/speakeasy-sdks/openrouter-python-sdk.git
|
||||
features:
|
||||
@@ -25,7 +25,6 @@ features:
|
||||
globalSecurityCallbacks: 1.0.0
|
||||
globalSecurityFlattening: 1.0.0
|
||||
globalServerURLs: 3.1.1
|
||||
groups: 3.0.0
|
||||
methodArguments: 1.0.2
|
||||
nameOverrides: 3.0.1
|
||||
nullables: 1.0.1
|
||||
@@ -44,7 +43,6 @@ generatedFiles:
|
||||
- USAGE.md
|
||||
- docs/errors/chatcompletionerror.md
|
||||
- docs/models/annotationdetail.md
|
||||
- docs/models/audio.md
|
||||
- docs/models/chatcompletion.md
|
||||
- docs/models/chatcompletionassistantmessageparam.md
|
||||
- docs/models/chatcompletionassistantmessageparamcontent.md
|
||||
@@ -71,6 +69,50 @@ generatedFiles:
|
||||
- docs/models/chatcompletioncontentparttext.md
|
||||
- docs/models/chatcompletioncontentparttexttype.md
|
||||
- docs/models/chatcompletioncreateparams.md
|
||||
- docs/models/chatcompletioncreateparamsaudio.md
|
||||
- docs/models/chatcompletioncreateparamscompletion.md
|
||||
- docs/models/chatcompletioncreateparamsdatacollection.md
|
||||
- docs/models/chatcompletioncreateparamseffort.md
|
||||
- docs/models/chatcompletioncreateparamsengine.md
|
||||
- docs/models/chatcompletioncreateparamsidchainofthought.md
|
||||
- docs/models/chatcompletioncreateparamsidfileparser.md
|
||||
- docs/models/chatcompletioncreateparamsidmoderation.md
|
||||
- docs/models/chatcompletioncreateparamsidweb.md
|
||||
- docs/models/chatcompletioncreateparamsignoreenum.md
|
||||
- docs/models/chatcompletioncreateparamsignoreunion.md
|
||||
- docs/models/chatcompletioncreateparamsimage.md
|
||||
- docs/models/chatcompletioncreateparamsjsonschema.md
|
||||
- docs/models/chatcompletioncreateparamsmaxprice.md
|
||||
- docs/models/chatcompletioncreateparamsonlyenum.md
|
||||
- docs/models/chatcompletioncreateparamsonlyunion.md
|
||||
- docs/models/chatcompletioncreateparamsorderenum.md
|
||||
- docs/models/chatcompletioncreateparamsorderunion.md
|
||||
- docs/models/chatcompletioncreateparamspdf.md
|
||||
- docs/models/chatcompletioncreateparamspdfengine.md
|
||||
- docs/models/chatcompletioncreateparamspluginchainofthought.md
|
||||
- docs/models/chatcompletioncreateparamspluginfileparser.md
|
||||
- docs/models/chatcompletioncreateparamspluginmoderation.md
|
||||
- docs/models/chatcompletioncreateparamspluginunion.md
|
||||
- docs/models/chatcompletioncreateparamspluginweb.md
|
||||
- docs/models/chatcompletioncreateparamsprompt.md
|
||||
- docs/models/chatcompletioncreateparamsprovider.md
|
||||
- docs/models/chatcompletioncreateparamsquantization.md
|
||||
- docs/models/chatcompletioncreateparamsreasoning.md
|
||||
- docs/models/chatcompletioncreateparamsreasoningeffort.md
|
||||
- docs/models/chatcompletioncreateparamsrequest.md
|
||||
- docs/models/chatcompletioncreateparamsresponseformatgrammar.md
|
||||
- docs/models/chatcompletioncreateparamsresponseformatjsonobject.md
|
||||
- docs/models/chatcompletioncreateparamsresponseformatjsonschema.md
|
||||
- docs/models/chatcompletioncreateparamsresponseformatpython.md
|
||||
- docs/models/chatcompletioncreateparamsresponseformattext.md
|
||||
- docs/models/chatcompletioncreateparamsresponseformatunion.md
|
||||
- docs/models/chatcompletioncreateparamssort.md
|
||||
- docs/models/chatcompletioncreateparamsstop.md
|
||||
- docs/models/chatcompletioncreateparamsstreamoptions.md
|
||||
- docs/models/chatcompletioncreateparamstypegrammar.md
|
||||
- docs/models/chatcompletioncreateparamstypejsonobject.md
|
||||
- docs/models/chatcompletioncreateparamstypejsonschema.md
|
||||
- docs/models/chatcompletioncreateparamstypepython.md
|
||||
- docs/models/chatcompletioncreateparamstypetext.md
|
||||
- docs/models/chatcompletionmessage.md
|
||||
- docs/models/chatcompletionmessageparam.md
|
||||
@@ -100,7 +142,52 @@ generatedFiles:
|
||||
- docs/models/chatcompletionusermessageparam.md
|
||||
- docs/models/chatcompletionusermessageparamcontent.md
|
||||
- docs/models/chatcompletionusermessageparamrole.md
|
||||
- docs/models/completion.md
|
||||
- docs/models/chatstreamcompletioncreateparams.md
|
||||
- docs/models/chatstreamcompletioncreateparamsaudio.md
|
||||
- docs/models/chatstreamcompletioncreateparamscompletion.md
|
||||
- docs/models/chatstreamcompletioncreateparamsdatacollection.md
|
||||
- docs/models/chatstreamcompletioncreateparamseffort.md
|
||||
- docs/models/chatstreamcompletioncreateparamsengine.md
|
||||
- docs/models/chatstreamcompletioncreateparamsidchainofthought.md
|
||||
- docs/models/chatstreamcompletioncreateparamsidfileparser.md
|
||||
- docs/models/chatstreamcompletioncreateparamsidmoderation.md
|
||||
- docs/models/chatstreamcompletioncreateparamsidweb.md
|
||||
- docs/models/chatstreamcompletioncreateparamsignoreenum.md
|
||||
- docs/models/chatstreamcompletioncreateparamsignoreunion.md
|
||||
- docs/models/chatstreamcompletioncreateparamsimage.md
|
||||
- docs/models/chatstreamcompletioncreateparamsjsonschema.md
|
||||
- docs/models/chatstreamcompletioncreateparamsmaxprice.md
|
||||
- docs/models/chatstreamcompletioncreateparamsonlyenum.md
|
||||
- docs/models/chatstreamcompletioncreateparamsonlyunion.md
|
||||
- docs/models/chatstreamcompletioncreateparamsorderenum.md
|
||||
- docs/models/chatstreamcompletioncreateparamsorderunion.md
|
||||
- docs/models/chatstreamcompletioncreateparamspdf.md
|
||||
- docs/models/chatstreamcompletioncreateparamspdfengine.md
|
||||
- docs/models/chatstreamcompletioncreateparamspluginchainofthought.md
|
||||
- docs/models/chatstreamcompletioncreateparamspluginfileparser.md
|
||||
- docs/models/chatstreamcompletioncreateparamspluginmoderation.md
|
||||
- docs/models/chatstreamcompletioncreateparamspluginunion.md
|
||||
- docs/models/chatstreamcompletioncreateparamspluginweb.md
|
||||
- docs/models/chatstreamcompletioncreateparamsprompt.md
|
||||
- docs/models/chatstreamcompletioncreateparamsprovider.md
|
||||
- docs/models/chatstreamcompletioncreateparamsquantization.md
|
||||
- docs/models/chatstreamcompletioncreateparamsreasoning.md
|
||||
- docs/models/chatstreamcompletioncreateparamsreasoningeffort.md
|
||||
- docs/models/chatstreamcompletioncreateparamsrequest.md
|
||||
- docs/models/chatstreamcompletioncreateparamsresponseformatgrammar.md
|
||||
- docs/models/chatstreamcompletioncreateparamsresponseformatjsonobject.md
|
||||
- docs/models/chatstreamcompletioncreateparamsresponseformatjsonschema.md
|
||||
- docs/models/chatstreamcompletioncreateparamsresponseformatpython.md
|
||||
- docs/models/chatstreamcompletioncreateparamsresponseformattext.md
|
||||
- docs/models/chatstreamcompletioncreateparamsresponseformatunion.md
|
||||
- docs/models/chatstreamcompletioncreateparamssort.md
|
||||
- docs/models/chatstreamcompletioncreateparamsstop.md
|
||||
- docs/models/chatstreamcompletioncreateparamsstreamoptions.md
|
||||
- docs/models/chatstreamcompletioncreateparamstypegrammar.md
|
||||
- docs/models/chatstreamcompletioncreateparamstypejsonobject.md
|
||||
- docs/models/chatstreamcompletioncreateparamstypejsonschema.md
|
||||
- docs/models/chatstreamcompletioncreateparamstypepython.md
|
||||
- docs/models/chatstreamcompletioncreateparamstypetext.md
|
||||
- docs/models/completiontokensdetails.md
|
||||
- docs/models/completionusage.md
|
||||
- docs/models/contentimageurl.md
|
||||
@@ -108,42 +195,15 @@ generatedFiles:
|
||||
- docs/models/contenttypeimageurl.md
|
||||
- docs/models/contenttypetext.md
|
||||
- docs/models/createchatcompletionresponse.md
|
||||
- docs/models/datacollection.md
|
||||
- docs/models/detail.md
|
||||
- docs/models/effort.md
|
||||
- docs/models/engine.md
|
||||
- docs/models/error.md
|
||||
- docs/models/file.md
|
||||
- docs/models/fileannotationdetail.md
|
||||
- docs/models/fileannotationdetailcontentunion.md
|
||||
- docs/models/fileannotationdetailimageurl.md
|
||||
- docs/models/idchainofthought.md
|
||||
- docs/models/idfileparser.md
|
||||
- docs/models/idmoderation.md
|
||||
- docs/models/idweb.md
|
||||
- docs/models/ignore.md
|
||||
- docs/models/ignoreenum.md
|
||||
- docs/models/image.md
|
||||
- docs/models/inputaudio.md
|
||||
- docs/models/jsonschema.md
|
||||
- docs/models/maxprice.md
|
||||
- docs/models/only.md
|
||||
- docs/models/onlyenum.md
|
||||
- docs/models/order.md
|
||||
- docs/models/orderenum.md
|
||||
- docs/models/parameters.md
|
||||
- docs/models/pdf.md
|
||||
- docs/models/pdfengine.md
|
||||
- docs/models/plugin.md
|
||||
- docs/models/pluginchainofthought.md
|
||||
- docs/models/pluginfileparser.md
|
||||
- docs/models/pluginmoderation.md
|
||||
- docs/models/pluginweb.md
|
||||
- docs/models/prompt.md
|
||||
- docs/models/prompttokensdetails.md
|
||||
- docs/models/provider.md
|
||||
- docs/models/quantization.md
|
||||
- docs/models/reasoning.md
|
||||
- docs/models/reasoningdetail.md
|
||||
- docs/models/reasoningdetailencrypted.md
|
||||
- docs/models/reasoningdetailencryptedformat.md
|
||||
@@ -154,25 +214,11 @@ generatedFiles:
|
||||
- docs/models/reasoningdetailtext.md
|
||||
- docs/models/reasoningdetailtextformat.md
|
||||
- docs/models/reasoningdetailtexttype.md
|
||||
- docs/models/reasoningeffort.md
|
||||
- docs/models/request.md
|
||||
- docs/models/responseformat.md
|
||||
- docs/models/responseformatgrammar.md
|
||||
- docs/models/responseformatjsonobject.md
|
||||
- docs/models/responseformatjsonschema.md
|
||||
- docs/models/responseformatjsonschemaschema.md
|
||||
- docs/models/responseformatpython.md
|
||||
- docs/models/responseformattext.md
|
||||
- docs/models/security.md
|
||||
- docs/models/sort.md
|
||||
- docs/models/stop.md
|
||||
- docs/models/streamoptions.md
|
||||
- docs/models/streamchatcompletionresponsebody.md
|
||||
- docs/models/toplogprob.md
|
||||
- docs/models/typefile.md
|
||||
- docs/models/typegrammar.md
|
||||
- docs/models/typejsonobject.md
|
||||
- docs/models/typejsonschema.md
|
||||
- docs/models/typepython.md
|
||||
- docs/models/urlcitation.md
|
||||
- docs/models/urlcitationannotationdetail.md
|
||||
- docs/models/urlcitationannotationdetailtype.md
|
||||
@@ -225,6 +271,7 @@ generatedFiles:
|
||||
- src/openrouter/models/chatcompletiontoolchoiceoption.py
|
||||
- src/openrouter/models/chatcompletiontoolmessageparam.py
|
||||
- src/openrouter/models/chatcompletionusermessageparam.py
|
||||
- src/openrouter/models/chatstreamcompletioncreateparams.py
|
||||
- src/openrouter/models/completionusage.py
|
||||
- src/openrouter/models/createchatcompletionop.py
|
||||
- src/openrouter/models/fileannotationdetail.py
|
||||
@@ -234,6 +281,7 @@ generatedFiles:
|
||||
- src/openrouter/models/reasoningdetailtext.py
|
||||
- src/openrouter/models/responseformatjsonschemaschema.py
|
||||
- src/openrouter/models/security.py
|
||||
- src/openrouter/models/streamchatcompletionop.py
|
||||
- src/openrouter/models/urlcitationannotationdetail.py
|
||||
- src/openrouter/py.typed
|
||||
- src/openrouter/sdk.py
|
||||
@@ -272,10 +320,10 @@ examples:
|
||||
streamChatCompletion:
|
||||
speakeasy-default-stream-chat-completion:
|
||||
requestBody:
|
||||
application/json: {"messages": [{"role": "user", "content": "Hello, how are you?"}], "stream": true, "temperature": 1, "top_p": 1}
|
||||
application/json: {"stream": false, "messages": [{"role": "user", "content": "Hello, how are you?"}], "temperature": 1, "top_p": 1}
|
||||
responses:
|
||||
"400":
|
||||
application/json: {"error": {"code": "<value>", "message": "<value>", "param": "<value>", "type": "<value>"}}
|
||||
application/json: {"error": {"code": null, "message": "<value>"}}
|
||||
"500":
|
||||
application/json: {"error": {"code": "<value>", "message": "<value>", "param": "<value>", "type": "<value>"}}
|
||||
application/json: {"error": {"code": null, "message": "<value>"}}
|
||||
examplesVersion: 1.0.2
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@ generation:
|
||||
generateNewTests: true
|
||||
skipResponseBodyAssertions: false
|
||||
python:
|
||||
version: 0.3.3
|
||||
version: 0.4.1
|
||||
additionalDependencies:
|
||||
dev: {}
|
||||
main: {}
|
||||
|
||||
@@ -36,7 +36,7 @@ components:
|
||||
required: [data]
|
||||
properties:
|
||||
data:
|
||||
$ref: '#/components/schemas/ChatCompletionChunk'
|
||||
$ref: "#/components/schemas/ChatCompletionChunk"
|
||||
ChatCompletionMessageToolCall:
|
||||
type: object
|
||||
properties:
|
||||
@@ -147,15 +147,15 @@ components:
|
||||
description: Text reasoning detail
|
||||
ReasoningDetail:
|
||||
oneOf:
|
||||
- $ref: '#/components/schemas/ReasoningDetailSummary'
|
||||
- $ref: '#/components/schemas/ReasoningDetailEncrypted'
|
||||
- $ref: '#/components/schemas/ReasoningDetailText'
|
||||
- $ref: "#/components/schemas/ReasoningDetailSummary"
|
||||
- $ref: "#/components/schemas/ReasoningDetailEncrypted"
|
||||
- $ref: "#/components/schemas/ReasoningDetailText"
|
||||
discriminator:
|
||||
propertyName: type
|
||||
mapping:
|
||||
reasoning.summary: '#/components/schemas/ReasoningDetailSummary'
|
||||
reasoning.encrypted: '#/components/schemas/ReasoningDetailEncrypted'
|
||||
reasoning.text: '#/components/schemas/ReasoningDetailText'
|
||||
reasoning.summary: "#/components/schemas/ReasoningDetailSummary"
|
||||
reasoning.encrypted: "#/components/schemas/ReasoningDetailEncrypted"
|
||||
reasoning.text: "#/components/schemas/ReasoningDetailText"
|
||||
description: Reasoning detail information
|
||||
FileAnnotationDetail:
|
||||
type: object
|
||||
@@ -240,13 +240,13 @@ components:
|
||||
description: URL citation annotation
|
||||
AnnotationDetail:
|
||||
oneOf:
|
||||
- $ref: '#/components/schemas/FileAnnotationDetail'
|
||||
- $ref: '#/components/schemas/URLCitationAnnotationDetail'
|
||||
- $ref: "#/components/schemas/FileAnnotationDetail"
|
||||
- $ref: "#/components/schemas/URLCitationAnnotationDetail"
|
||||
discriminator:
|
||||
propertyName: type
|
||||
mapping:
|
||||
file: '#/components/schemas/FileAnnotationDetail'
|
||||
url_citation: '#/components/schemas/URLCitationAnnotationDetail'
|
||||
file: "#/components/schemas/FileAnnotationDetail"
|
||||
url_citation: "#/components/schemas/URLCitationAnnotationDetail"
|
||||
description: Annotation information
|
||||
ChatCompletionMessage:
|
||||
type: object
|
||||
@@ -270,17 +270,17 @@ components:
|
||||
tool_calls:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/ChatCompletionMessageToolCall'
|
||||
$ref: "#/components/schemas/ChatCompletionMessageToolCall"
|
||||
description: Tool calls made by the assistant
|
||||
reasoning_details:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/ReasoningDetail'
|
||||
$ref: "#/components/schemas/ReasoningDetail"
|
||||
description: Reasoning details delta to send reasoning details back to upstream
|
||||
annotations:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/AnnotationDetail'
|
||||
$ref: "#/components/schemas/AnnotationDetail"
|
||||
description: Annotations delta to send annotations back to upstream
|
||||
required:
|
||||
- role
|
||||
@@ -335,13 +335,13 @@ components:
|
||||
type: array
|
||||
nullable: true
|
||||
items:
|
||||
$ref: '#/components/schemas/ChatCompletionTokenLogprob'
|
||||
$ref: "#/components/schemas/ChatCompletionTokenLogprob"
|
||||
description: Log probabilities for content tokens
|
||||
refusal:
|
||||
type: array
|
||||
nullable: true
|
||||
items:
|
||||
$ref: '#/components/schemas/ChatCompletionTokenLogprob'
|
||||
$ref: "#/components/schemas/ChatCompletionTokenLogprob"
|
||||
description: Log probabilities for refusal tokens
|
||||
required:
|
||||
- content
|
||||
@@ -364,9 +364,9 @@ components:
|
||||
type: number
|
||||
description: Choice index
|
||||
message:
|
||||
$ref: '#/components/schemas/ChatCompletionMessage'
|
||||
$ref: "#/components/schemas/ChatCompletionMessage"
|
||||
logprobs:
|
||||
$ref: '#/components/schemas/ChatCompletionTokenLogprobs'
|
||||
$ref: "#/components/schemas/ChatCompletionTokenLogprobs"
|
||||
required:
|
||||
- finish_reason
|
||||
- index
|
||||
@@ -424,7 +424,7 @@ components:
|
||||
choices:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/ChatCompletionChoice'
|
||||
$ref: "#/components/schemas/ChatCompletionChoice"
|
||||
description: List of completion choices
|
||||
created:
|
||||
type: number
|
||||
@@ -441,7 +441,7 @@ components:
|
||||
description: System fingerprint
|
||||
nullable: true
|
||||
usage:
|
||||
$ref: '#/components/schemas/CompletionUsage'
|
||||
$ref: "#/components/schemas/CompletionUsage"
|
||||
required:
|
||||
- id
|
||||
- choices
|
||||
@@ -522,24 +522,24 @@ components:
|
||||
tool_calls:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/ChatCompletionChunkChoiceDeltaToolCall'
|
||||
$ref: "#/components/schemas/ChatCompletionChunkChoiceDeltaToolCall"
|
||||
description: Tool calls delta
|
||||
reasoning_details:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/ReasoningDetail'
|
||||
$ref: "#/components/schemas/ReasoningDetail"
|
||||
description: Reasoning details delta to send reasoning details back to upstream
|
||||
annotations:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/AnnotationDetail'
|
||||
$ref: "#/components/schemas/AnnotationDetail"
|
||||
description: Annotations delta to send annotations back to upstream
|
||||
description: Delta changes in streaming response
|
||||
ChatCompletionChunkChoice:
|
||||
type: object
|
||||
properties:
|
||||
delta:
|
||||
$ref: '#/components/schemas/ChatCompletionChunkChoiceDelta'
|
||||
$ref: "#/components/schemas/ChatCompletionChunkChoiceDelta"
|
||||
finish_reason:
|
||||
type: string
|
||||
nullable: true
|
||||
@@ -552,7 +552,7 @@ components:
|
||||
index:
|
||||
type: number
|
||||
logprobs:
|
||||
$ref: '#/components/schemas/ChatCompletionTokenLogprobs'
|
||||
$ref: "#/components/schemas/ChatCompletionTokenLogprobs"
|
||||
required:
|
||||
- delta
|
||||
- finish_reason
|
||||
@@ -566,7 +566,7 @@ components:
|
||||
choices:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/ChatCompletionChunkChoice'
|
||||
$ref: "#/components/schemas/ChatCompletionChunkChoice"
|
||||
created:
|
||||
type: number
|
||||
model:
|
||||
@@ -579,7 +579,7 @@ components:
|
||||
type: string
|
||||
nullable: true
|
||||
usage:
|
||||
$ref: '#/components/schemas/CompletionUsage'
|
||||
$ref: "#/components/schemas/CompletionUsage"
|
||||
required:
|
||||
- id
|
||||
- choices
|
||||
@@ -621,7 +621,7 @@ components:
|
||||
properties:
|
||||
url:
|
||||
type: string
|
||||
description: 'URL of the image (data: URLs supported)'
|
||||
description: "URL of the image (data: URLs supported)"
|
||||
detail:
|
||||
type: string
|
||||
enum:
|
||||
@@ -668,15 +668,15 @@ components:
|
||||
description: Audio input content part
|
||||
ChatCompletionContentPart:
|
||||
oneOf:
|
||||
- $ref: '#/components/schemas/ChatCompletionContentPartText'
|
||||
- $ref: '#/components/schemas/ChatCompletionContentPartImage'
|
||||
- $ref: '#/components/schemas/ChatCompletionContentPartAudio'
|
||||
- $ref: "#/components/schemas/ChatCompletionContentPartText"
|
||||
- $ref: "#/components/schemas/ChatCompletionContentPartImage"
|
||||
- $ref: "#/components/schemas/ChatCompletionContentPartAudio"
|
||||
discriminator:
|
||||
propertyName: type
|
||||
mapping:
|
||||
text: '#/components/schemas/ChatCompletionContentPartText'
|
||||
image_url: '#/components/schemas/ChatCompletionContentPartImage'
|
||||
input_audio: '#/components/schemas/ChatCompletionContentPartAudio'
|
||||
text: "#/components/schemas/ChatCompletionContentPartText"
|
||||
image_url: "#/components/schemas/ChatCompletionContentPartImage"
|
||||
input_audio: "#/components/schemas/ChatCompletionContentPartAudio"
|
||||
description: Content part for chat completion messages
|
||||
ChatCompletionSystemMessageParam:
|
||||
type: object
|
||||
@@ -690,7 +690,7 @@ components:
|
||||
- type: string
|
||||
- type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/ChatCompletionContentPartText'
|
||||
$ref: "#/components/schemas/ChatCompletionContentPartText"
|
||||
description: System message content
|
||||
name:
|
||||
type: string
|
||||
@@ -711,7 +711,7 @@ components:
|
||||
- type: string
|
||||
- type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/ChatCompletionContentPart'
|
||||
$ref: "#/components/schemas/ChatCompletionContentPart"
|
||||
description: User message content
|
||||
name:
|
||||
type: string
|
||||
@@ -732,7 +732,7 @@ components:
|
||||
- type: string
|
||||
- type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/ChatCompletionContentPart'
|
||||
$ref: "#/components/schemas/ChatCompletionContentPart"
|
||||
- nullable: true
|
||||
description: Assistant message content
|
||||
name:
|
||||
@@ -741,7 +741,7 @@ components:
|
||||
tool_calls:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/ChatCompletionMessageToolCall'
|
||||
$ref: "#/components/schemas/ChatCompletionMessageToolCall"
|
||||
description: Tool calls made by the assistant
|
||||
refusal:
|
||||
type: string
|
||||
@@ -762,7 +762,7 @@ components:
|
||||
- type: string
|
||||
- type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/ChatCompletionContentPart'
|
||||
$ref: "#/components/schemas/ChatCompletionContentPart"
|
||||
description: Tool response content
|
||||
tool_call_id:
|
||||
type: string
|
||||
@@ -774,17 +774,17 @@ components:
|
||||
description: Tool response message
|
||||
ChatCompletionMessageParam:
|
||||
oneOf:
|
||||
- $ref: '#/components/schemas/ChatCompletionSystemMessageParam'
|
||||
- $ref: '#/components/schemas/ChatCompletionUserMessageParam'
|
||||
- $ref: '#/components/schemas/ChatCompletionAssistantMessageParam'
|
||||
- $ref: '#/components/schemas/ChatCompletionToolMessageParam'
|
||||
- $ref: "#/components/schemas/ChatCompletionSystemMessageParam"
|
||||
- $ref: "#/components/schemas/ChatCompletionUserMessageParam"
|
||||
- $ref: "#/components/schemas/ChatCompletionAssistantMessageParam"
|
||||
- $ref: "#/components/schemas/ChatCompletionToolMessageParam"
|
||||
discriminator:
|
||||
propertyName: role
|
||||
mapping:
|
||||
system: '#/components/schemas/ChatCompletionSystemMessageParam'
|
||||
user: '#/components/schemas/ChatCompletionUserMessageParam'
|
||||
assistant: '#/components/schemas/ChatCompletionAssistantMessageParam'
|
||||
tool: '#/components/schemas/ChatCompletionToolMessageParam'
|
||||
system: "#/components/schemas/ChatCompletionSystemMessageParam"
|
||||
user: "#/components/schemas/ChatCompletionUserMessageParam"
|
||||
assistant: "#/components/schemas/ChatCompletionAssistantMessageParam"
|
||||
tool: "#/components/schemas/ChatCompletionToolMessageParam"
|
||||
description: Chat completion message with role-based discrimination
|
||||
ChatCompletionTool:
|
||||
type: object
|
||||
@@ -848,7 +848,7 @@ components:
|
||||
- type: string
|
||||
enum:
|
||||
- required
|
||||
- $ref: '#/components/schemas/ChatCompletionNamedToolChoice'
|
||||
- $ref: "#/components/schemas/ChatCompletionNamedToolChoice"
|
||||
description: Tool choice configuration
|
||||
ChatCompletionStreamOptions:
|
||||
type: object
|
||||
@@ -867,7 +867,7 @@ components:
|
||||
messages:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/ChatCompletionMessageParam'
|
||||
$ref: "#/components/schemas/ChatCompletionMessageParam"
|
||||
minItems: 1
|
||||
description: List of messages for the conversation
|
||||
example:
|
||||
@@ -980,7 +980,7 @@ components:
|
||||
type: string
|
||||
description: Schema description for the model
|
||||
schema:
|
||||
$ref: '#/components/schemas/ResponseFormatJsonSchemaSchema'
|
||||
$ref: "#/components/schemas/ResponseFormatJsonSchemaSchema"
|
||||
strict:
|
||||
type: boolean
|
||||
nullable: true
|
||||
@@ -1034,7 +1034,7 @@ components:
|
||||
description: Enable streaming response
|
||||
stream_options:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/ChatCompletionStreamOptions'
|
||||
- $ref: "#/components/schemas/ChatCompletionStreamOptions"
|
||||
- nullable: true
|
||||
temperature:
|
||||
type: number
|
||||
@@ -1044,11 +1044,11 @@ components:
|
||||
default: 1
|
||||
description: Sampling temperature (0-2)
|
||||
tool_choice:
|
||||
$ref: '#/components/schemas/ChatCompletionToolChoiceOption'
|
||||
$ref: "#/components/schemas/ChatCompletionToolChoiceOption"
|
||||
tools:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/ChatCompletionTool'
|
||||
$ref: "#/components/schemas/ChatCompletionTool"
|
||||
description: Available tools for function calling
|
||||
top_p:
|
||||
type: number
|
||||
@@ -1061,7 +1061,8 @@ components:
|
||||
type: string
|
||||
description: Unique user identifier
|
||||
models:
|
||||
x-speakeasy-name-override: model_list
|
||||
# Needed to avoid conflict with the `models` directory
|
||||
x-speakeasy-name-override: fallback_models
|
||||
type: array
|
||||
nullable: true
|
||||
items:
|
||||
@@ -1498,13 +1499,22 @@ components:
|
||||
required:
|
||||
- messages
|
||||
description: Chat completion request parameters
|
||||
ChatStreamCompletionCreateParams:
|
||||
allOf:
|
||||
- type: object
|
||||
properties:
|
||||
stream:
|
||||
type: boolean
|
||||
enum:
|
||||
- true
|
||||
default: true
|
||||
description: Enable streaming response
|
||||
- $ref: "#/components/schemas/ChatCompletionCreateParams"
|
||||
parameters: {}
|
||||
paths:
|
||||
/chat/completions:
|
||||
post:
|
||||
operationId: createChatCompletion
|
||||
x-speakeasy-group: chat
|
||||
x-speakeasy-name-override: complete
|
||||
summary: Create a chat completion
|
||||
description: Creates a model response for the given chat conversation. Supports both streaming and non-streaming modes.
|
||||
tags:
|
||||
@@ -1515,40 +1525,92 @@ paths:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ChatCompletionCreateParams'
|
||||
$ref: "#/components/schemas/ChatCompletionCreateParams"
|
||||
responses:
|
||||
'200':
|
||||
"200":
|
||||
description: Successful chat completion response
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ChatCompletion'
|
||||
$ref: "#/components/schemas/ChatCompletion"
|
||||
description: Non-streaming response when stream=false
|
||||
text/event-stream:
|
||||
x-speakeasy-sse-sentinel: '[DONE]'
|
||||
x-speakeasy-sse-sentinel: "[DONE]"
|
||||
schema:
|
||||
$ref: '#/components/schemas/ChatCompletionChunkWrapper'
|
||||
'400':
|
||||
$ref: "#/components/schemas/ChatCompletionChunkWrapper"
|
||||
"400":
|
||||
description: Bad request - invalid parameters
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ChatCompletionError'
|
||||
'401':
|
||||
$ref: "#/components/schemas/ChatCompletionError"
|
||||
"401":
|
||||
description: Unauthorized - invalid API key
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ChatCompletionError'
|
||||
'429':
|
||||
$ref: "#/components/schemas/ChatCompletionError"
|
||||
"429":
|
||||
description: Too many requests - rate limit exceeded
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ChatCompletionError'
|
||||
'500':
|
||||
$ref: "#/components/schemas/ChatCompletionError"
|
||||
"500":
|
||||
description: Internal server error
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ChatCompletionError'
|
||||
$ref: "#/components/schemas/ChatCompletionError"
|
||||
x-speakeasy-name-override: complete
|
||||
/chat/completions#stream:
|
||||
post:
|
||||
operationId: streamChatCompletion
|
||||
summary: Create a chat completion
|
||||
description: Creates a model response for the given chat conversation. Supports both streaming and non-streaming modes.
|
||||
tags:
|
||||
- Chat
|
||||
requestBody:
|
||||
description: Chat completion request parameters
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ChatStreamCompletionCreateParams"
|
||||
responses:
|
||||
"200":
|
||||
description: Successful chat completion response
|
||||
content:
|
||||
text/event-stream:
|
||||
x-speakeasy-sse-sentinel: "[DONE]"
|
||||
schema:
|
||||
type: object
|
||||
required: [data]
|
||||
properties:
|
||||
data:
|
||||
$ref: "#/components/schemas/ChatCompletionChunk"
|
||||
"400":
|
||||
description: Bad request - invalid parameters
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ChatCompletionError"
|
||||
"401":
|
||||
description: Unauthorized - invalid API key
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ChatCompletionError"
|
||||
"429":
|
||||
description: Too many requests - rate limit exceeded
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ChatCompletionError"
|
||||
"500":
|
||||
description: Internal server error
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ChatCompletionError"
|
||||
x-speakeasy-name-override: completeStream
|
||||
+131
-69
@@ -36,7 +36,7 @@ components:
|
||||
required: [data]
|
||||
properties:
|
||||
data:
|
||||
$ref: '#/components/schemas/ChatCompletionChunk'
|
||||
$ref: "#/components/schemas/ChatCompletionChunk"
|
||||
ChatCompletionMessageToolCall:
|
||||
type: object
|
||||
properties:
|
||||
@@ -147,15 +147,15 @@ components:
|
||||
description: Text reasoning detail
|
||||
ReasoningDetail:
|
||||
oneOf:
|
||||
- $ref: '#/components/schemas/ReasoningDetailSummary'
|
||||
- $ref: '#/components/schemas/ReasoningDetailEncrypted'
|
||||
- $ref: '#/components/schemas/ReasoningDetailText'
|
||||
- $ref: "#/components/schemas/ReasoningDetailSummary"
|
||||
- $ref: "#/components/schemas/ReasoningDetailEncrypted"
|
||||
- $ref: "#/components/schemas/ReasoningDetailText"
|
||||
discriminator:
|
||||
propertyName: type
|
||||
mapping:
|
||||
reasoning.summary: '#/components/schemas/ReasoningDetailSummary'
|
||||
reasoning.encrypted: '#/components/schemas/ReasoningDetailEncrypted'
|
||||
reasoning.text: '#/components/schemas/ReasoningDetailText'
|
||||
reasoning.summary: "#/components/schemas/ReasoningDetailSummary"
|
||||
reasoning.encrypted: "#/components/schemas/ReasoningDetailEncrypted"
|
||||
reasoning.text: "#/components/schemas/ReasoningDetailText"
|
||||
description: Reasoning detail information
|
||||
FileAnnotationDetail:
|
||||
type: object
|
||||
@@ -240,13 +240,13 @@ components:
|
||||
description: URL citation annotation
|
||||
AnnotationDetail:
|
||||
oneOf:
|
||||
- $ref: '#/components/schemas/FileAnnotationDetail'
|
||||
- $ref: '#/components/schemas/URLCitationAnnotationDetail'
|
||||
- $ref: "#/components/schemas/FileAnnotationDetail"
|
||||
- $ref: "#/components/schemas/URLCitationAnnotationDetail"
|
||||
discriminator:
|
||||
propertyName: type
|
||||
mapping:
|
||||
file: '#/components/schemas/FileAnnotationDetail'
|
||||
url_citation: '#/components/schemas/URLCitationAnnotationDetail'
|
||||
file: "#/components/schemas/FileAnnotationDetail"
|
||||
url_citation: "#/components/schemas/URLCitationAnnotationDetail"
|
||||
description: Annotation information
|
||||
ChatCompletionMessage:
|
||||
type: object
|
||||
@@ -270,17 +270,17 @@ components:
|
||||
tool_calls:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/ChatCompletionMessageToolCall'
|
||||
$ref: "#/components/schemas/ChatCompletionMessageToolCall"
|
||||
description: Tool calls made by the assistant
|
||||
reasoning_details:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/ReasoningDetail'
|
||||
$ref: "#/components/schemas/ReasoningDetail"
|
||||
description: Reasoning details delta to send reasoning details back to upstream
|
||||
annotations:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/AnnotationDetail'
|
||||
$ref: "#/components/schemas/AnnotationDetail"
|
||||
description: Annotations delta to send annotations back to upstream
|
||||
required:
|
||||
- role
|
||||
@@ -335,13 +335,13 @@ components:
|
||||
type: array
|
||||
nullable: true
|
||||
items:
|
||||
$ref: '#/components/schemas/ChatCompletionTokenLogprob'
|
||||
$ref: "#/components/schemas/ChatCompletionTokenLogprob"
|
||||
description: Log probabilities for content tokens
|
||||
refusal:
|
||||
type: array
|
||||
nullable: true
|
||||
items:
|
||||
$ref: '#/components/schemas/ChatCompletionTokenLogprob'
|
||||
$ref: "#/components/schemas/ChatCompletionTokenLogprob"
|
||||
description: Log probabilities for refusal tokens
|
||||
required:
|
||||
- content
|
||||
@@ -364,9 +364,9 @@ components:
|
||||
type: number
|
||||
description: Choice index
|
||||
message:
|
||||
$ref: '#/components/schemas/ChatCompletionMessage'
|
||||
$ref: "#/components/schemas/ChatCompletionMessage"
|
||||
logprobs:
|
||||
$ref: '#/components/schemas/ChatCompletionTokenLogprobs'
|
||||
$ref: "#/components/schemas/ChatCompletionTokenLogprobs"
|
||||
required:
|
||||
- finish_reason
|
||||
- index
|
||||
@@ -424,7 +424,7 @@ components:
|
||||
choices:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/ChatCompletionChoice'
|
||||
$ref: "#/components/schemas/ChatCompletionChoice"
|
||||
description: List of completion choices
|
||||
created:
|
||||
type: number
|
||||
@@ -441,7 +441,7 @@ components:
|
||||
description: System fingerprint
|
||||
nullable: true
|
||||
usage:
|
||||
$ref: '#/components/schemas/CompletionUsage'
|
||||
$ref: "#/components/schemas/CompletionUsage"
|
||||
required:
|
||||
- id
|
||||
- choices
|
||||
@@ -522,24 +522,24 @@ components:
|
||||
tool_calls:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/ChatCompletionChunkChoiceDeltaToolCall'
|
||||
$ref: "#/components/schemas/ChatCompletionChunkChoiceDeltaToolCall"
|
||||
description: Tool calls delta
|
||||
reasoning_details:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/ReasoningDetail'
|
||||
$ref: "#/components/schemas/ReasoningDetail"
|
||||
description: Reasoning details delta to send reasoning details back to upstream
|
||||
annotations:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/AnnotationDetail'
|
||||
$ref: "#/components/schemas/AnnotationDetail"
|
||||
description: Annotations delta to send annotations back to upstream
|
||||
description: Delta changes in streaming response
|
||||
ChatCompletionChunkChoice:
|
||||
type: object
|
||||
properties:
|
||||
delta:
|
||||
$ref: '#/components/schemas/ChatCompletionChunkChoiceDelta'
|
||||
$ref: "#/components/schemas/ChatCompletionChunkChoiceDelta"
|
||||
finish_reason:
|
||||
type: string
|
||||
nullable: true
|
||||
@@ -552,7 +552,7 @@ components:
|
||||
index:
|
||||
type: number
|
||||
logprobs:
|
||||
$ref: '#/components/schemas/ChatCompletionTokenLogprobs'
|
||||
$ref: "#/components/schemas/ChatCompletionTokenLogprobs"
|
||||
required:
|
||||
- delta
|
||||
- finish_reason
|
||||
@@ -566,7 +566,7 @@ components:
|
||||
choices:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/ChatCompletionChunkChoice'
|
||||
$ref: "#/components/schemas/ChatCompletionChunkChoice"
|
||||
created:
|
||||
type: number
|
||||
model:
|
||||
@@ -579,7 +579,7 @@ components:
|
||||
type: string
|
||||
nullable: true
|
||||
usage:
|
||||
$ref: '#/components/schemas/CompletionUsage'
|
||||
$ref: "#/components/schemas/CompletionUsage"
|
||||
required:
|
||||
- id
|
||||
- choices
|
||||
@@ -621,7 +621,7 @@ components:
|
||||
properties:
|
||||
url:
|
||||
type: string
|
||||
description: 'URL of the image (data: URLs supported)'
|
||||
description: "URL of the image (data: URLs supported)"
|
||||
detail:
|
||||
type: string
|
||||
enum:
|
||||
@@ -668,15 +668,15 @@ components:
|
||||
description: Audio input content part
|
||||
ChatCompletionContentPart:
|
||||
oneOf:
|
||||
- $ref: '#/components/schemas/ChatCompletionContentPartText'
|
||||
- $ref: '#/components/schemas/ChatCompletionContentPartImage'
|
||||
- $ref: '#/components/schemas/ChatCompletionContentPartAudio'
|
||||
- $ref: "#/components/schemas/ChatCompletionContentPartText"
|
||||
- $ref: "#/components/schemas/ChatCompletionContentPartImage"
|
||||
- $ref: "#/components/schemas/ChatCompletionContentPartAudio"
|
||||
discriminator:
|
||||
propertyName: type
|
||||
mapping:
|
||||
text: '#/components/schemas/ChatCompletionContentPartText'
|
||||
image_url: '#/components/schemas/ChatCompletionContentPartImage'
|
||||
input_audio: '#/components/schemas/ChatCompletionContentPartAudio'
|
||||
text: "#/components/schemas/ChatCompletionContentPartText"
|
||||
image_url: "#/components/schemas/ChatCompletionContentPartImage"
|
||||
input_audio: "#/components/schemas/ChatCompletionContentPartAudio"
|
||||
description: Content part for chat completion messages
|
||||
ChatCompletionSystemMessageParam:
|
||||
type: object
|
||||
@@ -690,7 +690,7 @@ components:
|
||||
- type: string
|
||||
- type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/ChatCompletionContentPartText'
|
||||
$ref: "#/components/schemas/ChatCompletionContentPartText"
|
||||
description: System message content
|
||||
name:
|
||||
type: string
|
||||
@@ -711,7 +711,7 @@ components:
|
||||
- type: string
|
||||
- type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/ChatCompletionContentPart'
|
||||
$ref: "#/components/schemas/ChatCompletionContentPart"
|
||||
description: User message content
|
||||
name:
|
||||
type: string
|
||||
@@ -732,7 +732,7 @@ components:
|
||||
- type: string
|
||||
- type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/ChatCompletionContentPart'
|
||||
$ref: "#/components/schemas/ChatCompletionContentPart"
|
||||
- nullable: true
|
||||
description: Assistant message content
|
||||
name:
|
||||
@@ -741,7 +741,7 @@ components:
|
||||
tool_calls:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/ChatCompletionMessageToolCall'
|
||||
$ref: "#/components/schemas/ChatCompletionMessageToolCall"
|
||||
description: Tool calls made by the assistant
|
||||
refusal:
|
||||
type: string
|
||||
@@ -762,7 +762,7 @@ components:
|
||||
- type: string
|
||||
- type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/ChatCompletionContentPart'
|
||||
$ref: "#/components/schemas/ChatCompletionContentPart"
|
||||
description: Tool response content
|
||||
tool_call_id:
|
||||
type: string
|
||||
@@ -774,17 +774,17 @@ components:
|
||||
description: Tool response message
|
||||
ChatCompletionMessageParam:
|
||||
oneOf:
|
||||
- $ref: '#/components/schemas/ChatCompletionSystemMessageParam'
|
||||
- $ref: '#/components/schemas/ChatCompletionUserMessageParam'
|
||||
- $ref: '#/components/schemas/ChatCompletionAssistantMessageParam'
|
||||
- $ref: '#/components/schemas/ChatCompletionToolMessageParam'
|
||||
- $ref: "#/components/schemas/ChatCompletionSystemMessageParam"
|
||||
- $ref: "#/components/schemas/ChatCompletionUserMessageParam"
|
||||
- $ref: "#/components/schemas/ChatCompletionAssistantMessageParam"
|
||||
- $ref: "#/components/schemas/ChatCompletionToolMessageParam"
|
||||
discriminator:
|
||||
propertyName: role
|
||||
mapping:
|
||||
system: '#/components/schemas/ChatCompletionSystemMessageParam'
|
||||
user: '#/components/schemas/ChatCompletionUserMessageParam'
|
||||
assistant: '#/components/schemas/ChatCompletionAssistantMessageParam'
|
||||
tool: '#/components/schemas/ChatCompletionToolMessageParam'
|
||||
system: "#/components/schemas/ChatCompletionSystemMessageParam"
|
||||
user: "#/components/schemas/ChatCompletionUserMessageParam"
|
||||
assistant: "#/components/schemas/ChatCompletionAssistantMessageParam"
|
||||
tool: "#/components/schemas/ChatCompletionToolMessageParam"
|
||||
description: Chat completion message with role-based discrimination
|
||||
ChatCompletionTool:
|
||||
type: object
|
||||
@@ -848,7 +848,7 @@ components:
|
||||
- type: string
|
||||
enum:
|
||||
- required
|
||||
- $ref: '#/components/schemas/ChatCompletionNamedToolChoice'
|
||||
- $ref: "#/components/schemas/ChatCompletionNamedToolChoice"
|
||||
description: Tool choice configuration
|
||||
ChatCompletionStreamOptions:
|
||||
type: object
|
||||
@@ -867,7 +867,7 @@ components:
|
||||
messages:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/ChatCompletionMessageParam'
|
||||
$ref: "#/components/schemas/ChatCompletionMessageParam"
|
||||
minItems: 1
|
||||
description: List of messages for the conversation
|
||||
example:
|
||||
@@ -980,7 +980,7 @@ components:
|
||||
type: string
|
||||
description: Schema description for the model
|
||||
schema:
|
||||
$ref: '#/components/schemas/ResponseFormatJsonSchemaSchema'
|
||||
$ref: "#/components/schemas/ResponseFormatJsonSchemaSchema"
|
||||
strict:
|
||||
type: boolean
|
||||
nullable: true
|
||||
@@ -1034,7 +1034,7 @@ components:
|
||||
description: Enable streaming response
|
||||
stream_options:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/ChatCompletionStreamOptions'
|
||||
- $ref: "#/components/schemas/ChatCompletionStreamOptions"
|
||||
- nullable: true
|
||||
temperature:
|
||||
type: number
|
||||
@@ -1044,11 +1044,11 @@ components:
|
||||
default: 1
|
||||
description: Sampling temperature (0-2)
|
||||
tool_choice:
|
||||
$ref: '#/components/schemas/ChatCompletionToolChoiceOption'
|
||||
$ref: "#/components/schemas/ChatCompletionToolChoiceOption"
|
||||
tools:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/ChatCompletionTool'
|
||||
$ref: "#/components/schemas/ChatCompletionTool"
|
||||
description: Available tools for function calling
|
||||
top_p:
|
||||
type: number
|
||||
@@ -1061,7 +1061,8 @@ components:
|
||||
type: string
|
||||
description: Unique user identifier
|
||||
models:
|
||||
x-speakeasy-name-override: model_list
|
||||
# Needed to avoid conflict with the `models` directory
|
||||
x-speakeasy-name-override: fallback_models
|
||||
type: array
|
||||
nullable: true
|
||||
items:
|
||||
@@ -1498,13 +1499,22 @@ components:
|
||||
required:
|
||||
- messages
|
||||
description: Chat completion request parameters
|
||||
ChatStreamCompletionCreateParams:
|
||||
allOf:
|
||||
- type: object
|
||||
properties:
|
||||
stream:
|
||||
type: boolean
|
||||
enum:
|
||||
- true
|
||||
default: true
|
||||
description: Enable streaming response
|
||||
- $ref: "#/components/schemas/ChatCompletionCreateParams"
|
||||
parameters: {}
|
||||
paths:
|
||||
/chat/completions:
|
||||
post:
|
||||
operationId: createChatCompletion
|
||||
x-speakeasy-group: chat
|
||||
x-speakeasy-name-override: complete
|
||||
summary: Create a chat completion
|
||||
description: Creates a model response for the given chat conversation. Supports both streaming and non-streaming modes.
|
||||
tags:
|
||||
@@ -1515,40 +1525,92 @@ paths:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ChatCompletionCreateParams'
|
||||
$ref: "#/components/schemas/ChatCompletionCreateParams"
|
||||
responses:
|
||||
'200':
|
||||
"200":
|
||||
description: Successful chat completion response
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ChatCompletion'
|
||||
$ref: "#/components/schemas/ChatCompletion"
|
||||
description: Non-streaming response when stream=false
|
||||
text/event-stream:
|
||||
x-speakeasy-sse-sentinel: '[DONE]'
|
||||
x-speakeasy-sse-sentinel: "[DONE]"
|
||||
schema:
|
||||
$ref: '#/components/schemas/ChatCompletionChunkWrapper'
|
||||
'400':
|
||||
$ref: "#/components/schemas/ChatCompletionChunkWrapper"
|
||||
"400":
|
||||
description: Bad request - invalid parameters
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ChatCompletionError'
|
||||
'401':
|
||||
$ref: "#/components/schemas/ChatCompletionError"
|
||||
"401":
|
||||
description: Unauthorized - invalid API key
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ChatCompletionError'
|
||||
'429':
|
||||
$ref: "#/components/schemas/ChatCompletionError"
|
||||
"429":
|
||||
description: Too many requests - rate limit exceeded
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ChatCompletionError'
|
||||
'500':
|
||||
$ref: "#/components/schemas/ChatCompletionError"
|
||||
"500":
|
||||
description: Internal server error
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ChatCompletionError'
|
||||
$ref: "#/components/schemas/ChatCompletionError"
|
||||
x-speakeasy-name-override: complete
|
||||
/chat/completions#stream:
|
||||
post:
|
||||
operationId: streamChatCompletion
|
||||
summary: Create a chat completion
|
||||
description: Creates a model response for the given chat conversation. Supports both streaming and non-streaming modes.
|
||||
tags:
|
||||
- Chat
|
||||
requestBody:
|
||||
description: Chat completion request parameters
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ChatStreamCompletionCreateParams"
|
||||
responses:
|
||||
"200":
|
||||
description: Successful chat completion response
|
||||
content:
|
||||
text/event-stream:
|
||||
x-speakeasy-sse-sentinel: "[DONE]"
|
||||
schema:
|
||||
type: object
|
||||
required: [data]
|
||||
properties:
|
||||
data:
|
||||
$ref: "#/components/schemas/ChatCompletionChunk"
|
||||
"400":
|
||||
description: Bad request - invalid parameters
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ChatCompletionError"
|
||||
"401":
|
||||
description: Unauthorized - invalid API key
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ChatCompletionError"
|
||||
"429":
|
||||
description: Too many requests - rate limit exceeded
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ChatCompletionError"
|
||||
"500":
|
||||
description: Internal server error
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ChatCompletionError"
|
||||
x-speakeasy-name-override: completeStream
|
||||
|
||||
@@ -3,7 +3,7 @@ speakeasyVersion: latest
|
||||
sources:
|
||||
OpenRouter Chat Completions API:
|
||||
inputs:
|
||||
- location: .speakeasy/input.openapi.yaml
|
||||
- location: .speakeasy/in.openapi.yaml
|
||||
output: .speakeasy/out.openapi.yaml
|
||||
registry:
|
||||
location: registry.speakeasyapi.dev/sheldon-vaughn-test/sandbox/open-router-chat-completions-api
|
||||
|
||||
Reference in New Issue
Block a user