openrouter 0.0.17__py3-none-any.whl → 0.0.18__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- openrouter/_version.py +2 -2
- openrouter/chat.py +58 -0
- openrouter/components/__init__.py +171 -30
- openrouter/components/_schema0.py +3 -2
- openrouter/components/_schema3.py +1 -0
- openrouter/components/chatgenerationparams.py +184 -14
- openrouter/components/chatgenerationtokenusage.py +3 -0
- openrouter/components/chatmessagetokenlogprob.py +4 -4
- openrouter/components/openresponseseasyinputmessage.py +93 -20
- openrouter/components/openresponsesinput.py +2 -2
- openrouter/components/openresponsesinputmessageitem.py +87 -14
- openrouter/components/openresponsesnonstreamingresponse.py +20 -9
- openrouter/components/openresponsesreasoning.py +1 -0
- openrouter/components/openresponsesrequest.py +85 -32
- openrouter/components/percentilelatencycutoffs.py +71 -0
- openrouter/components/percentilestats.py +34 -0
- openrouter/components/percentilethroughputcutoffs.py +71 -0
- openrouter/components/preferredmaxlatency.py +21 -0
- openrouter/components/preferredminthroughput.py +22 -0
- openrouter/components/providername.py +3 -2
- openrouter/components/providerpreferences.py +13 -33
- openrouter/components/publicendpoint.py +11 -0
- openrouter/components/responseinputvideo.py +26 -0
- openrouter/components/responseoutputtext.py +36 -1
- openrouter/components/responsesoutputitem.py +1 -1
- openrouter/components/responsesoutputitemreasoning.py +43 -3
- openrouter/components/responsesoutputmodality.py +14 -0
- openrouter/operations/getgeneration.py +6 -0
- openrouter/responses.py +114 -0
- {openrouter-0.0.17.dist-info → openrouter-0.0.18.dist-info}/METADATA +1 -1
- {openrouter-0.0.17.dist-info → openrouter-0.0.18.dist-info}/RECORD +34 -27
- {openrouter-0.0.17.dist-info → openrouter-0.0.18.dist-info}/WHEEL +0 -0
- {openrouter-0.0.17.dist-info → openrouter-0.0.18.dist-info}/licenses/LICENSE +0 -0
- {openrouter-0.0.17.dist-info → openrouter-0.0.18.dist-info}/top_level.txt +0 -0
openrouter/_version.py
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
import importlib.metadata
|
|
4
4
|
|
|
5
5
|
__title__: str = "openrouter"
|
|
6
|
-
__version__: str = "0.0.
|
|
6
|
+
__version__: str = "0.0.18"
|
|
7
7
|
__openapi_doc_version__: str = "1.0.0"
|
|
8
8
|
__gen_version__: str = "2.768.0"
|
|
9
|
-
__user_agent__: str = "speakeasy-sdk/python 0.0.
|
|
9
|
+
__user_agent__: str = "speakeasy-sdk/python 0.0.18 2.768.0 1.0.0 openrouter"
|
|
10
10
|
|
|
11
11
|
try:
|
|
12
12
|
if __package__ is not None:
|
openrouter/chat.py
CHANGED
|
@@ -76,6 +76,13 @@ class Chat(BaseSDK):
|
|
|
76
76
|
] = None,
|
|
77
77
|
top_p: OptionalNullable[float] = UNSET,
|
|
78
78
|
debug: Optional[Union[components.Debug, components.DebugTypedDict]] = None,
|
|
79
|
+
image_config: Optional[
|
|
80
|
+
Union[
|
|
81
|
+
Dict[str, components.ChatGenerationParamsImageConfig],
|
|
82
|
+
Dict[str, components.ChatGenerationParamsImageConfigTypedDict],
|
|
83
|
+
]
|
|
84
|
+
] = None,
|
|
85
|
+
modalities: Optional[List[components.Modality]] = None,
|
|
79
86
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
80
87
|
server_url: Optional[str] = None,
|
|
81
88
|
timeout_ms: Optional[int] = None,
|
|
@@ -112,6 +119,8 @@ class Chat(BaseSDK):
|
|
|
112
119
|
:param tools:
|
|
113
120
|
:param top_p:
|
|
114
121
|
:param debug:
|
|
122
|
+
:param image_config:
|
|
123
|
+
:param modalities:
|
|
115
124
|
:param retries: Override the default retry configuration for this method
|
|
116
125
|
:param server_url: Override the default server URL for this method
|
|
117
126
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
@@ -179,6 +188,13 @@ class Chat(BaseSDK):
|
|
|
179
188
|
] = None,
|
|
180
189
|
top_p: OptionalNullable[float] = UNSET,
|
|
181
190
|
debug: Optional[Union[components.Debug, components.DebugTypedDict]] = None,
|
|
191
|
+
image_config: Optional[
|
|
192
|
+
Union[
|
|
193
|
+
Dict[str, components.ChatGenerationParamsImageConfig],
|
|
194
|
+
Dict[str, components.ChatGenerationParamsImageConfigTypedDict],
|
|
195
|
+
]
|
|
196
|
+
] = None,
|
|
197
|
+
modalities: Optional[List[components.Modality]] = None,
|
|
182
198
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
183
199
|
server_url: Optional[str] = None,
|
|
184
200
|
timeout_ms: Optional[int] = None,
|
|
@@ -215,6 +231,8 @@ class Chat(BaseSDK):
|
|
|
215
231
|
:param tools:
|
|
216
232
|
:param top_p:
|
|
217
233
|
:param debug:
|
|
234
|
+
:param image_config:
|
|
235
|
+
:param modalities:
|
|
218
236
|
:param retries: Override the default retry configuration for this method
|
|
219
237
|
:param server_url: Override the default server URL for this method
|
|
220
238
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
@@ -281,6 +299,13 @@ class Chat(BaseSDK):
|
|
|
281
299
|
] = None,
|
|
282
300
|
top_p: OptionalNullable[float] = UNSET,
|
|
283
301
|
debug: Optional[Union[components.Debug, components.DebugTypedDict]] = None,
|
|
302
|
+
image_config: Optional[
|
|
303
|
+
Union[
|
|
304
|
+
Dict[str, components.ChatGenerationParamsImageConfig],
|
|
305
|
+
Dict[str, components.ChatGenerationParamsImageConfigTypedDict],
|
|
306
|
+
]
|
|
307
|
+
] = None,
|
|
308
|
+
modalities: Optional[List[components.Modality]] = None,
|
|
284
309
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
285
310
|
server_url: Optional[str] = None,
|
|
286
311
|
timeout_ms: Optional[int] = None,
|
|
@@ -317,6 +342,8 @@ class Chat(BaseSDK):
|
|
|
317
342
|
:param tools:
|
|
318
343
|
:param top_p:
|
|
319
344
|
:param debug:
|
|
345
|
+
:param image_config:
|
|
346
|
+
:param modalities:
|
|
320
347
|
:param retries: Override the default retry configuration for this method
|
|
321
348
|
:param server_url: Override the default server URL for this method
|
|
322
349
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
@@ -374,6 +401,8 @@ class Chat(BaseSDK):
|
|
|
374
401
|
),
|
|
375
402
|
top_p=top_p,
|
|
376
403
|
debug=utils.get_pydantic_model(debug, Optional[components.Debug]),
|
|
404
|
+
image_config=image_config,
|
|
405
|
+
modalities=modalities,
|
|
377
406
|
)
|
|
378
407
|
|
|
379
408
|
req = self._build_request(
|
|
@@ -523,6 +552,13 @@ class Chat(BaseSDK):
|
|
|
523
552
|
] = None,
|
|
524
553
|
top_p: OptionalNullable[float] = UNSET,
|
|
525
554
|
debug: Optional[Union[components.Debug, components.DebugTypedDict]] = None,
|
|
555
|
+
image_config: Optional[
|
|
556
|
+
Union[
|
|
557
|
+
Dict[str, components.ChatGenerationParamsImageConfig],
|
|
558
|
+
Dict[str, components.ChatGenerationParamsImageConfigTypedDict],
|
|
559
|
+
]
|
|
560
|
+
] = None,
|
|
561
|
+
modalities: Optional[List[components.Modality]] = None,
|
|
526
562
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
527
563
|
server_url: Optional[str] = None,
|
|
528
564
|
timeout_ms: Optional[int] = None,
|
|
@@ -559,6 +595,8 @@ class Chat(BaseSDK):
|
|
|
559
595
|
:param tools:
|
|
560
596
|
:param top_p:
|
|
561
597
|
:param debug:
|
|
598
|
+
:param image_config:
|
|
599
|
+
:param modalities:
|
|
562
600
|
:param retries: Override the default retry configuration for this method
|
|
563
601
|
:param server_url: Override the default server URL for this method
|
|
564
602
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
@@ -626,6 +664,13 @@ class Chat(BaseSDK):
|
|
|
626
664
|
] = None,
|
|
627
665
|
top_p: OptionalNullable[float] = UNSET,
|
|
628
666
|
debug: Optional[Union[components.Debug, components.DebugTypedDict]] = None,
|
|
667
|
+
image_config: Optional[
|
|
668
|
+
Union[
|
|
669
|
+
Dict[str, components.ChatGenerationParamsImageConfig],
|
|
670
|
+
Dict[str, components.ChatGenerationParamsImageConfigTypedDict],
|
|
671
|
+
]
|
|
672
|
+
] = None,
|
|
673
|
+
modalities: Optional[List[components.Modality]] = None,
|
|
629
674
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
630
675
|
server_url: Optional[str] = None,
|
|
631
676
|
timeout_ms: Optional[int] = None,
|
|
@@ -662,6 +707,8 @@ class Chat(BaseSDK):
|
|
|
662
707
|
:param tools:
|
|
663
708
|
:param top_p:
|
|
664
709
|
:param debug:
|
|
710
|
+
:param image_config:
|
|
711
|
+
:param modalities:
|
|
665
712
|
:param retries: Override the default retry configuration for this method
|
|
666
713
|
:param server_url: Override the default server URL for this method
|
|
667
714
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
@@ -728,6 +775,13 @@ class Chat(BaseSDK):
|
|
|
728
775
|
] = None,
|
|
729
776
|
top_p: OptionalNullable[float] = UNSET,
|
|
730
777
|
debug: Optional[Union[components.Debug, components.DebugTypedDict]] = None,
|
|
778
|
+
image_config: Optional[
|
|
779
|
+
Union[
|
|
780
|
+
Dict[str, components.ChatGenerationParamsImageConfig],
|
|
781
|
+
Dict[str, components.ChatGenerationParamsImageConfigTypedDict],
|
|
782
|
+
]
|
|
783
|
+
] = None,
|
|
784
|
+
modalities: Optional[List[components.Modality]] = None,
|
|
731
785
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
732
786
|
server_url: Optional[str] = None,
|
|
733
787
|
timeout_ms: Optional[int] = None,
|
|
@@ -764,6 +818,8 @@ class Chat(BaseSDK):
|
|
|
764
818
|
:param tools:
|
|
765
819
|
:param top_p:
|
|
766
820
|
:param debug:
|
|
821
|
+
:param image_config:
|
|
822
|
+
:param modalities:
|
|
767
823
|
:param retries: Override the default retry configuration for this method
|
|
768
824
|
:param server_url: Override the default server URL for this method
|
|
769
825
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
@@ -821,6 +877,8 @@ class Chat(BaseSDK):
|
|
|
821
877
|
),
|
|
822
878
|
top_p=top_p,
|
|
823
879
|
debug=utils.get_pydantic_model(debug, Optional[components.Debug]),
|
|
880
|
+
image_config=image_config,
|
|
881
|
+
modalities=modalities,
|
|
824
882
|
)
|
|
825
883
|
|
|
826
884
|
req = self._build_request_async(
|