Compare commits

..
5 Commits
Author SHA1 Message Date
Tom Aylott db88c559c2 Merge main into dev: resolve conflicts by keeping dev (latest Copybara exports) 2026-01-09 17:29:50 -05:00
OpenRouter Team 5d804916ec Project import generated by Copybara.
GitOrigin-RevId: 55335c8a1cc66e6e032e9075d6f6eea5d9fb9138
2026-01-09 22:22:24 +00:00
OpenRouter Team e3361882cd Project import generated by Copybara.
GitOrigin-RevId: 0c3f0fb4be86f675ce6eca10edd2bd576c7d38d2
2026-01-09 19:35:46 +00:00
OpenRouter Team 9073d38dc1 Project import generated by Copybara.
GitOrigin-RevId: 849282a42d3b2948d0ca0f7fd1427c31af709bbd
2026-01-09 19:20:21 +00:00
OpenRouter TeamandOpenRouter Team a35486030a Project import generated by Copybara.
GitOrigin-RevId: 94074033e15542b78c82f8a4fe721be656aeaaed
2025-12-13 02:43:01 +00:00
42 changed files with 180 additions and 850 deletions
+11 -22
View File
@@ -1,12 +1,12 @@
lockVersion: 2.0.0 lockVersion: 2.0.0
id: cfd52247-6a25-4c6d-bbce-fe6fce0cd69d id: cfd52247-6a25-4c6d-bbce-fe6fce0cd69d
management: management:
docChecksum: 331e8a1f7c97c6a4a6b57eaddc80fc39 docChecksum: 7419f3b58a64f08efb375ead9e169446
docVersion: 1.0.0 docVersion: 1.0.0
speakeasyVersion: 1.666.0 speakeasyVersion: 1.666.0
generationVersion: 2.768.0 generationVersion: 2.768.0
releaseVersion: 0.0.18 releaseVersion: 0.0.17
configChecksum: 1f58284fadb5b2b9029e9ef747f2a7e9 configChecksum: 50ef18bf69272fc09c257e3562e1b0df
repoURL: https://github.com/OpenRouterTeam/python-sdk.git repoURL: https://github.com/OpenRouterTeam/python-sdk.git
installationURL: https://github.com/OpenRouterTeam/python-sdk.git installationURL: https://github.com/OpenRouterTeam/python-sdk.git
published: true published: true
@@ -91,7 +91,6 @@ generatedFiles:
- docs/components/chatmessagecontentitemvideovideourl.md - docs/components/chatmessagecontentitemvideovideourl.md
- docs/components/chatmessagetokenlogprob.md - docs/components/chatmessagetokenlogprob.md
- docs/components/chatmessagetokenlogprobs.md - docs/components/chatmessagetokenlogprobs.md
- docs/components/chatmessagetokenlogprobtoplogprob.md
- docs/components/chatmessagetoolcall.md - docs/components/chatmessagetoolcall.md
- docs/components/chatmessagetoolcallfunction.md - docs/components/chatmessagetoolcallfunction.md
- docs/components/chatresponse.md - docs/components/chatresponse.md
@@ -146,7 +145,6 @@ generatedFiles:
- docs/components/internalserverresponseerrordata.md - docs/components/internalserverresponseerrordata.md
- docs/components/jsonschemaconfig.md - docs/components/jsonschemaconfig.md
- docs/components/listendpointsresponse.md - docs/components/listendpointsresponse.md
- docs/components/logprob.md
- docs/components/message.md - docs/components/message.md
- docs/components/messagecontent.md - docs/components/messagecontent.md
- docs/components/messagedeveloper.md - docs/components/messagedeveloper.md
@@ -205,17 +203,14 @@ generatedFiles:
- docs/components/openairesponsestoolchoiceunion.md - docs/components/openairesponsestoolchoiceunion.md
- docs/components/openairesponsestruncation.md - docs/components/openairesponsestruncation.md
- docs/components/openresponseseasyinputmessage.md - docs/components/openresponseseasyinputmessage.md
- docs/components/openresponseseasyinputmessagecontentinputimage.md - docs/components/openresponseseasyinputmessagecontent1.md
- docs/components/openresponseseasyinputmessagecontenttype.md - docs/components/openresponseseasyinputmessagecontent2.md
- docs/components/openresponseseasyinputmessagecontentunion1.md
- docs/components/openresponseseasyinputmessagecontentunion2.md
- docs/components/openresponseseasyinputmessagedetail.md
- docs/components/openresponseseasyinputmessageroleassistant.md - docs/components/openresponseseasyinputmessageroleassistant.md
- docs/components/openresponseseasyinputmessageroledeveloper.md - docs/components/openresponseseasyinputmessageroledeveloper.md
- docs/components/openresponseseasyinputmessagerolesystem.md - docs/components/openresponseseasyinputmessagerolesystem.md
- docs/components/openresponseseasyinputmessageroleunion.md - docs/components/openresponseseasyinputmessageroleunion.md
- docs/components/openresponseseasyinputmessageroleuser.md - docs/components/openresponseseasyinputmessageroleuser.md
- docs/components/openresponseseasyinputmessagetypemessage.md - docs/components/openresponseseasyinputmessagetype.md
- docs/components/openresponseserrorevent.md - docs/components/openresponseserrorevent.md
- docs/components/openresponseserroreventtype.md - docs/components/openresponseserroreventtype.md
- docs/components/openresponsesfunctioncalloutput.md - docs/components/openresponsesfunctioncalloutput.md
@@ -233,15 +228,12 @@ generatedFiles:
- docs/components/openresponsesinput.md - docs/components/openresponsesinput.md
- docs/components/openresponsesinput1.md - docs/components/openresponsesinput1.md
- docs/components/openresponsesinputmessageitem.md - docs/components/openresponsesinputmessageitem.md
- docs/components/openresponsesinputmessageitemcontentinputimage.md - docs/components/openresponsesinputmessageitemcontent.md
- docs/components/openresponsesinputmessageitemcontenttype.md
- docs/components/openresponsesinputmessageitemcontentunion.md
- docs/components/openresponsesinputmessageitemdetail.md
- docs/components/openresponsesinputmessageitemroledeveloper.md - docs/components/openresponsesinputmessageitemroledeveloper.md
- docs/components/openresponsesinputmessageitemrolesystem.md - docs/components/openresponsesinputmessageitemrolesystem.md
- docs/components/openresponsesinputmessageitemroleunion.md - docs/components/openresponsesinputmessageitemroleunion.md
- docs/components/openresponsesinputmessageitemroleuser.md - docs/components/openresponsesinputmessageitemroleuser.md
- docs/components/openresponsesinputmessageitemtypemessage.md - docs/components/openresponsesinputmessageitemtype.md
- docs/components/openresponseslogprobs.md - docs/components/openresponseslogprobs.md
- docs/components/openresponsesnonstreamingresponse.md - docs/components/openresponsesnonstreamingresponse.md
- docs/components/openresponsesnonstreamingresponsetoolfunction.md - docs/components/openresponsesnonstreamingresponsetoolfunction.md
@@ -388,10 +380,7 @@ generatedFiles:
- docs/components/responseinputimagetype.md - docs/components/responseinputimagetype.md
- docs/components/responseinputtext.md - docs/components/responseinputtext.md
- docs/components/responseinputtexttype.md - docs/components/responseinputtexttype.md
- docs/components/responseinputvideo.md
- docs/components/responseinputvideotype.md
- docs/components/responseoutputtext.md - docs/components/responseoutputtext.md
- docs/components/responseoutputtexttoplogprob.md
- docs/components/responseoutputtexttype.md - docs/components/responseoutputtexttype.md
- docs/components/responseserrorfield.md - docs/components/responseserrorfield.md
- docs/components/responsesformatjsonobject.md - docs/components/responsesformatjsonobject.md
@@ -456,6 +445,7 @@ generatedFiles:
- docs/components/toolresponsemessage.md - docs/components/toolresponsemessage.md
- docs/components/toolresponsemessagecontent.md - docs/components/toolresponsemessagecontent.md
- docs/components/toomanyrequestsresponseerrordata.md - docs/components/toomanyrequestsresponseerrordata.md
- docs/components/toplogprob.md
- docs/components/topproviderinfo.md - docs/components/topproviderinfo.md
- docs/components/truncation.md - docs/components/truncation.md
- docs/components/ttl.md - docs/components/ttl.md
@@ -737,7 +727,6 @@ generatedFiles:
- src/openrouter/components/responseinputfile.py - src/openrouter/components/responseinputfile.py
- src/openrouter/components/responseinputimage.py - src/openrouter/components/responseinputimage.py
- src/openrouter/components/responseinputtext.py - src/openrouter/components/responseinputtext.py
- src/openrouter/components/responseinputvideo.py
- src/openrouter/components/responseoutputtext.py - src/openrouter/components/responseoutputtext.py
- src/openrouter/components/responseserrorfield.py - src/openrouter/components/responseserrorfield.py
- src/openrouter/components/responsesformatjsonobject.py - src/openrouter/components/responsesformatjsonobject.py
@@ -853,7 +842,7 @@ examples:
application/json: {"store": false, "service_tier": "auto", "stream": false} application/json: {"store": false, "service_tier": "auto", "stream": false}
responses: responses:
"200": "200":
application/json: {"id": "resp-abc123", "object": "response", "created_at": 1704067200, "model": "gpt-4", "status": "completed", "completed_at": 2510.63, "output": [{"id": "msg-abc123", "role": "assistant", "type": "message", "content": [{"type": "output_text", "text": "Hello! How can I help you today?"}]}], "error": null, "incomplete_details": null, "temperature": null, "top_p": null, "presence_penalty": 7468.94, "frequency_penalty": 3967.09, "instructions": null, "metadata": null, "tools": [], "tool_choice": "auto", "parallel_tool_calls": true} application/json: {"id": "resp-abc123", "object": "response", "created_at": 1704067200, "model": "gpt-4", "output": [{"id": "msg-abc123", "role": "assistant", "type": "message", "content": [{"type": "output_text", "text": "Hello! How can I help you today?"}]}], "error": null, "incomplete_details": null, "temperature": null, "top_p": null, "instructions": null, "metadata": null, "tools": [], "tool_choice": "auto", "parallel_tool_calls": true}
"400": "400":
application/json: {"error": {"code": 400, "message": "Invalid request parameters"}} application/json: {"error": {"code": 400, "message": "Invalid request parameters"}}
"401": "401":
@@ -966,7 +955,7 @@ examples:
id: "<id>" id: "<id>"
responses: responses:
"200": "200":
application/json: {"data": {"id": "gen-3bhGkxlo4XFrqiabUM7NDtwDzWwG", "upstream_id": "chatcmpl-791bcf62-080e-4568-87d0-94c72e3b4946", "total_cost": 0.0015, "cache_discount": 0.0002, "upstream_inference_cost": 0.0012, "created_at": "2024-07-15T23:33:19.433273+00:00", "model": "sao10k/l3-stheno-8b", "app_id": 12345, "streamed": true, "cancelled": false, "provider_name": "Infermatic", "latency": 1250, "moderation_latency": 50, "generation_time": 1200, "finish_reason": "stop", "tokens_prompt": 10, "tokens_completion": 25, "native_tokens_prompt": 10, "native_tokens_completion": 25, "native_tokens_completion_images": 0, "native_tokens_reasoning": 5, "native_tokens_cached": 3, "num_media_prompt": 1, "num_input_audio_prompt": 0, "num_media_completion": 0, "num_search_results": 5, "origin": "https://openrouter.ai/", "usage": 0.0015, "is_byok": false, "native_finish_reason": "stop", "external_user": "user-123", "api_type": "completions", "router": "openrouter/auto"}} application/json: {"data": {"id": "gen-3bhGkxlo4XFrqiabUM7NDtwDzWwG", "upstream_id": "chatcmpl-791bcf62-080e-4568-87d0-94c72e3b4946", "total_cost": 0.0015, "cache_discount": 0.0002, "upstream_inference_cost": 0.0012, "created_at": "2024-07-15T23:33:19.433273+00:00", "model": "sao10k/l3-stheno-8b", "app_id": 12345, "streamed": true, "cancelled": false, "provider_name": "Infermatic", "latency": 1250, "moderation_latency": 50, "generation_time": 1200, "finish_reason": "stop", "tokens_prompt": 10, "tokens_completion": 25, "native_tokens_prompt": 10, "native_tokens_completion": 25, "native_tokens_completion_images": 0, "native_tokens_reasoning": 5, "native_tokens_cached": 3, "num_media_prompt": 1, "num_input_audio_prompt": 0, "num_media_completion": 0, "num_search_results": 5, "origin": "https://openrouter.ai/", "usage": 0.0015, "is_byok": false, "native_finish_reason": "stop", "external_user": "user-123", "api_type": "completions"}}
"401": "401":
application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
"402": "402":
+1 -1
View File
@@ -31,7 +31,7 @@ generation:
skipResponseBodyAssertions: false skipResponseBodyAssertions: false
preApplyUnionDiscriminators: true preApplyUnionDiscriminators: true
python: python:
version: 0.0.18 version: 0.0.17
additionalDependencies: additionalDependencies:
dev: {} dev: {}
main: {} main: {}
+14 -108
View File
@@ -108,41 +108,6 @@ components:
type: array type: array
items: items:
$ref: '#/components/schemas/OpenAIResponsesAnnotation' $ref: '#/components/schemas/OpenAIResponsesAnnotation'
logprobs:
type: array
items:
type: object
properties:
token:
type: string
bytes:
type: array
items:
type: number
logprob:
type: number
top_logprobs:
type: array
items:
type: object
properties:
token:
type: string
bytes:
type: array
items:
type: number
logprob:
type: number
required:
- token
- bytes
- logprob
required:
- token
- bytes
- logprob
- top_logprobs
required: required:
- type - type
- text - text
@@ -592,7 +557,6 @@ components:
allOf: allOf:
- $ref: '#/components/schemas/OpenAIResponsesUsage' - $ref: '#/components/schemas/OpenAIResponsesUsage'
- type: object - type: object
nullable: true
properties: properties:
cost: cost:
type: number type: number
@@ -1244,9 +1208,6 @@ components:
type: string type: string
status: status:
$ref: '#/components/schemas/OpenAIResponsesResponseStatus' $ref: '#/components/schemas/OpenAIResponsesResponseStatus'
completed_at:
type: number
nullable: true
output: output:
type: array type: array
items: items:
@@ -1297,12 +1258,6 @@ components:
top_p: top_p:
type: number type: number
nullable: true nullable: true
presence_penalty:
type: number
nullable: true
frequency_penalty:
type: number
nullable: true
instructions: instructions:
$ref: '#/components/schemas/OpenAIResponsesInput' $ref: '#/components/schemas/OpenAIResponsesInput'
metadata: metadata:
@@ -1364,15 +1319,11 @@ components:
- object - object
- created_at - created_at
- model - model
- status
- completed_at
- output - output
- error - error
- incomplete_details - incomplete_details
- temperature - temperature
- top_p - top_p
- presence_penalty
- frequency_penalty
- instructions - instructions
- metadata - metadata
- tools - tools
@@ -3303,23 +3254,6 @@ components:
- type: summary_text - type: summary_text
text: Step by step analysis text: Step by step analysis
description: Reasoning output item with signature and format extensions description: Reasoning output item with signature and format extensions
ResponseInputVideo:
type: object
properties:
type:
type: string
enum:
- input_video
video_url:
type: string
description: A base64 data URL or remote URL that resolves to a video file
required:
- type
- video_url
description: Video input content item
example:
type: input_video
video_url: https://example.com/video.mp4
OpenResponsesEasyInputMessage: OpenResponsesEasyInputMessage:
type: object type: object
properties: properties:
@@ -3347,18 +3281,16 @@ components:
items: items:
oneOf: oneOf:
- $ref: '#/components/schemas/ResponseInputText' - $ref: '#/components/schemas/ResponseInputText'
- allOf:
- $ref: '#/components/schemas/ResponseInputImage' - $ref: '#/components/schemas/ResponseInputImage'
- type: object
properties: {}
description: Image input content item
example:
type: input_image
detail: auto
image_url: https://example.com/image.jpg
- $ref: '#/components/schemas/ResponseInputFile' - $ref: '#/components/schemas/ResponseInputFile'
- $ref: '#/components/schemas/ResponseInputAudio' - $ref: '#/components/schemas/ResponseInputAudio'
- $ref: '#/components/schemas/ResponseInputVideo' discriminator:
propertyName: type
mapping:
input_text: '#/components/schemas/ResponseInputText'
input_image: '#/components/schemas/ResponseInputImage'
input_file: '#/components/schemas/ResponseInputFile'
input_audio: '#/components/schemas/ResponseInputAudio'
- type: string - type: string
required: required:
- role - role
@@ -3388,18 +3320,16 @@ components:
items: items:
oneOf: oneOf:
- $ref: '#/components/schemas/ResponseInputText' - $ref: '#/components/schemas/ResponseInputText'
- allOf:
- $ref: '#/components/schemas/ResponseInputImage' - $ref: '#/components/schemas/ResponseInputImage'
- type: object
properties: {}
description: Image input content item
example:
type: input_image
detail: auto
image_url: https://example.com/image.jpg
- $ref: '#/components/schemas/ResponseInputFile' - $ref: '#/components/schemas/ResponseInputFile'
- $ref: '#/components/schemas/ResponseInputAudio' - $ref: '#/components/schemas/ResponseInputAudio'
- $ref: '#/components/schemas/ResponseInputVideo' discriminator:
propertyName: type
mapping:
input_text: '#/components/schemas/ResponseInputText'
input_image: '#/components/schemas/ResponseInputImage'
input_file: '#/components/schemas/ResponseInputFile'
input_audio: '#/components/schemas/ResponseInputAudio'
required: required:
- role - role
- content - content
@@ -3801,24 +3731,6 @@ components:
type: number type: number
nullable: true nullable: true
minimum: 0 minimum: 0
top_logprobs:
type: integer
nullable: true
minimum: 0
maximum: 20
max_tool_calls:
type: integer
nullable: true
presence_penalty:
type: number
nullable: true
minimum: -2
maximum: 2
frequency_penalty:
type: number
nullable: true
minimum: -2
maximum: 2
top_k: top_k:
type: number type: number
image_config: image_config:
@@ -7286,11 +7198,6 @@ paths:
- completions - completions
- embeddings - embeddings
description: Type of API used for the generation description: Type of API used for the generation
router:
type: string
nullable: true
description: Router used for the request (e.g., openrouter/auto)
example: openrouter/auto
required: required:
- id - id
- upstream_id - upstream_id
@@ -7324,7 +7231,6 @@ paths:
- native_finish_reason - native_finish_reason
- external_user - external_user
- api_type - api_type
- router
description: Generation data description: Generation data
required: required:
- data - data
+14 -108
View File
@@ -109,41 +109,6 @@ components:
type: array type: array
items: items:
$ref: '#/components/schemas/OpenAIResponsesAnnotation' $ref: '#/components/schemas/OpenAIResponsesAnnotation'
logprobs:
type: array
items:
type: object
properties:
token:
type: string
bytes:
type: array
items:
type: number
logprob:
type: number
top_logprobs:
type: array
items:
type: object
properties:
token:
type: string
bytes:
type: array
items:
type: number
logprob:
type: number
required:
- token
- bytes
- logprob
required:
- token
- bytes
- logprob
- top_logprobs
required: required:
- type - type
- text - text
@@ -598,7 +563,6 @@ components:
allOf: allOf:
- $ref: '#/components/schemas/OpenAIResponsesUsage' - $ref: '#/components/schemas/OpenAIResponsesUsage'
- type: object - type: object
nullable: true
properties: properties:
cost: cost:
type: number type: number
@@ -1259,9 +1223,6 @@ components:
type: string type: string
status: status:
$ref: '#/components/schemas/OpenAIResponsesResponseStatus' $ref: '#/components/schemas/OpenAIResponsesResponseStatus'
completed_at:
type: number
nullable: true
output: output:
type: array type: array
items: items:
@@ -1312,12 +1273,6 @@ components:
top_p: top_p:
type: number type: number
nullable: true nullable: true
presence_penalty:
type: number
nullable: true
frequency_penalty:
type: number
nullable: true
instructions: instructions:
$ref: '#/components/schemas/OpenAIResponsesInput' $ref: '#/components/schemas/OpenAIResponsesInput'
metadata: metadata:
@@ -1380,15 +1335,11 @@ components:
- object - object
- created_at - created_at
- model - model
- status
- completed_at
- output - output
- error - error
- incomplete_details - incomplete_details
- temperature - temperature
- top_p - top_p
- presence_penalty
- frequency_penalty
- instructions - instructions
- metadata - metadata
- tools - tools
@@ -3320,23 +3271,6 @@ components:
- type: summary_text - type: summary_text
text: Step by step analysis text: Step by step analysis
description: Reasoning output item with signature and format extensions description: Reasoning output item with signature and format extensions
ResponseInputVideo:
type: object
properties:
type:
type: string
enum:
- input_video
video_url:
type: string
description: A base64 data URL or remote URL that resolves to a video file
required:
- type
- video_url
description: Video input content item
example:
type: input_video
video_url: https://example.com/video.mp4
OpenResponsesEasyInputMessage: OpenResponsesEasyInputMessage:
type: object type: object
properties: properties:
@@ -3364,18 +3298,16 @@ components:
items: items:
oneOf: oneOf:
- $ref: '#/components/schemas/ResponseInputText' - $ref: '#/components/schemas/ResponseInputText'
- allOf:
- $ref: '#/components/schemas/ResponseInputImage' - $ref: '#/components/schemas/ResponseInputImage'
- type: object
properties: {}
description: Image input content item
example:
type: input_image
detail: auto
image_url: https://example.com/image.jpg
- $ref: '#/components/schemas/ResponseInputFile' - $ref: '#/components/schemas/ResponseInputFile'
- $ref: '#/components/schemas/ResponseInputAudio' - $ref: '#/components/schemas/ResponseInputAudio'
- $ref: '#/components/schemas/ResponseInputVideo' discriminator:
propertyName: type
mapping:
input_text: '#/components/schemas/ResponseInputText'
input_image: '#/components/schemas/ResponseInputImage'
input_file: '#/components/schemas/ResponseInputFile'
input_audio: '#/components/schemas/ResponseInputAudio'
- type: string - type: string
required: required:
- role - role
@@ -3405,18 +3337,16 @@ components:
items: items:
oneOf: oneOf:
- $ref: '#/components/schemas/ResponseInputText' - $ref: '#/components/schemas/ResponseInputText'
- allOf:
- $ref: '#/components/schemas/ResponseInputImage' - $ref: '#/components/schemas/ResponseInputImage'
- type: object
properties: {}
description: Image input content item
example:
type: input_image
detail: auto
image_url: https://example.com/image.jpg
- $ref: '#/components/schemas/ResponseInputFile' - $ref: '#/components/schemas/ResponseInputFile'
- $ref: '#/components/schemas/ResponseInputAudio' - $ref: '#/components/schemas/ResponseInputAudio'
- $ref: '#/components/schemas/ResponseInputVideo' discriminator:
propertyName: type
mapping:
input_text: '#/components/schemas/ResponseInputText'
input_image: '#/components/schemas/ResponseInputImage'
input_file: '#/components/schemas/ResponseInputFile'
input_audio: '#/components/schemas/ResponseInputAudio'
required: required:
- role - role
- content - content
@@ -3821,24 +3751,6 @@ components:
type: number type: number
nullable: true nullable: true
minimum: 0 minimum: 0
top_logprobs:
type: integer
nullable: true
minimum: 0
maximum: 20
max_tool_calls:
type: integer
nullable: true
presence_penalty:
type: number
nullable: true
minimum: -2
maximum: 2
frequency_penalty:
type: number
nullable: true
minimum: -2
maximum: 2
top_k: top_k:
type: number type: number
image_config: image_config:
@@ -7283,11 +7195,6 @@ paths:
- embeddings - embeddings
description: Type of API used for the generation description: Type of API used for the generation
x-speakeasy-unknown-values: allow x-speakeasy-unknown-values: allow
router:
type: string
nullable: true
description: Router used for the request (e.g., openrouter/auto)
example: openrouter/auto
required: required:
- id - id
- upstream_id - upstream_id
@@ -7321,7 +7228,6 @@ paths:
- native_finish_reason - native_finish_reason
- external_user - external_user
- api_type - api_type
- router
description: Generation data description: Generation data
required: required:
- data - data
+6 -5
View File
@@ -8,19 +8,20 @@ sources:
- latest - latest
OpenRouter API: OpenRouter API:
sourceNamespace: open-router-chat-completions-api sourceNamespace: open-router-chat-completions-api
sourceRevisionDigest: sha256:74aa60ddccc9442b797432138c9ea1577f922ae537a659f129b4102d3a8124d7 sourceRevisionDigest: sha256:5615c05050362c0944a59e3b5b0437157f9d152faac1509d3c390bbc85e93b1e
sourceBlobDigest: sha256:c9ae686141914431fb09ce7f0ff685c5b20c19006a92ade6d8686358616f6925 sourceBlobDigest: sha256:4f08bbf0b65fd4e617996964ccb1fa33ed7e807f81d8731ba4d00b0a7fd2da98
tags: tags:
- latest - latest
- subtree-sync-import-python-sdk
- 1.0.0 - 1.0.0
targets: targets:
open-router: open-router:
source: OpenRouter API source: OpenRouter API
sourceNamespace: open-router-chat-completions-api sourceNamespace: open-router-chat-completions-api
sourceRevisionDigest: sha256:74aa60ddccc9442b797432138c9ea1577f922ae537a659f129b4102d3a8124d7 sourceRevisionDigest: sha256:5615c05050362c0944a59e3b5b0437157f9d152faac1509d3c390bbc85e93b1e
sourceBlobDigest: sha256:c9ae686141914431fb09ce7f0ff685c5b20c19006a92ade6d8686358616f6925 sourceBlobDigest: sha256:4f08bbf0b65fd4e617996964ccb1fa33ed7e807f81d8731ba4d00b0a7fd2da98
codeSamplesNamespace: open-router-python-code-samples codeSamplesNamespace: open-router-python-code-samples
codeSamplesRevisionDigest: sha256:95a78f7dc072063abfd68a880ad1054c27a9a9077449cbf667d07de13a15112a codeSamplesRevisionDigest: sha256:c60fe0121ecdbfb79af3a344b52b8daade826fb9648b925f229e5b1d93b5c7ac
workflow: workflow:
workflowVersion: 1.0.0 workflowVersion: 1.0.0
speakeasyVersion: 1.666.0 speakeasyVersion: 1.666.0
+2 -2
View File
@@ -4,8 +4,8 @@
## Fields ## Fields
| Field | Type | Required | Description | | Field | Type | Required | Description |
| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- |
| `token` | *str* | :heavy_check_mark: | N/A | | `token` | *str* | :heavy_check_mark: | N/A |
| `logprob` | *float* | :heavy_check_mark: | N/A | | `logprob` | *float* | :heavy_check_mark: | N/A |
| `bytes_` | List[*float*] | :heavy_check_mark: | N/A | | `bytes_` | List[*float*] | :heavy_check_mark: | N/A |
| `top_logprobs` | List[[components.ChatMessageTokenLogprobTopLogprob](../components/chatmessagetokenlogprobtoplogprob.md)] | :heavy_check_mark: | N/A | | `top_logprobs` | List[[components.TopLogprob](../components/toplogprob.md)] | :heavy_check_mark: | N/A |
@@ -1,10 +0,0 @@
# ChatMessageTokenLogprobTopLogprob
## Fields
| Field | Type | Required | Description |
| ------------------ | ------------------ | ------------------ | ------------------ |
| `token` | *str* | :heavy_check_mark: | N/A |
| `logprob` | *float* | :heavy_check_mark: | N/A |
| `bytes_` | List[*float*] | :heavy_check_mark: | N/A |
-11
View File
@@ -1,11 +0,0 @@
# Logprob
## Fields
| Field | Type | Required | Description |
| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
| `token` | *str* | :heavy_check_mark: | N/A |
| `bytes_` | List[*float*] | :heavy_check_mark: | N/A |
| `logprob` | *float* | :heavy_check_mark: | N/A |
| `top_logprobs` | List[[components.ResponseOutputTextTopLogprob](../components/responseoutputtexttoplogprob.md)] | :heavy_check_mark: | N/A |
@@ -4,7 +4,7 @@
## Fields ## Fields
| Field | Type | Required | Description | | Field | Type | Required | Description |
| -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ |
| `type` | [Optional[components.OpenResponsesEasyInputMessageTypeMessage]](../components/openresponseseasyinputmessagetypemessage.md) | :heavy_minus_sign: | N/A | | `type` | [Optional[components.OpenResponsesEasyInputMessageType]](../components/openresponseseasyinputmessagetype.md) | :heavy_minus_sign: | N/A |
| `role` | [components.OpenResponsesEasyInputMessageRoleUnion](../components/openresponseseasyinputmessageroleunion.md) | :heavy_check_mark: | N/A | | `role` | [components.OpenResponsesEasyInputMessageRoleUnion](../components/openresponseseasyinputmessageroleunion.md) | :heavy_check_mark: | N/A |
| `content` | [components.OpenResponsesEasyInputMessageContentUnion2](../components/openresponseseasyinputmessagecontentunion2.md) | :heavy_check_mark: | N/A | | `content` | [components.OpenResponsesEasyInputMessageContent2](../components/openresponseseasyinputmessagecontent2.md) | :heavy_check_mark: | N/A |
@@ -1,4 +1,4 @@
# OpenResponsesInputMessageItemContentUnion # OpenResponsesEasyInputMessageContent1
## Supported Types ## Supported Types
@@ -9,10 +9,10 @@
value: components.ResponseInputText = /* values here */ value: components.ResponseInputText = /* values here */
``` ```
### `components.OpenResponsesInputMessageItemContentInputImage` ### `components.ResponseInputImage`
```python ```python
value: components.OpenResponsesInputMessageItemContentInputImage = /* values here */ value: components.ResponseInputImage = /* values here */
``` ```
### `components.ResponseInputFile` ### `components.ResponseInputFile`
@@ -27,9 +27,3 @@ value: components.ResponseInputFile = /* values here */
value: components.ResponseInputAudio = /* values here */ value: components.ResponseInputAudio = /* values here */
``` ```
### `components.ResponseInputVideo`
```python
value: components.ResponseInputVideo = /* values here */
```
@@ -0,0 +1,17 @@
# OpenResponsesEasyInputMessageContent2
## Supported Types
### `List[components.OpenResponsesEasyInputMessageContent1]`
```python
value: List[components.OpenResponsesEasyInputMessageContent1] = /* values here */
```
### `str`
```python
value: str = /* values here */
```
@@ -1,12 +0,0 @@
# OpenResponsesEasyInputMessageContentInputImage
Image input content item
## Fields
| Field | Type | Required | Description |
| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
| `type` | [components.OpenResponsesEasyInputMessageContentType](../components/openresponseseasyinputmessagecontenttype.md) | :heavy_check_mark: | N/A |
| `detail` | [components.OpenResponsesEasyInputMessageDetail](../components/openresponseseasyinputmessagedetail.md) | :heavy_check_mark: | N/A |
| `image_url` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
@@ -1,8 +0,0 @@
# OpenResponsesEasyInputMessageContentType
## Values
| Name | Value |
| ------------- | ------------- |
| `INPUT_IMAGE` | input_image |
@@ -1,17 +0,0 @@
# OpenResponsesEasyInputMessageContentUnion2
## Supported Types
### `List[components.OpenResponsesEasyInputMessageContentUnion1]`
```python
value: List[components.OpenResponsesEasyInputMessageContentUnion1] = /* values here */
```
### `str`
```python
value: str = /* values here */
```
@@ -1,10 +0,0 @@
# OpenResponsesEasyInputMessageDetail
## Values
| Name | Value |
| ------ | ------ |
| `AUTO` | auto |
| `HIGH` | high |
| `LOW` | low |
@@ -1,4 +1,4 @@
# OpenResponsesEasyInputMessageTypeMessage # OpenResponsesEasyInputMessageType
## Values ## Values
@@ -4,8 +4,8 @@
## Fields ## Fields
| Field | Type | Required | Description | | Field | Type | Required | Description |
| -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- |
| `id` | *Optional[str]* | :heavy_minus_sign: | N/A | | `id` | *Optional[str]* | :heavy_minus_sign: | N/A |
| `type` | [Optional[components.OpenResponsesInputMessageItemTypeMessage]](../components/openresponsesinputmessageitemtypemessage.md) | :heavy_minus_sign: | N/A | | `type` | [Optional[components.OpenResponsesInputMessageItemType]](../components/openresponsesinputmessageitemtype.md) | :heavy_minus_sign: | N/A |
| `role` | [components.OpenResponsesInputMessageItemRoleUnion](../components/openresponsesinputmessageitemroleunion.md) | :heavy_check_mark: | N/A | | `role` | [components.OpenResponsesInputMessageItemRoleUnion](../components/openresponsesinputmessageitemroleunion.md) | :heavy_check_mark: | N/A |
| `content` | List[[components.OpenResponsesInputMessageItemContentUnion](../components/openresponsesinputmessageitemcontentunion.md)] | :heavy_check_mark: | N/A | | `content` | List[[components.OpenResponsesInputMessageItemContent](../components/openresponsesinputmessageitemcontent.md)] | :heavy_check_mark: | N/A |
@@ -1,4 +1,4 @@
# OpenResponsesEasyInputMessageContentUnion1 # OpenResponsesInputMessageItemContent
## Supported Types ## Supported Types
@@ -9,10 +9,10 @@
value: components.ResponseInputText = /* values here */ value: components.ResponseInputText = /* values here */
``` ```
### `components.OpenResponsesEasyInputMessageContentInputImage` ### `components.ResponseInputImage`
```python ```python
value: components.OpenResponsesEasyInputMessageContentInputImage = /* values here */ value: components.ResponseInputImage = /* values here */
``` ```
### `components.ResponseInputFile` ### `components.ResponseInputFile`
@@ -27,9 +27,3 @@ value: components.ResponseInputFile = /* values here */
value: components.ResponseInputAudio = /* values here */ value: components.ResponseInputAudio = /* values here */
``` ```
### `components.ResponseInputVideo`
```python
value: components.ResponseInputVideo = /* values here */
```
@@ -1,12 +0,0 @@
# OpenResponsesInputMessageItemContentInputImage
Image input content item
## Fields
| Field | Type | Required | Description |
| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
| `type` | [components.OpenResponsesInputMessageItemContentType](../components/openresponsesinputmessageitemcontenttype.md) | :heavy_check_mark: | N/A |
| `detail` | [components.OpenResponsesInputMessageItemDetail](../components/openresponsesinputmessageitemdetail.md) | :heavy_check_mark: | N/A |
| `image_url` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
@@ -1,8 +0,0 @@
# OpenResponsesInputMessageItemContentType
## Values
| Name | Value |
| ------------- | ------------- |
| `INPUT_IMAGE` | input_image |
@@ -1,10 +0,0 @@
# OpenResponsesInputMessageItemDetail
## Values
| Name | Value |
| ------ | ------ |
| `AUTO` | auto |
| `HIGH` | high |
| `LOW` | low |
@@ -1,4 +1,4 @@
# OpenResponsesInputMessageItemTypeMessage # OpenResponsesInputMessageItemType
## Values ## Values
@@ -11,8 +11,7 @@ Complete non-streaming response from the Responses API
| `object` | [components.Object](../components/object.md) | :heavy_check_mark: | N/A | | | `object` | [components.Object](../components/object.md) | :heavy_check_mark: | N/A | |
| `created_at` | *float* | :heavy_check_mark: | N/A | | | `created_at` | *float* | :heavy_check_mark: | N/A | |
| `model` | *str* | :heavy_check_mark: | N/A | | | `model` | *str* | :heavy_check_mark: | N/A | |
| `status` | [components.OpenAIResponsesResponseStatus](../components/openairesponsesresponsestatus.md) | :heavy_check_mark: | N/A | | | `status` | [Optional[components.OpenAIResponsesResponseStatus]](../components/openairesponsesresponsestatus.md) | :heavy_minus_sign: | N/A | |
| `completed_at` | *Nullable[float]* | :heavy_check_mark: | N/A | |
| `output` | List[[components.ResponsesOutputItem](../components/responsesoutputitem.md)] | :heavy_check_mark: | N/A | | | `output` | List[[components.ResponsesOutputItem](../components/responsesoutputitem.md)] | :heavy_check_mark: | N/A | |
| `user` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | | `user` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
| `output_text` | *Optional[str]* | :heavy_minus_sign: | N/A | | | `output_text` | *Optional[str]* | :heavy_minus_sign: | N/A | |
@@ -20,14 +19,12 @@ Complete non-streaming response from the Responses API
| `safety_identifier` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | | `safety_identifier` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
| `error` | [Nullable[components.ResponsesErrorField]](../components/responseserrorfield.md) | :heavy_check_mark: | Error information returned from the API | {<br/>"code": "rate_limit_exceeded",<br/>"message": "Rate limit exceeded. Please try again later."<br/>} | | `error` | [Nullable[components.ResponsesErrorField]](../components/responseserrorfield.md) | :heavy_check_mark: | Error information returned from the API | {<br/>"code": "rate_limit_exceeded",<br/>"message": "Rate limit exceeded. Please try again later."<br/>} |
| `incomplete_details` | [Nullable[components.OpenAIResponsesIncompleteDetails]](../components/openairesponsesincompletedetails.md) | :heavy_check_mark: | N/A | | | `incomplete_details` | [Nullable[components.OpenAIResponsesIncompleteDetails]](../components/openairesponsesincompletedetails.md) | :heavy_check_mark: | N/A | |
| `usage` | [OptionalNullable[components.OpenResponsesUsage]](../components/openresponsesusage.md) | :heavy_minus_sign: | Token usage information for the response | {<br/>"input_tokens": 10,<br/>"output_tokens": 25,<br/>"total_tokens": 35,<br/>"input_tokens_details": {<br/>"cached_tokens": 0<br/>},<br/>"output_tokens_details": {<br/>"reasoning_tokens": 0<br/>},<br/>"cost": 0.0012,<br/>"cost_details": {<br/>"upstream_inference_cost": null,<br/>"upstream_inference_input_cost": 0.0008,<br/>"upstream_inference_output_cost": 0.0004<br/>}<br/>} | | `usage` | [Optional[components.OpenResponsesUsage]](../components/openresponsesusage.md) | :heavy_minus_sign: | Token usage information for the response | {<br/>"input_tokens": 10,<br/>"output_tokens": 25,<br/>"total_tokens": 35,<br/>"input_tokens_details": {<br/>"cached_tokens": 0<br/>},<br/>"output_tokens_details": {<br/>"reasoning_tokens": 0<br/>},<br/>"cost": 0.0012,<br/>"cost_details": {<br/>"upstream_inference_cost": null,<br/>"upstream_inference_input_cost": 0.0008,<br/>"upstream_inference_output_cost": 0.0004<br/>}<br/>} |
| `max_tool_calls` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | | | `max_tool_calls` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | |
| `top_logprobs` | *Optional[float]* | :heavy_minus_sign: | N/A | | | `top_logprobs` | *Optional[float]* | :heavy_minus_sign: | N/A | |
| `max_output_tokens` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | | | `max_output_tokens` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | |
| `temperature` | *Nullable[float]* | :heavy_check_mark: | N/A | | | `temperature` | *Nullable[float]* | :heavy_check_mark: | N/A | |
| `top_p` | *Nullable[float]* | :heavy_check_mark: | N/A | | | `top_p` | *Nullable[float]* | :heavy_check_mark: | N/A | |
| `presence_penalty` | *Nullable[float]* | :heavy_check_mark: | N/A | |
| `frequency_penalty` | *Nullable[float]* | :heavy_check_mark: | N/A | |
| `instructions` | [Nullable[components.OpenAIResponsesInputUnion]](../components/openairesponsesinputunion.md) | :heavy_check_mark: | N/A | | | `instructions` | [Nullable[components.OpenAIResponsesInputUnion]](../components/openairesponsesinputunion.md) | :heavy_check_mark: | N/A | |
| `metadata` | Dict[str, *str*] | :heavy_check_mark: | Metadata key-value pairs for the request. Keys must be ≤64 characters and cannot contain brackets. Values must be ≤512 characters. Maximum 16 pairs allowed. | {<br/>"user_id": "123",<br/>"session_id": "abc-def-ghi"<br/>} | | `metadata` | Dict[str, *str*] | :heavy_check_mark: | Metadata key-value pairs for the request. Keys must be ≤64 characters and cannot contain brackets. Values must be ≤512 characters. Maximum 16 pairs allowed. | {<br/>"user_id": "123",<br/>"session_id": "abc-def-ghi"<br/>} |
| `tools` | List[[components.OpenResponsesNonStreamingResponseToolUnion](../components/openresponsesnonstreamingresponsetoolunion.md)] | :heavy_check_mark: | N/A | | | `tools` | List[[components.OpenResponsesNonStreamingResponseToolUnion](../components/openresponsesnonstreamingresponsetoolunion.md)] | :heavy_check_mark: | N/A | |
-4
View File
@@ -20,10 +20,6 @@ Request schema for Responses endpoint
| `max_output_tokens` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | | | `max_output_tokens` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | |
| `temperature` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | | | `temperature` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | |
| `top_p` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | | | `top_p` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | |
| `top_logprobs` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | |
| `max_tool_calls` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | |
| `presence_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | |
| `frequency_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | |
| `top_k` | *Optional[float]* | :heavy_minus_sign: | N/A | | | `top_k` | *Optional[float]* | :heavy_minus_sign: | N/A | |
| `image_config` | Dict[str, [components.OpenResponsesRequestImageConfig](../components/openresponsesrequestimageconfig.md)] | :heavy_minus_sign: | Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/features/multimodal/image-generation for more details. | {<br/>"aspect_ratio": "16:9"<br/>} | | `image_config` | Dict[str, [components.OpenResponsesRequestImageConfig](../components/openresponsesrequestimageconfig.md)] | :heavy_minus_sign: | Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/features/multimodal/image-generation for more details. | {<br/>"aspect_ratio": "16:9"<br/>} |
| `modalities` | List[[components.ResponsesOutputModality](../components/responsesoutputmodality.md)] | :heavy_minus_sign: | Output modalities for the response. Supported values are "text" and "image". | [<br/>"text",<br/>"image"<br/>] | | `modalities` | List[[components.ResponsesOutputModality](../components/responsesoutputmodality.md)] | :heavy_minus_sign: | Output modalities for the response. Supported values are "text" and "image". | [<br/>"text",<br/>"image"<br/>] |
-11
View File
@@ -1,11 +0,0 @@
# ResponseInputVideo
Video input content item
## Fields
| Field | Type | Required | Description |
| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- |
| `type` | [components.ResponseInputVideoType](../components/responseinputvideotype.md) | :heavy_check_mark: | N/A |
| `video_url` | *str* | :heavy_check_mark: | A base64 data URL or remote URL that resolves to a video file |
@@ -1,8 +0,0 @@
# ResponseInputVideoType
## Values
| Name | Value |
| ------------- | ------------- |
| `INPUT_VIDEO` | input_video |
-1
View File
@@ -8,4 +8,3 @@
| `type` | [components.ResponseOutputTextType](../components/responseoutputtexttype.md) | :heavy_check_mark: | N/A | | `type` | [components.ResponseOutputTextType](../components/responseoutputtexttype.md) | :heavy_check_mark: | N/A |
| `text` | *str* | :heavy_check_mark: | N/A | | `text` | *str* | :heavy_check_mark: | N/A |
| `annotations` | List[[components.OpenAIResponsesAnnotation](../components/openairesponsesannotation.md)] | :heavy_minus_sign: | N/A | | `annotations` | List[[components.OpenAIResponsesAnnotation](../components/openairesponsesannotation.md)] | :heavy_minus_sign: | N/A |
| `logprobs` | List[[components.Logprob](../components/logprob.md)] | :heavy_minus_sign: | N/A |
@@ -1,4 +1,4 @@
# ResponseOutputTextTopLogprob # TopLogprob
## Fields ## Fields
@@ -6,5 +6,5 @@
| Field | Type | Required | Description | | Field | Type | Required | Description |
| ------------------ | ------------------ | ------------------ | ------------------ | | ------------------ | ------------------ | ------------------ | ------------------ |
| `token` | *str* | :heavy_check_mark: | N/A | | `token` | *str* | :heavy_check_mark: | N/A |
| `bytes_` | List[*float*] | :heavy_check_mark: | N/A |
| `logprob` | *float* | :heavy_check_mark: | N/A | | `logprob` | *float* | :heavy_check_mark: | N/A |
| `bytes_` | List[*float*] | :heavy_check_mark: | N/A |
-1
View File
@@ -39,4 +39,3 @@ Generation data
| `native_finish_reason` | *Nullable[str]* | :heavy_check_mark: | Native finish reason as reported by provider | stop | | `native_finish_reason` | *Nullable[str]* | :heavy_check_mark: | Native finish reason as reported by provider | stop |
| `external_user` | *Nullable[str]* | :heavy_check_mark: | External user identifier | user-123 | | `external_user` | *Nullable[str]* | :heavy_check_mark: | External user identifier | user-123 |
| `api_type` | [Nullable[operations.APIType]](../operations/apitype.md) | :heavy_check_mark: | Type of API used for the generation | | | `api_type` | [Nullable[operations.APIType]](../operations/apitype.md) | :heavy_check_mark: | Type of API used for the generation | |
| `router` | *Nullable[str]* | :heavy_check_mark: | Router used for the request (e.g., openrouter/auto) | openrouter/auto |
-4
View File
@@ -51,10 +51,6 @@ with OpenRouter(
| `max_output_tokens` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | | | `max_output_tokens` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | |
| `temperature` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | | | `temperature` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | |
| `top_p` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | | | `top_p` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | |
| `top_logprobs` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | |
| `max_tool_calls` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | |
| `presence_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | |
| `frequency_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | |
| `top_k` | *Optional[float]* | :heavy_minus_sign: | N/A | | | `top_k` | *Optional[float]* | :heavy_minus_sign: | N/A | |
| `image_config` | Dict[str, [components.OpenResponsesRequestImageConfig](../../components/openresponsesrequestimageconfig.md)] | :heavy_minus_sign: | Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/features/multimodal/image-generation for more details. | {<br/>"aspect_ratio": "16:9"<br/>} | | `image_config` | Dict[str, [components.OpenResponsesRequestImageConfig](../../components/openresponsesrequestimageconfig.md)] | :heavy_minus_sign: | Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/features/multimodal/image-generation for more details. | {<br/>"aspect_ratio": "16:9"<br/>} |
| `modalities` | List[[components.ResponsesOutputModality](../../components/responsesoutputmodality.md)] | :heavy_minus_sign: | Output modalities for the response. Supported values are "text" and "image". | [<br/>"text",<br/>"image"<br/>] | | `modalities` | List[[components.ResponsesOutputModality](../../components/responsesoutputmodality.md)] | :heavy_minus_sign: | Output modalities for the response. Supported values are "text" and "image". | [<br/>"text",<br/>"image"<br/>] |
+1 -1
View File
@@ -1,6 +1,6 @@
[project] [project]
name = "openrouter" name = "openrouter"
version = "0.1.2" version = "0.0.17"
description = "Official Python Client SDK for OpenRouter." description = "Official Python Client SDK for OpenRouter."
authors = [{ name = "OpenRouter" },] authors = [{ name = "OpenRouter" },]
readme = "README-PYPI.md" readme = "README-PYPI.md"
+2 -2
View File
@@ -3,10 +3,10 @@
import importlib.metadata import importlib.metadata
__title__: str = "openrouter" __title__: str = "openrouter"
__version__: str = "0.0.18" __version__: str = "0.0.17"
__openapi_doc_version__: str = "1.0.0" __openapi_doc_version__: str = "1.0.0"
__gen_version__: str = "2.768.0" __gen_version__: str = "2.768.0"
__user_agent__: str = "speakeasy-sdk/python 0.0.18 2.768.0 1.0.0 openrouter" __user_agent__: str = "speakeasy-sdk/python 0.0.17 2.768.0 1.0.0 openrouter"
try: try:
if __package__ is not None: if __package__ is not None:
+30 -77
View File
@@ -136,9 +136,9 @@ if TYPE_CHECKING:
) )
from .chatmessagetokenlogprob import ( from .chatmessagetokenlogprob import (
ChatMessageTokenLogprob, ChatMessageTokenLogprob,
ChatMessageTokenLogprobTopLogprob,
ChatMessageTokenLogprobTopLogprobTypedDict,
ChatMessageTokenLogprobTypedDict, ChatMessageTokenLogprobTypedDict,
TopLogprob,
TopLogprobTypedDict,
) )
from .chatmessagetokenlogprobs import ( from .chatmessagetokenlogprobs import (
ChatMessageTokenLogprobs, ChatMessageTokenLogprobs,
@@ -346,21 +346,17 @@ if TYPE_CHECKING:
from .openairesponsestruncation import OpenAIResponsesTruncation from .openairesponsestruncation import OpenAIResponsesTruncation
from .openresponseseasyinputmessage import ( from .openresponseseasyinputmessage import (
OpenResponsesEasyInputMessage, OpenResponsesEasyInputMessage,
OpenResponsesEasyInputMessageContentInputImage, OpenResponsesEasyInputMessageContent1,
OpenResponsesEasyInputMessageContentInputImageTypedDict, OpenResponsesEasyInputMessageContent1TypedDict,
OpenResponsesEasyInputMessageContentType, OpenResponsesEasyInputMessageContent2,
OpenResponsesEasyInputMessageContentUnion1, OpenResponsesEasyInputMessageContent2TypedDict,
OpenResponsesEasyInputMessageContentUnion1TypedDict,
OpenResponsesEasyInputMessageContentUnion2,
OpenResponsesEasyInputMessageContentUnion2TypedDict,
OpenResponsesEasyInputMessageDetail,
OpenResponsesEasyInputMessageRoleAssistant, OpenResponsesEasyInputMessageRoleAssistant,
OpenResponsesEasyInputMessageRoleDeveloper, OpenResponsesEasyInputMessageRoleDeveloper,
OpenResponsesEasyInputMessageRoleSystem, OpenResponsesEasyInputMessageRoleSystem,
OpenResponsesEasyInputMessageRoleUnion, OpenResponsesEasyInputMessageRoleUnion,
OpenResponsesEasyInputMessageRoleUnionTypedDict, OpenResponsesEasyInputMessageRoleUnionTypedDict,
OpenResponsesEasyInputMessageRoleUser, OpenResponsesEasyInputMessageRoleUser,
OpenResponsesEasyInputMessageTypeMessage, OpenResponsesEasyInputMessageType,
OpenResponsesEasyInputMessageTypedDict, OpenResponsesEasyInputMessageTypedDict,
) )
from .openresponseserrorevent import ( from .openresponseserrorevent import (
@@ -406,18 +402,14 @@ if TYPE_CHECKING:
) )
from .openresponsesinputmessageitem import ( from .openresponsesinputmessageitem import (
OpenResponsesInputMessageItem, OpenResponsesInputMessageItem,
OpenResponsesInputMessageItemContentInputImage, OpenResponsesInputMessageItemContent,
OpenResponsesInputMessageItemContentInputImageTypedDict, OpenResponsesInputMessageItemContentTypedDict,
OpenResponsesInputMessageItemContentType,
OpenResponsesInputMessageItemContentUnion,
OpenResponsesInputMessageItemContentUnionTypedDict,
OpenResponsesInputMessageItemDetail,
OpenResponsesInputMessageItemRoleDeveloper, OpenResponsesInputMessageItemRoleDeveloper,
OpenResponsesInputMessageItemRoleSystem, OpenResponsesInputMessageItemRoleSystem,
OpenResponsesInputMessageItemRoleUnion, OpenResponsesInputMessageItemRoleUnion,
OpenResponsesInputMessageItemRoleUnionTypedDict, OpenResponsesInputMessageItemRoleUnionTypedDict,
OpenResponsesInputMessageItemRoleUser, OpenResponsesInputMessageItemRoleUser,
OpenResponsesInputMessageItemTypeMessage, OpenResponsesInputMessageItemType,
OpenResponsesInputMessageItemTypedDict, OpenResponsesInputMessageItemTypedDict,
) )
from .openresponseslogprobs import ( from .openresponseslogprobs import (
@@ -757,17 +749,8 @@ if TYPE_CHECKING:
ResponseInputTextType, ResponseInputTextType,
ResponseInputTextTypedDict, ResponseInputTextTypedDict,
) )
from .responseinputvideo import (
ResponseInputVideo,
ResponseInputVideoType,
ResponseInputVideoTypedDict,
)
from .responseoutputtext import ( from .responseoutputtext import (
Logprob,
LogprobTypedDict,
ResponseOutputText, ResponseOutputText,
ResponseOutputTextTopLogprob,
ResponseOutputTextTopLogprobTypedDict,
ResponseOutputTextType, ResponseOutputTextType,
ResponseOutputTextTypedDict, ResponseOutputTextTypedDict,
) )
@@ -983,8 +966,6 @@ __all__ = [
"ChatMessageContentItemVideoVideoURL", "ChatMessageContentItemVideoVideoURL",
"ChatMessageContentItemVideoVideoURLTypedDict", "ChatMessageContentItemVideoVideoURLTypedDict",
"ChatMessageTokenLogprob", "ChatMessageTokenLogprob",
"ChatMessageTokenLogprobTopLogprob",
"ChatMessageTokenLogprobTopLogprobTypedDict",
"ChatMessageTokenLogprobTypedDict", "ChatMessageTokenLogprobTypedDict",
"ChatMessageTokenLogprobs", "ChatMessageTokenLogprobs",
"ChatMessageTokenLogprobsTypedDict", "ChatMessageTokenLogprobsTypedDict",
@@ -1079,8 +1060,6 @@ __all__ = [
"JSONSchemaConfigTypedDict", "JSONSchemaConfigTypedDict",
"ListEndpointsResponse", "ListEndpointsResponse",
"ListEndpointsResponseTypedDict", "ListEndpointsResponseTypedDict",
"Logprob",
"LogprobTypedDict",
"Message", "Message",
"MessageContent", "MessageContent",
"MessageContentTypedDict", "MessageContentTypedDict",
@@ -1169,21 +1148,17 @@ __all__ = [
"OpenAIResponsesToolChoiceUnionTypedDict", "OpenAIResponsesToolChoiceUnionTypedDict",
"OpenAIResponsesTruncation", "OpenAIResponsesTruncation",
"OpenResponsesEasyInputMessage", "OpenResponsesEasyInputMessage",
"OpenResponsesEasyInputMessageContentInputImage", "OpenResponsesEasyInputMessageContent1",
"OpenResponsesEasyInputMessageContentInputImageTypedDict", "OpenResponsesEasyInputMessageContent1TypedDict",
"OpenResponsesEasyInputMessageContentType", "OpenResponsesEasyInputMessageContent2",
"OpenResponsesEasyInputMessageContentUnion1", "OpenResponsesEasyInputMessageContent2TypedDict",
"OpenResponsesEasyInputMessageContentUnion1TypedDict",
"OpenResponsesEasyInputMessageContentUnion2",
"OpenResponsesEasyInputMessageContentUnion2TypedDict",
"OpenResponsesEasyInputMessageDetail",
"OpenResponsesEasyInputMessageRoleAssistant", "OpenResponsesEasyInputMessageRoleAssistant",
"OpenResponsesEasyInputMessageRoleDeveloper", "OpenResponsesEasyInputMessageRoleDeveloper",
"OpenResponsesEasyInputMessageRoleSystem", "OpenResponsesEasyInputMessageRoleSystem",
"OpenResponsesEasyInputMessageRoleUnion", "OpenResponsesEasyInputMessageRoleUnion",
"OpenResponsesEasyInputMessageRoleUnionTypedDict", "OpenResponsesEasyInputMessageRoleUnionTypedDict",
"OpenResponsesEasyInputMessageRoleUser", "OpenResponsesEasyInputMessageRoleUser",
"OpenResponsesEasyInputMessageTypeMessage", "OpenResponsesEasyInputMessageType",
"OpenResponsesEasyInputMessageTypedDict", "OpenResponsesEasyInputMessageTypedDict",
"OpenResponsesErrorEvent", "OpenResponsesErrorEvent",
"OpenResponsesErrorEventType", "OpenResponsesErrorEventType",
@@ -1210,18 +1185,14 @@ __all__ = [
"OpenResponsesInput1", "OpenResponsesInput1",
"OpenResponsesInput1TypedDict", "OpenResponsesInput1TypedDict",
"OpenResponsesInputMessageItem", "OpenResponsesInputMessageItem",
"OpenResponsesInputMessageItemContentInputImage", "OpenResponsesInputMessageItemContent",
"OpenResponsesInputMessageItemContentInputImageTypedDict", "OpenResponsesInputMessageItemContentTypedDict",
"OpenResponsesInputMessageItemContentType",
"OpenResponsesInputMessageItemContentUnion",
"OpenResponsesInputMessageItemContentUnionTypedDict",
"OpenResponsesInputMessageItemDetail",
"OpenResponsesInputMessageItemRoleDeveloper", "OpenResponsesInputMessageItemRoleDeveloper",
"OpenResponsesInputMessageItemRoleSystem", "OpenResponsesInputMessageItemRoleSystem",
"OpenResponsesInputMessageItemRoleUnion", "OpenResponsesInputMessageItemRoleUnion",
"OpenResponsesInputMessageItemRoleUnionTypedDict", "OpenResponsesInputMessageItemRoleUnionTypedDict",
"OpenResponsesInputMessageItemRoleUser", "OpenResponsesInputMessageItemRoleUser",
"OpenResponsesInputMessageItemTypeMessage", "OpenResponsesInputMessageItemType",
"OpenResponsesInputMessageItemTypedDict", "OpenResponsesInputMessageItemTypedDict",
"OpenResponsesInputTypedDict", "OpenResponsesInputTypedDict",
"OpenResponsesLogProbs", "OpenResponsesLogProbs",
@@ -1470,12 +1441,7 @@ __all__ = [
"ResponseInputText", "ResponseInputText",
"ResponseInputTextType", "ResponseInputTextType",
"ResponseInputTextTypedDict", "ResponseInputTextTypedDict",
"ResponseInputVideo",
"ResponseInputVideoType",
"ResponseInputVideoTypedDict",
"ResponseOutputText", "ResponseOutputText",
"ResponseOutputTextTopLogprob",
"ResponseOutputTextTopLogprobTypedDict",
"ResponseOutputTextType", "ResponseOutputTextType",
"ResponseOutputTextTypedDict", "ResponseOutputTextTypedDict",
"ResponseTextConfig", "ResponseTextConfig",
@@ -1574,6 +1540,8 @@ __all__ = [
"ToolResponseMessageContent", "ToolResponseMessageContent",
"ToolResponseMessageContentTypedDict", "ToolResponseMessageContentTypedDict",
"ToolResponseMessageTypedDict", "ToolResponseMessageTypedDict",
"TopLogprob",
"TopLogprobTypedDict",
"TopProviderInfo", "TopProviderInfo",
"TopProviderInfoTypedDict", "TopProviderInfoTypedDict",
"Truncation", "Truncation",
@@ -1732,9 +1700,9 @@ _dynamic_imports: dict[str, str] = {
"VideoURL2": ".chatmessagecontentitemvideo", "VideoURL2": ".chatmessagecontentitemvideo",
"VideoURL2TypedDict": ".chatmessagecontentitemvideo", "VideoURL2TypedDict": ".chatmessagecontentitemvideo",
"ChatMessageTokenLogprob": ".chatmessagetokenlogprob", "ChatMessageTokenLogprob": ".chatmessagetokenlogprob",
"ChatMessageTokenLogprobTopLogprob": ".chatmessagetokenlogprob",
"ChatMessageTokenLogprobTopLogprobTypedDict": ".chatmessagetokenlogprob",
"ChatMessageTokenLogprobTypedDict": ".chatmessagetokenlogprob", "ChatMessageTokenLogprobTypedDict": ".chatmessagetokenlogprob",
"TopLogprob": ".chatmessagetokenlogprob",
"TopLogprobTypedDict": ".chatmessagetokenlogprob",
"ChatMessageTokenLogprobs": ".chatmessagetokenlogprobs", "ChatMessageTokenLogprobs": ".chatmessagetokenlogprobs",
"ChatMessageTokenLogprobsTypedDict": ".chatmessagetokenlogprobs", "ChatMessageTokenLogprobsTypedDict": ".chatmessagetokenlogprobs",
"ChatMessageToolCall": ".chatmessagetoolcall", "ChatMessageToolCall": ".chatmessagetoolcall",
@@ -1907,21 +1875,17 @@ _dynamic_imports: dict[str, str] = {
"TypeTypedDict": ".openairesponsestoolchoice_union", "TypeTypedDict": ".openairesponsestoolchoice_union",
"OpenAIResponsesTruncation": ".openairesponsestruncation", "OpenAIResponsesTruncation": ".openairesponsestruncation",
"OpenResponsesEasyInputMessage": ".openresponseseasyinputmessage", "OpenResponsesEasyInputMessage": ".openresponseseasyinputmessage",
"OpenResponsesEasyInputMessageContentInputImage": ".openresponseseasyinputmessage", "OpenResponsesEasyInputMessageContent1": ".openresponseseasyinputmessage",
"OpenResponsesEasyInputMessageContentInputImageTypedDict": ".openresponseseasyinputmessage", "OpenResponsesEasyInputMessageContent1TypedDict": ".openresponseseasyinputmessage",
"OpenResponsesEasyInputMessageContentType": ".openresponseseasyinputmessage", "OpenResponsesEasyInputMessageContent2": ".openresponseseasyinputmessage",
"OpenResponsesEasyInputMessageContentUnion1": ".openresponseseasyinputmessage", "OpenResponsesEasyInputMessageContent2TypedDict": ".openresponseseasyinputmessage",
"OpenResponsesEasyInputMessageContentUnion1TypedDict": ".openresponseseasyinputmessage",
"OpenResponsesEasyInputMessageContentUnion2": ".openresponseseasyinputmessage",
"OpenResponsesEasyInputMessageContentUnion2TypedDict": ".openresponseseasyinputmessage",
"OpenResponsesEasyInputMessageDetail": ".openresponseseasyinputmessage",
"OpenResponsesEasyInputMessageRoleAssistant": ".openresponseseasyinputmessage", "OpenResponsesEasyInputMessageRoleAssistant": ".openresponseseasyinputmessage",
"OpenResponsesEasyInputMessageRoleDeveloper": ".openresponseseasyinputmessage", "OpenResponsesEasyInputMessageRoleDeveloper": ".openresponseseasyinputmessage",
"OpenResponsesEasyInputMessageRoleSystem": ".openresponseseasyinputmessage", "OpenResponsesEasyInputMessageRoleSystem": ".openresponseseasyinputmessage",
"OpenResponsesEasyInputMessageRoleUnion": ".openresponseseasyinputmessage", "OpenResponsesEasyInputMessageRoleUnion": ".openresponseseasyinputmessage",
"OpenResponsesEasyInputMessageRoleUnionTypedDict": ".openresponseseasyinputmessage", "OpenResponsesEasyInputMessageRoleUnionTypedDict": ".openresponseseasyinputmessage",
"OpenResponsesEasyInputMessageRoleUser": ".openresponseseasyinputmessage", "OpenResponsesEasyInputMessageRoleUser": ".openresponseseasyinputmessage",
"OpenResponsesEasyInputMessageTypeMessage": ".openresponseseasyinputmessage", "OpenResponsesEasyInputMessageType": ".openresponseseasyinputmessage",
"OpenResponsesEasyInputMessageTypedDict": ".openresponseseasyinputmessage", "OpenResponsesEasyInputMessageTypedDict": ".openresponseseasyinputmessage",
"OpenResponsesErrorEvent": ".openresponseserrorevent", "OpenResponsesErrorEvent": ".openresponseserrorevent",
"OpenResponsesErrorEventType": ".openresponseserrorevent", "OpenResponsesErrorEventType": ".openresponseserrorevent",
@@ -1949,18 +1913,14 @@ _dynamic_imports: dict[str, str] = {
"OpenResponsesInput1TypedDict": ".openresponsesinput", "OpenResponsesInput1TypedDict": ".openresponsesinput",
"OpenResponsesInputTypedDict": ".openresponsesinput", "OpenResponsesInputTypedDict": ".openresponsesinput",
"OpenResponsesInputMessageItem": ".openresponsesinputmessageitem", "OpenResponsesInputMessageItem": ".openresponsesinputmessageitem",
"OpenResponsesInputMessageItemContentInputImage": ".openresponsesinputmessageitem", "OpenResponsesInputMessageItemContent": ".openresponsesinputmessageitem",
"OpenResponsesInputMessageItemContentInputImageTypedDict": ".openresponsesinputmessageitem", "OpenResponsesInputMessageItemContentTypedDict": ".openresponsesinputmessageitem",
"OpenResponsesInputMessageItemContentType": ".openresponsesinputmessageitem",
"OpenResponsesInputMessageItemContentUnion": ".openresponsesinputmessageitem",
"OpenResponsesInputMessageItemContentUnionTypedDict": ".openresponsesinputmessageitem",
"OpenResponsesInputMessageItemDetail": ".openresponsesinputmessageitem",
"OpenResponsesInputMessageItemRoleDeveloper": ".openresponsesinputmessageitem", "OpenResponsesInputMessageItemRoleDeveloper": ".openresponsesinputmessageitem",
"OpenResponsesInputMessageItemRoleSystem": ".openresponsesinputmessageitem", "OpenResponsesInputMessageItemRoleSystem": ".openresponsesinputmessageitem",
"OpenResponsesInputMessageItemRoleUnion": ".openresponsesinputmessageitem", "OpenResponsesInputMessageItemRoleUnion": ".openresponsesinputmessageitem",
"OpenResponsesInputMessageItemRoleUnionTypedDict": ".openresponsesinputmessageitem", "OpenResponsesInputMessageItemRoleUnionTypedDict": ".openresponsesinputmessageitem",
"OpenResponsesInputMessageItemRoleUser": ".openresponsesinputmessageitem", "OpenResponsesInputMessageItemRoleUser": ".openresponsesinputmessageitem",
"OpenResponsesInputMessageItemTypeMessage": ".openresponsesinputmessageitem", "OpenResponsesInputMessageItemType": ".openresponsesinputmessageitem",
"OpenResponsesInputMessageItemTypedDict": ".openresponsesinputmessageitem", "OpenResponsesInputMessageItemTypedDict": ".openresponsesinputmessageitem",
"OpenResponsesLogProbs": ".openresponseslogprobs", "OpenResponsesLogProbs": ".openresponseslogprobs",
"OpenResponsesLogProbsTypedDict": ".openresponseslogprobs", "OpenResponsesLogProbsTypedDict": ".openresponseslogprobs",
@@ -2227,14 +2187,7 @@ _dynamic_imports: dict[str, str] = {
"ResponseInputText": ".responseinputtext", "ResponseInputText": ".responseinputtext",
"ResponseInputTextType": ".responseinputtext", "ResponseInputTextType": ".responseinputtext",
"ResponseInputTextTypedDict": ".responseinputtext", "ResponseInputTextTypedDict": ".responseinputtext",
"ResponseInputVideo": ".responseinputvideo",
"ResponseInputVideoType": ".responseinputvideo",
"ResponseInputVideoTypedDict": ".responseinputvideo",
"Logprob": ".responseoutputtext",
"LogprobTypedDict": ".responseoutputtext",
"ResponseOutputText": ".responseoutputtext", "ResponseOutputText": ".responseoutputtext",
"ResponseOutputTextTopLogprob": ".responseoutputtext",
"ResponseOutputTextTopLogprobTypedDict": ".responseoutputtext",
"ResponseOutputTextType": ".responseoutputtext", "ResponseOutputTextType": ".responseoutputtext",
"ResponseOutputTextTypedDict": ".responseoutputtext", "ResponseOutputTextTypedDict": ".responseoutputtext",
"CodeEnum": ".responseserrorfield", "CodeEnum": ".responseserrorfield",
@@ -8,13 +8,13 @@ from typing import List
from typing_extensions import Annotated, TypedDict from typing_extensions import Annotated, TypedDict
class ChatMessageTokenLogprobTopLogprobTypedDict(TypedDict): class TopLogprobTypedDict(TypedDict):
token: str token: str
logprob: float logprob: float
bytes_: Nullable[List[float]] bytes_: Nullable[List[float]]
class ChatMessageTokenLogprobTopLogprob(BaseModel): class TopLogprob(BaseModel):
token: str token: str
logprob: float logprob: float
@@ -56,7 +56,7 @@ class ChatMessageTokenLogprobTypedDict(TypedDict):
token: str token: str
logprob: float logprob: float
bytes_: Nullable[List[float]] bytes_: Nullable[List[float]]
top_logprobs: List[ChatMessageTokenLogprobTopLogprobTypedDict] top_logprobs: List[TopLogprobTypedDict]
class ChatMessageTokenLogprob(BaseModel): class ChatMessageTokenLogprob(BaseModel):
@@ -66,7 +66,7 @@ class ChatMessageTokenLogprob(BaseModel):
bytes_: Annotated[Nullable[List[float]], pydantic.Field(alias="bytes")] bytes_: Annotated[Nullable[List[float]], pydantic.Field(alias="bytes")]
top_logprobs: List[ChatMessageTokenLogprobTopLogprob] top_logprobs: List[TopLogprob]
@model_serializer(mode="wrap") @model_serializer(mode="wrap")
def serialize_model(self, handler): def serialize_model(self, handler):
@@ -3,24 +3,16 @@
from __future__ import annotations from __future__ import annotations
from .responseinputaudio import ResponseInputAudio, ResponseInputAudioTypedDict from .responseinputaudio import ResponseInputAudio, ResponseInputAudioTypedDict
from .responseinputfile import ResponseInputFile, ResponseInputFileTypedDict from .responseinputfile import ResponseInputFile, ResponseInputFileTypedDict
from .responseinputimage import ResponseInputImage, ResponseInputImageTypedDict
from .responseinputtext import ResponseInputText, ResponseInputTextTypedDict from .responseinputtext import ResponseInputText, ResponseInputTextTypedDict
from .responseinputvideo import ResponseInputVideo, ResponseInputVideoTypedDict from openrouter.types import BaseModel
from openrouter.types import ( from openrouter.utils import get_discriminator
BaseModel, from pydantic import Discriminator, Tag
Nullable,
OptionalNullable,
UNSET,
UNSET_SENTINEL,
UnrecognizedStr,
)
from openrouter.utils import get_discriminator, validate_open_enum
from pydantic import Discriminator, Tag, model_serializer
from pydantic.functional_validators import PlainValidator
from typing import List, Literal, Optional, Union from typing import List, Literal, Optional, Union
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
OpenResponsesEasyInputMessageTypeMessage = Literal["message",] OpenResponsesEasyInputMessageType = Literal["message",]
OpenResponsesEasyInputMessageRoleDeveloper = Literal["developer",] OpenResponsesEasyInputMessageRoleDeveloper = Literal["developer",]
@@ -57,114 +49,49 @@ OpenResponsesEasyInputMessageRoleUnion = TypeAliasType(
) )
OpenResponsesEasyInputMessageContentType = Literal["input_image",] OpenResponsesEasyInputMessageContent1TypedDict = TypeAliasType(
"OpenResponsesEasyInputMessageContent1TypedDict",
OpenResponsesEasyInputMessageDetail = Union[
Literal[
"auto",
"high",
"low",
],
UnrecognizedStr,
]
class OpenResponsesEasyInputMessageContentInputImageTypedDict(TypedDict):
r"""Image input content item"""
type: OpenResponsesEasyInputMessageContentType
detail: OpenResponsesEasyInputMessageDetail
image_url: NotRequired[Nullable[str]]
class OpenResponsesEasyInputMessageContentInputImage(BaseModel):
r"""Image input content item"""
type: OpenResponsesEasyInputMessageContentType
detail: Annotated[
OpenResponsesEasyInputMessageDetail, PlainValidator(validate_open_enum(False))
]
image_url: OptionalNullable[str] = UNSET
@model_serializer(mode="wrap")
def serialize_model(self, handler):
optional_fields = ["image_url"]
nullable_fields = ["image_url"]
null_default_fields = []
serialized = handler(self)
m = {}
for n, f in type(self).model_fields.items():
k = f.alias or n
val = serialized.get(k)
serialized.pop(k, None)
optional_nullable = k in optional_fields and k in nullable_fields
is_set = (
self.__pydantic_fields_set__.intersection({n})
or k in null_default_fields
) # pylint: disable=no-member
if val is not None and val != UNSET_SENTINEL:
m[k] = val
elif val != UNSET_SENTINEL and (
not k in optional_fields or (optional_nullable and is_set)
):
m[k] = val
return m
OpenResponsesEasyInputMessageContentUnion1TypedDict = TypeAliasType(
"OpenResponsesEasyInputMessageContentUnion1TypedDict",
Union[ Union[
ResponseInputTextTypedDict, ResponseInputTextTypedDict,
ResponseInputAudioTypedDict, ResponseInputAudioTypedDict,
ResponseInputVideoTypedDict, ResponseInputImageTypedDict,
OpenResponsesEasyInputMessageContentInputImageTypedDict,
ResponseInputFileTypedDict, ResponseInputFileTypedDict,
], ],
) )
OpenResponsesEasyInputMessageContentUnion1 = Annotated[ OpenResponsesEasyInputMessageContent1 = Annotated[
Union[ Union[
Annotated[ResponseInputText, Tag("input_text")], Annotated[ResponseInputText, Tag("input_text")],
Annotated[OpenResponsesEasyInputMessageContentInputImage, Tag("input_image")], Annotated[ResponseInputImage, Tag("input_image")],
Annotated[ResponseInputFile, Tag("input_file")], Annotated[ResponseInputFile, Tag("input_file")],
Annotated[ResponseInputAudio, Tag("input_audio")], Annotated[ResponseInputAudio, Tag("input_audio")],
Annotated[ResponseInputVideo, Tag("input_video")],
], ],
Discriminator(lambda m: get_discriminator(m, "type", "type")), Discriminator(lambda m: get_discriminator(m, "type", "type")),
] ]
OpenResponsesEasyInputMessageContentUnion2TypedDict = TypeAliasType( OpenResponsesEasyInputMessageContent2TypedDict = TypeAliasType(
"OpenResponsesEasyInputMessageContentUnion2TypedDict", "OpenResponsesEasyInputMessageContent2TypedDict",
Union[List[OpenResponsesEasyInputMessageContentUnion1TypedDict], str], Union[List[OpenResponsesEasyInputMessageContent1TypedDict], str],
) )
OpenResponsesEasyInputMessageContentUnion2 = TypeAliasType( OpenResponsesEasyInputMessageContent2 = TypeAliasType(
"OpenResponsesEasyInputMessageContentUnion2", "OpenResponsesEasyInputMessageContent2",
Union[List[OpenResponsesEasyInputMessageContentUnion1], str], Union[List[OpenResponsesEasyInputMessageContent1], str],
) )
class OpenResponsesEasyInputMessageTypedDict(TypedDict): class OpenResponsesEasyInputMessageTypedDict(TypedDict):
role: OpenResponsesEasyInputMessageRoleUnionTypedDict role: OpenResponsesEasyInputMessageRoleUnionTypedDict
content: OpenResponsesEasyInputMessageContentUnion2TypedDict content: OpenResponsesEasyInputMessageContent2TypedDict
type: NotRequired[OpenResponsesEasyInputMessageTypeMessage] type: NotRequired[OpenResponsesEasyInputMessageType]
class OpenResponsesEasyInputMessage(BaseModel): class OpenResponsesEasyInputMessage(BaseModel):
role: OpenResponsesEasyInputMessageRoleUnion role: OpenResponsesEasyInputMessageRoleUnion
content: OpenResponsesEasyInputMessageContentUnion2 content: OpenResponsesEasyInputMessageContent2
type: Optional[OpenResponsesEasyInputMessageTypeMessage] = None type: Optional[OpenResponsesEasyInputMessageType] = None
@@ -3,24 +3,16 @@
from __future__ import annotations from __future__ import annotations
from .responseinputaudio import ResponseInputAudio, ResponseInputAudioTypedDict from .responseinputaudio import ResponseInputAudio, ResponseInputAudioTypedDict
from .responseinputfile import ResponseInputFile, ResponseInputFileTypedDict from .responseinputfile import ResponseInputFile, ResponseInputFileTypedDict
from .responseinputimage import ResponseInputImage, ResponseInputImageTypedDict
from .responseinputtext import ResponseInputText, ResponseInputTextTypedDict from .responseinputtext import ResponseInputText, ResponseInputTextTypedDict
from .responseinputvideo import ResponseInputVideo, ResponseInputVideoTypedDict from openrouter.types import BaseModel
from openrouter.types import ( from openrouter.utils import get_discriminator
BaseModel, from pydantic import Discriminator, Tag
Nullable,
OptionalNullable,
UNSET,
UNSET_SENTINEL,
UnrecognizedStr,
)
from openrouter.utils import get_discriminator, validate_open_enum
from pydantic import Discriminator, Tag, model_serializer
from pydantic.functional_validators import PlainValidator
from typing import List, Literal, Optional, Union from typing import List, Literal, Optional, Union
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
OpenResponsesInputMessageItemTypeMessage = Literal["message",] OpenResponsesInputMessageItemType = Literal["message",]
OpenResponsesInputMessageItemRoleDeveloper = Literal["developer",] OpenResponsesInputMessageItemRoleDeveloper = Literal["developer",]
@@ -52,88 +44,23 @@ OpenResponsesInputMessageItemRoleUnion = TypeAliasType(
) )
OpenResponsesInputMessageItemContentType = Literal["input_image",] OpenResponsesInputMessageItemContentTypedDict = TypeAliasType(
"OpenResponsesInputMessageItemContentTypedDict",
OpenResponsesInputMessageItemDetail = Union[
Literal[
"auto",
"high",
"low",
],
UnrecognizedStr,
]
class OpenResponsesInputMessageItemContentInputImageTypedDict(TypedDict):
r"""Image input content item"""
type: OpenResponsesInputMessageItemContentType
detail: OpenResponsesInputMessageItemDetail
image_url: NotRequired[Nullable[str]]
class OpenResponsesInputMessageItemContentInputImage(BaseModel):
r"""Image input content item"""
type: OpenResponsesInputMessageItemContentType
detail: Annotated[
OpenResponsesInputMessageItemDetail, PlainValidator(validate_open_enum(False))
]
image_url: OptionalNullable[str] = UNSET
@model_serializer(mode="wrap")
def serialize_model(self, handler):
optional_fields = ["image_url"]
nullable_fields = ["image_url"]
null_default_fields = []
serialized = handler(self)
m = {}
for n, f in type(self).model_fields.items():
k = f.alias or n
val = serialized.get(k)
serialized.pop(k, None)
optional_nullable = k in optional_fields and k in nullable_fields
is_set = (
self.__pydantic_fields_set__.intersection({n})
or k in null_default_fields
) # pylint: disable=no-member
if val is not None and val != UNSET_SENTINEL:
m[k] = val
elif val != UNSET_SENTINEL and (
not k in optional_fields or (optional_nullable and is_set)
):
m[k] = val
return m
OpenResponsesInputMessageItemContentUnionTypedDict = TypeAliasType(
"OpenResponsesInputMessageItemContentUnionTypedDict",
Union[ Union[
ResponseInputTextTypedDict, ResponseInputTextTypedDict,
ResponseInputAudioTypedDict, ResponseInputAudioTypedDict,
ResponseInputVideoTypedDict, ResponseInputImageTypedDict,
OpenResponsesInputMessageItemContentInputImageTypedDict,
ResponseInputFileTypedDict, ResponseInputFileTypedDict,
], ],
) )
OpenResponsesInputMessageItemContentUnion = Annotated[ OpenResponsesInputMessageItemContent = Annotated[
Union[ Union[
Annotated[ResponseInputText, Tag("input_text")], Annotated[ResponseInputText, Tag("input_text")],
Annotated[OpenResponsesInputMessageItemContentInputImage, Tag("input_image")], Annotated[ResponseInputImage, Tag("input_image")],
Annotated[ResponseInputFile, Tag("input_file")], Annotated[ResponseInputFile, Tag("input_file")],
Annotated[ResponseInputAudio, Tag("input_audio")], Annotated[ResponseInputAudio, Tag("input_audio")],
Annotated[ResponseInputVideo, Tag("input_video")],
], ],
Discriminator(lambda m: get_discriminator(m, "type", "type")), Discriminator(lambda m: get_discriminator(m, "type", "type")),
] ]
@@ -141,16 +68,16 @@ OpenResponsesInputMessageItemContentUnion = Annotated[
class OpenResponsesInputMessageItemTypedDict(TypedDict): class OpenResponsesInputMessageItemTypedDict(TypedDict):
role: OpenResponsesInputMessageItemRoleUnionTypedDict role: OpenResponsesInputMessageItemRoleUnionTypedDict
content: List[OpenResponsesInputMessageItemContentUnionTypedDict] content: List[OpenResponsesInputMessageItemContentTypedDict]
id: NotRequired[str] id: NotRequired[str]
type: NotRequired[OpenResponsesInputMessageItemTypeMessage] type: NotRequired[OpenResponsesInputMessageItemType]
class OpenResponsesInputMessageItem(BaseModel): class OpenResponsesInputMessageItem(BaseModel):
role: OpenResponsesInputMessageItemRoleUnion role: OpenResponsesInputMessageItemRoleUnion
content: List[OpenResponsesInputMessageItemContentUnion] content: List[OpenResponsesInputMessageItemContent]
id: Optional[str] = None id: Optional[str] = None
type: Optional[OpenResponsesInputMessageItemTypeMessage] = None type: Optional[OpenResponsesInputMessageItemType] = None
@@ -149,27 +149,24 @@ class OpenResponsesNonStreamingResponseTypedDict(TypedDict):
object: Object object: Object
created_at: float created_at: float
model: str model: str
status: OpenAIResponsesResponseStatus
completed_at: Nullable[float]
output: List[ResponsesOutputItemTypedDict] output: List[ResponsesOutputItemTypedDict]
error: Nullable[ResponsesErrorFieldTypedDict] error: Nullable[ResponsesErrorFieldTypedDict]
r"""Error information returned from the API""" r"""Error information returned from the API"""
incomplete_details: Nullable[OpenAIResponsesIncompleteDetailsTypedDict] incomplete_details: Nullable[OpenAIResponsesIncompleteDetailsTypedDict]
temperature: Nullable[float] temperature: Nullable[float]
top_p: Nullable[float] top_p: Nullable[float]
presence_penalty: Nullable[float]
frequency_penalty: Nullable[float]
instructions: Nullable[OpenAIResponsesInputUnionTypedDict] instructions: Nullable[OpenAIResponsesInputUnionTypedDict]
metadata: Nullable[Dict[str, str]] metadata: Nullable[Dict[str, str]]
r"""Metadata key-value pairs for the request. Keys must be ≤64 characters and cannot contain brackets. Values must be ≤512 characters. Maximum 16 pairs allowed.""" r"""Metadata key-value pairs for the request. Keys must be ≤64 characters and cannot contain brackets. Values must be ≤512 characters. Maximum 16 pairs allowed."""
tools: List[OpenResponsesNonStreamingResponseToolUnionTypedDict] tools: List[OpenResponsesNonStreamingResponseToolUnionTypedDict]
tool_choice: OpenAIResponsesToolChoiceUnionTypedDict tool_choice: OpenAIResponsesToolChoiceUnionTypedDict
parallel_tool_calls: bool parallel_tool_calls: bool
status: NotRequired[OpenAIResponsesResponseStatus]
user: NotRequired[Nullable[str]] user: NotRequired[Nullable[str]]
output_text: NotRequired[str] output_text: NotRequired[str]
prompt_cache_key: NotRequired[Nullable[str]] prompt_cache_key: NotRequired[Nullable[str]]
safety_identifier: NotRequired[Nullable[str]] safety_identifier: NotRequired[Nullable[str]]
usage: NotRequired[Nullable[OpenResponsesUsageTypedDict]] usage: NotRequired[OpenResponsesUsageTypedDict]
r"""Token usage information for the response""" r"""Token usage information for the response"""
max_tool_calls: NotRequired[Nullable[float]] max_tool_calls: NotRequired[Nullable[float]]
top_logprobs: NotRequired[float] top_logprobs: NotRequired[float]
@@ -196,12 +193,6 @@ class OpenResponsesNonStreamingResponse(BaseModel):
model: str model: str
status: Annotated[
OpenAIResponsesResponseStatus, PlainValidator(validate_open_enum(False))
]
completed_at: Nullable[float]
output: List[ResponsesOutputItem] output: List[ResponsesOutputItem]
error: Nullable[ResponsesErrorField] error: Nullable[ResponsesErrorField]
@@ -213,10 +204,6 @@ class OpenResponsesNonStreamingResponse(BaseModel):
top_p: Nullable[float] top_p: Nullable[float]
presence_penalty: Nullable[float]
frequency_penalty: Nullable[float]
instructions: Nullable[OpenAIResponsesInputUnion] instructions: Nullable[OpenAIResponsesInputUnion]
metadata: Nullable[Dict[str, str]] metadata: Nullable[Dict[str, str]]
@@ -228,6 +215,11 @@ class OpenResponsesNonStreamingResponse(BaseModel):
parallel_tool_calls: bool parallel_tool_calls: bool
status: Annotated[
Optional[OpenAIResponsesResponseStatus],
PlainValidator(validate_open_enum(False)),
] = None
user: OptionalNullable[str] = UNSET user: OptionalNullable[str] = UNSET
output_text: Optional[str] = None output_text: Optional[str] = None
@@ -236,7 +228,7 @@ class OpenResponsesNonStreamingResponse(BaseModel):
safety_identifier: OptionalNullable[str] = UNSET safety_identifier: OptionalNullable[str] = UNSET
usage: OptionalNullable[OpenResponsesUsage] = UNSET usage: Optional[OpenResponsesUsage] = None
r"""Token usage information for the response""" r"""Token usage information for the response"""
max_tool_calls: OptionalNullable[float] = UNSET max_tool_calls: OptionalNullable[float] = UNSET
@@ -271,6 +263,7 @@ class OpenResponsesNonStreamingResponse(BaseModel):
@model_serializer(mode="wrap") @model_serializer(mode="wrap")
def serialize_model(self, handler): def serialize_model(self, handler):
optional_fields = [ optional_fields = [
"status",
"user", "user",
"output_text", "output_text",
"prompt_cache_key", "prompt_cache_key",
@@ -289,19 +282,15 @@ class OpenResponsesNonStreamingResponse(BaseModel):
"text", "text",
] ]
nullable_fields = [ nullable_fields = [
"completed_at",
"user", "user",
"prompt_cache_key", "prompt_cache_key",
"safety_identifier", "safety_identifier",
"error", "error",
"incomplete_details", "incomplete_details",
"usage",
"max_tool_calls", "max_tool_calls",
"max_output_tokens", "max_output_tokens",
"temperature", "temperature",
"top_p", "top_p",
"presence_penalty",
"frequency_penalty",
"instructions", "instructions",
"metadata", "metadata",
"prompt", "prompt",
@@ -545,10 +545,6 @@ class OpenResponsesRequestTypedDict(TypedDict):
max_output_tokens: NotRequired[Nullable[float]] max_output_tokens: NotRequired[Nullable[float]]
temperature: NotRequired[Nullable[float]] temperature: NotRequired[Nullable[float]]
top_p: NotRequired[Nullable[float]] top_p: NotRequired[Nullable[float]]
top_logprobs: NotRequired[Nullable[int]]
max_tool_calls: NotRequired[Nullable[int]]
presence_penalty: NotRequired[Nullable[float]]
frequency_penalty: NotRequired[Nullable[float]]
top_k: NotRequired[float] top_k: NotRequired[float]
image_config: NotRequired[Dict[str, OpenResponsesRequestImageConfigTypedDict]] image_config: NotRequired[Dict[str, OpenResponsesRequestImageConfigTypedDict]]
r"""Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/features/multimodal/image-generation for more details.""" r"""Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/features/multimodal/image-generation for more details."""
@@ -607,14 +603,6 @@ class OpenResponsesRequest(BaseModel):
top_p: OptionalNullable[float] = UNSET top_p: OptionalNullable[float] = UNSET
top_logprobs: OptionalNullable[int] = UNSET
max_tool_calls: OptionalNullable[int] = UNSET
presence_penalty: OptionalNullable[float] = UNSET
frequency_penalty: OptionalNullable[float] = UNSET
top_k: Optional[float] = None top_k: Optional[float] = None
image_config: Optional[Dict[str, OpenResponsesRequestImageConfig]] = None image_config: Optional[Dict[str, OpenResponsesRequestImageConfig]] = None
@@ -688,10 +676,6 @@ class OpenResponsesRequest(BaseModel):
"max_output_tokens", "max_output_tokens",
"temperature", "temperature",
"top_p", "top_p",
"top_logprobs",
"max_tool_calls",
"presence_penalty",
"frequency_penalty",
"top_k", "top_k",
"image_config", "image_config",
"modalities", "modalities",
@@ -718,10 +702,6 @@ class OpenResponsesRequest(BaseModel):
"max_output_tokens", "max_output_tokens",
"temperature", "temperature",
"top_p", "top_p",
"top_logprobs",
"max_tool_calls",
"presence_penalty",
"frequency_penalty",
"prompt_cache_key", "prompt_cache_key",
"previous_response_id", "previous_response_id",
"prompt", "prompt",
@@ -1,26 +0,0 @@
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
from __future__ import annotations
from openrouter.types import BaseModel
from typing import Literal
from typing_extensions import TypedDict
ResponseInputVideoType = Literal["input_video",]
class ResponseInputVideoTypedDict(TypedDict):
r"""Video input content item"""
type: ResponseInputVideoType
video_url: str
r"""A base64 data URL or remote URL that resolves to a video file"""
class ResponseInputVideo(BaseModel):
r"""Video input content item"""
type: ResponseInputVideoType
video_url: str
r"""A base64 data URL or remote URL that resolves to a video file"""
@@ -6,50 +6,17 @@ from .openairesponsesannotation import (
OpenAIResponsesAnnotationTypedDict, OpenAIResponsesAnnotationTypedDict,
) )
from openrouter.types import BaseModel from openrouter.types import BaseModel
import pydantic
from typing import List, Literal, Optional from typing import List, Literal, Optional
from typing_extensions import Annotated, NotRequired, TypedDict from typing_extensions import NotRequired, TypedDict
ResponseOutputTextType = Literal["output_text",] ResponseOutputTextType = Literal["output_text",]
class ResponseOutputTextTopLogprobTypedDict(TypedDict):
token: str
bytes_: List[float]
logprob: float
class ResponseOutputTextTopLogprob(BaseModel):
token: str
bytes_: Annotated[List[float], pydantic.Field(alias="bytes")]
logprob: float
class LogprobTypedDict(TypedDict):
token: str
bytes_: List[float]
logprob: float
top_logprobs: List[ResponseOutputTextTopLogprobTypedDict]
class Logprob(BaseModel):
token: str
bytes_: Annotated[List[float], pydantic.Field(alias="bytes")]
logprob: float
top_logprobs: List[ResponseOutputTextTopLogprob]
class ResponseOutputTextTypedDict(TypedDict): class ResponseOutputTextTypedDict(TypedDict):
type: ResponseOutputTextType type: ResponseOutputTextType
text: str text: str
annotations: NotRequired[List[OpenAIResponsesAnnotationTypedDict]] annotations: NotRequired[List[OpenAIResponsesAnnotationTypedDict]]
logprobs: NotRequired[List[LogprobTypedDict]]
class ResponseOutputText(BaseModel): class ResponseOutputText(BaseModel):
@@ -58,5 +25,3 @@ class ResponseOutputText(BaseModel):
text: str text: str
annotations: Optional[List[OpenAIResponsesAnnotation]] = None annotations: Optional[List[OpenAIResponsesAnnotation]] = None
logprobs: Optional[List[Logprob]] = None
@@ -96,8 +96,6 @@ class GetGenerationDataTypedDict(TypedDict):
r"""External user identifier""" r"""External user identifier"""
api_type: Nullable[APIType] api_type: Nullable[APIType]
r"""Type of API used for the generation""" r"""Type of API used for the generation"""
router: Nullable[str]
r"""Router used for the request (e.g., openrouter/auto)"""
class GetGenerationData(BaseModel): class GetGenerationData(BaseModel):
@@ -199,9 +197,6 @@ class GetGenerationData(BaseModel):
api_type: Annotated[Nullable[APIType], PlainValidator(validate_open_enum(False))] api_type: Annotated[Nullable[APIType], PlainValidator(validate_open_enum(False))]
r"""Type of API used for the generation""" r"""Type of API used for the generation"""
router: Nullable[str]
r"""Router used for the request (e.g., openrouter/auto)"""
@model_serializer(mode="wrap") @model_serializer(mode="wrap")
def serialize_model(self, handler): def serialize_model(self, handler):
optional_fields = [] optional_fields = []
@@ -231,7 +226,6 @@ class GetGenerationData(BaseModel):
"native_finish_reason", "native_finish_reason",
"external_user", "external_user",
"api_type", "api_type",
"router",
] ]
null_default_fields = [] null_default_fields = []
-56
View File
@@ -57,10 +57,6 @@ class Responses(BaseSDK):
max_output_tokens: OptionalNullable[float] = UNSET, max_output_tokens: OptionalNullable[float] = UNSET,
temperature: OptionalNullable[float] = UNSET, temperature: OptionalNullable[float] = UNSET,
top_p: OptionalNullable[float] = UNSET, top_p: OptionalNullable[float] = UNSET,
top_logprobs: OptionalNullable[int] = UNSET,
max_tool_calls: OptionalNullable[int] = UNSET,
presence_penalty: OptionalNullable[float] = UNSET,
frequency_penalty: OptionalNullable[float] = UNSET,
top_k: Optional[float] = None, top_k: Optional[float] = None,
image_config: Optional[ image_config: Optional[
Union[ Union[
@@ -119,10 +115,6 @@ class Responses(BaseSDK):
:param max_output_tokens: :param max_output_tokens:
:param temperature: :param temperature:
:param top_p: :param top_p:
:param top_logprobs:
:param max_tool_calls:
:param presence_penalty:
:param frequency_penalty:
:param top_k: :param top_k:
:param image_config: Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/features/multimodal/image-generation for more details. :param image_config: Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/features/multimodal/image-generation for more details.
:param modalities: Output modalities for the response. Supported values are \"text\" and \"image\". :param modalities: Output modalities for the response. Supported values are \"text\" and \"image\".
@@ -185,10 +177,6 @@ class Responses(BaseSDK):
max_output_tokens: OptionalNullable[float] = UNSET, max_output_tokens: OptionalNullable[float] = UNSET,
temperature: OptionalNullable[float] = UNSET, temperature: OptionalNullable[float] = UNSET,
top_p: OptionalNullable[float] = UNSET, top_p: OptionalNullable[float] = UNSET,
top_logprobs: OptionalNullable[int] = UNSET,
max_tool_calls: OptionalNullable[int] = UNSET,
presence_penalty: OptionalNullable[float] = UNSET,
frequency_penalty: OptionalNullable[float] = UNSET,
top_k: Optional[float] = None, top_k: Optional[float] = None,
image_config: Optional[ image_config: Optional[
Union[ Union[
@@ -247,10 +235,6 @@ class Responses(BaseSDK):
:param max_output_tokens: :param max_output_tokens:
:param temperature: :param temperature:
:param top_p: :param top_p:
:param top_logprobs:
:param max_tool_calls:
:param presence_penalty:
:param frequency_penalty:
:param top_k: :param top_k:
:param image_config: Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/features/multimodal/image-generation for more details. :param image_config: Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/features/multimodal/image-generation for more details.
:param modalities: Output modalities for the response. Supported values are \"text\" and \"image\". :param modalities: Output modalities for the response. Supported values are \"text\" and \"image\".
@@ -312,10 +296,6 @@ class Responses(BaseSDK):
max_output_tokens: OptionalNullable[float] = UNSET, max_output_tokens: OptionalNullable[float] = UNSET,
temperature: OptionalNullable[float] = UNSET, temperature: OptionalNullable[float] = UNSET,
top_p: OptionalNullable[float] = UNSET, top_p: OptionalNullable[float] = UNSET,
top_logprobs: OptionalNullable[int] = UNSET,
max_tool_calls: OptionalNullable[int] = UNSET,
presence_penalty: OptionalNullable[float] = UNSET,
frequency_penalty: OptionalNullable[float] = UNSET,
top_k: Optional[float] = None, top_k: Optional[float] = None,
image_config: Optional[ image_config: Optional[
Union[ Union[
@@ -374,10 +354,6 @@ class Responses(BaseSDK):
:param max_output_tokens: :param max_output_tokens:
:param temperature: :param temperature:
:param top_p: :param top_p:
:param top_logprobs:
:param max_tool_calls:
:param presence_penalty:
:param frequency_penalty:
:param top_k: :param top_k:
:param image_config: Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/features/multimodal/image-generation for more details. :param image_config: Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/features/multimodal/image-generation for more details.
:param modalities: Output modalities for the response. Supported values are \"text\" and \"image\". :param modalities: Output modalities for the response. Supported values are \"text\" and \"image\".
@@ -434,10 +410,6 @@ class Responses(BaseSDK):
max_output_tokens=max_output_tokens, max_output_tokens=max_output_tokens,
temperature=temperature, temperature=temperature,
top_p=top_p, top_p=top_p,
top_logprobs=top_logprobs,
max_tool_calls=max_tool_calls,
presence_penalty=presence_penalty,
frequency_penalty=frequency_penalty,
top_k=top_k, top_k=top_k,
image_config=image_config, image_config=image_config,
modalities=modalities, modalities=modalities,
@@ -690,10 +662,6 @@ class Responses(BaseSDK):
max_output_tokens: OptionalNullable[float] = UNSET, max_output_tokens: OptionalNullable[float] = UNSET,
temperature: OptionalNullable[float] = UNSET, temperature: OptionalNullable[float] = UNSET,
top_p: OptionalNullable[float] = UNSET, top_p: OptionalNullable[float] = UNSET,
top_logprobs: OptionalNullable[int] = UNSET,
max_tool_calls: OptionalNullable[int] = UNSET,
presence_penalty: OptionalNullable[float] = UNSET,
frequency_penalty: OptionalNullable[float] = UNSET,
top_k: Optional[float] = None, top_k: Optional[float] = None,
image_config: Optional[ image_config: Optional[
Union[ Union[
@@ -752,10 +720,6 @@ class Responses(BaseSDK):
:param max_output_tokens: :param max_output_tokens:
:param temperature: :param temperature:
:param top_p: :param top_p:
:param top_logprobs:
:param max_tool_calls:
:param presence_penalty:
:param frequency_penalty:
:param top_k: :param top_k:
:param image_config: Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/features/multimodal/image-generation for more details. :param image_config: Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/features/multimodal/image-generation for more details.
:param modalities: Output modalities for the response. Supported values are \"text\" and \"image\". :param modalities: Output modalities for the response. Supported values are \"text\" and \"image\".
@@ -818,10 +782,6 @@ class Responses(BaseSDK):
max_output_tokens: OptionalNullable[float] = UNSET, max_output_tokens: OptionalNullable[float] = UNSET,
temperature: OptionalNullable[float] = UNSET, temperature: OptionalNullable[float] = UNSET,
top_p: OptionalNullable[float] = UNSET, top_p: OptionalNullable[float] = UNSET,
top_logprobs: OptionalNullable[int] = UNSET,
max_tool_calls: OptionalNullable[int] = UNSET,
presence_penalty: OptionalNullable[float] = UNSET,
frequency_penalty: OptionalNullable[float] = UNSET,
top_k: Optional[float] = None, top_k: Optional[float] = None,
image_config: Optional[ image_config: Optional[
Union[ Union[
@@ -880,10 +840,6 @@ class Responses(BaseSDK):
:param max_output_tokens: :param max_output_tokens:
:param temperature: :param temperature:
:param top_p: :param top_p:
:param top_logprobs:
:param max_tool_calls:
:param presence_penalty:
:param frequency_penalty:
:param top_k: :param top_k:
:param image_config: Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/features/multimodal/image-generation for more details. :param image_config: Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/features/multimodal/image-generation for more details.
:param modalities: Output modalities for the response. Supported values are \"text\" and \"image\". :param modalities: Output modalities for the response. Supported values are \"text\" and \"image\".
@@ -945,10 +901,6 @@ class Responses(BaseSDK):
max_output_tokens: OptionalNullable[float] = UNSET, max_output_tokens: OptionalNullable[float] = UNSET,
temperature: OptionalNullable[float] = UNSET, temperature: OptionalNullable[float] = UNSET,
top_p: OptionalNullable[float] = UNSET, top_p: OptionalNullable[float] = UNSET,
top_logprobs: OptionalNullable[int] = UNSET,
max_tool_calls: OptionalNullable[int] = UNSET,
presence_penalty: OptionalNullable[float] = UNSET,
frequency_penalty: OptionalNullable[float] = UNSET,
top_k: Optional[float] = None, top_k: Optional[float] = None,
image_config: Optional[ image_config: Optional[
Union[ Union[
@@ -1007,10 +959,6 @@ class Responses(BaseSDK):
:param max_output_tokens: :param max_output_tokens:
:param temperature: :param temperature:
:param top_p: :param top_p:
:param top_logprobs:
:param max_tool_calls:
:param presence_penalty:
:param frequency_penalty:
:param top_k: :param top_k:
:param image_config: Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/features/multimodal/image-generation for more details. :param image_config: Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/features/multimodal/image-generation for more details.
:param modalities: Output modalities for the response. Supported values are \"text\" and \"image\". :param modalities: Output modalities for the response. Supported values are \"text\" and \"image\".
@@ -1067,10 +1015,6 @@ class Responses(BaseSDK):
max_output_tokens=max_output_tokens, max_output_tokens=max_output_tokens,
temperature=temperature, temperature=temperature,
top_p=top_p, top_p=top_p,
top_logprobs=top_logprobs,
max_tool_calls=max_tool_calls,
presence_penalty=presence_penalty,
frequency_penalty=frequency_penalty,
top_k=top_k, top_k=top_k,
image_config=image_config, image_config=image_config,
modalities=modalities, modalities=modalities,