openrouter 0.0.21__py3-none-any.whl → 0.1.1__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/api_keys.py +4 -12
- openrouter/components/openresponsesrequest.py +0 -6
- openrouter/components/providername.py +0 -1
- openrouter/embeddings.py +4 -22
- openrouter/operations/__init__.py +0 -6
- openrouter/operations/createembeddings.py +2 -13
- openrouter/operations/getparameters.py +0 -1
- openrouter/operations/updatekeys.py +2 -2
- openrouter/responses.py +0 -14
- {openrouter-0.0.21.dist-info → openrouter-0.1.1.dist-info}/METADATA +1 -1
- {openrouter-0.0.21.dist-info → openrouter-0.1.1.dist-info}/RECORD +15 -15
- {openrouter-0.0.21.dist-info → openrouter-0.1.1.dist-info}/WHEEL +0 -0
- {openrouter-0.0.21.dist-info → openrouter-0.1.1.dist-info}/licenses/LICENSE +0 -0
- {openrouter-0.0.21.dist-info → openrouter-0.1.1.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.
|
|
6
|
+
__version__: str = "0.1.1"
|
|
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.
|
|
9
|
+
__user_agent__: str = "speakeasy-sdk/python 0.1.1 2.768.0 1.0.0 openrouter"
|
|
10
10
|
|
|
11
11
|
try:
|
|
12
12
|
if __package__ is not None:
|
openrouter/api_keys.py
CHANGED
|
@@ -506,7 +506,7 @@ class APIKeys(BaseSDK):
|
|
|
506
506
|
|
|
507
507
|
request = operations.UpdateKeysRequest(
|
|
508
508
|
hash=hash,
|
|
509
|
-
|
|
509
|
+
body=operations.UpdateKeysRequestBody(
|
|
510
510
|
name=name,
|
|
511
511
|
disabled=disabled,
|
|
512
512
|
limit=limit,
|
|
@@ -529,11 +529,7 @@ class APIKeys(BaseSDK):
|
|
|
529
529
|
http_headers=http_headers,
|
|
530
530
|
security=self.sdk_configuration.security,
|
|
531
531
|
get_serialized_body=lambda: utils.serialize_request_body(
|
|
532
|
-
request.
|
|
533
|
-
False,
|
|
534
|
-
False,
|
|
535
|
-
"json",
|
|
536
|
-
operations.UpdateKeysRequestBody,
|
|
532
|
+
request.body, False, False, "json", operations.UpdateKeysRequestBody
|
|
537
533
|
),
|
|
538
534
|
allow_empty_value=None,
|
|
539
535
|
timeout_ms=timeout_ms,
|
|
@@ -642,7 +638,7 @@ class APIKeys(BaseSDK):
|
|
|
642
638
|
|
|
643
639
|
request = operations.UpdateKeysRequest(
|
|
644
640
|
hash=hash,
|
|
645
|
-
|
|
641
|
+
body=operations.UpdateKeysRequestBody(
|
|
646
642
|
name=name,
|
|
647
643
|
disabled=disabled,
|
|
648
644
|
limit=limit,
|
|
@@ -665,11 +661,7 @@ class APIKeys(BaseSDK):
|
|
|
665
661
|
http_headers=http_headers,
|
|
666
662
|
security=self.sdk_configuration.security,
|
|
667
663
|
get_serialized_body=lambda: utils.serialize_request_body(
|
|
668
|
-
request.
|
|
669
|
-
False,
|
|
670
|
-
False,
|
|
671
|
-
"json",
|
|
672
|
-
operations.UpdateKeysRequestBody,
|
|
664
|
+
request.body, False, False, "json", operations.UpdateKeysRequestBody
|
|
673
665
|
),
|
|
674
666
|
allow_empty_value=None,
|
|
675
667
|
timeout_ms=timeout_ms,
|
|
@@ -497,8 +497,6 @@ class OpenResponsesRequestTypedDict(TypedDict):
|
|
|
497
497
|
r"""Plugins you want to enable for this request, including their settings."""
|
|
498
498
|
user: NotRequired[str]
|
|
499
499
|
r"""A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 128 characters."""
|
|
500
|
-
session_id: NotRequired[str]
|
|
501
|
-
r"""A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 128 characters."""
|
|
502
500
|
|
|
503
501
|
|
|
504
502
|
class OpenResponsesRequest(BaseModel):
|
|
@@ -576,9 +574,6 @@ class OpenResponsesRequest(BaseModel):
|
|
|
576
574
|
user: Optional[str] = None
|
|
577
575
|
r"""A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 128 characters."""
|
|
578
576
|
|
|
579
|
-
session_id: Optional[str] = None
|
|
580
|
-
r"""A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 128 characters."""
|
|
581
|
-
|
|
582
577
|
@model_serializer(mode="wrap")
|
|
583
578
|
def serialize_model(self, handler):
|
|
584
579
|
optional_fields = [
|
|
@@ -609,7 +604,6 @@ class OpenResponsesRequest(BaseModel):
|
|
|
609
604
|
"provider",
|
|
610
605
|
"plugins",
|
|
611
606
|
"user",
|
|
612
|
-
"session_id",
|
|
613
607
|
]
|
|
614
608
|
nullable_fields = [
|
|
615
609
|
"instructions",
|
openrouter/embeddings.py
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
2
|
|
|
3
3
|
from .basesdk import BaseSDK
|
|
4
|
-
from enum import Enum
|
|
5
4
|
from openrouter import components, errors, operations, utils
|
|
6
5
|
from openrouter._hooks import HookContext
|
|
7
6
|
from openrouter.types import OptionalNullable, UNSET
|
|
@@ -10,11 +9,6 @@ from openrouter.utils.unmarshal_json_response import unmarshal_json_response
|
|
|
10
9
|
from typing import Any, Mapping, Optional, Union
|
|
11
10
|
|
|
12
11
|
|
|
13
|
-
class GenerateAcceptEnum(str, Enum):
|
|
14
|
-
APPLICATION_JSON = "application/json"
|
|
15
|
-
TEXT_EVENT_STREAM = "text/event-stream"
|
|
16
|
-
|
|
17
|
-
|
|
18
12
|
class Embeddings(BaseSDK):
|
|
19
13
|
r"""Text embedding endpoints"""
|
|
20
14
|
|
|
@@ -36,7 +30,6 @@ class Embeddings(BaseSDK):
|
|
|
36
30
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
37
31
|
server_url: Optional[str] = None,
|
|
38
32
|
timeout_ms: Optional[int] = None,
|
|
39
|
-
accept_header_override: Optional[GenerateAcceptEnum] = None,
|
|
40
33
|
http_headers: Optional[Mapping[str, str]] = None,
|
|
41
34
|
) -> operations.CreateEmbeddingsResponse:
|
|
42
35
|
r"""Submit an embedding request
|
|
@@ -53,7 +46,6 @@ class Embeddings(BaseSDK):
|
|
|
53
46
|
:param retries: Override the default retry configuration for this method
|
|
54
47
|
:param server_url: Override the default server URL for this method
|
|
55
48
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
56
|
-
:param accept_header_override: Override the default accept header for this method
|
|
57
49
|
:param http_headers: Additional headers to set or replace on requests.
|
|
58
50
|
"""
|
|
59
51
|
base_url = None
|
|
@@ -88,9 +80,7 @@ class Embeddings(BaseSDK):
|
|
|
88
80
|
request_has_path_params=False,
|
|
89
81
|
request_has_query_params=True,
|
|
90
82
|
user_agent_header="user-agent",
|
|
91
|
-
accept_header_value=
|
|
92
|
-
if accept_header_override is not None
|
|
93
|
-
else "application/json;q=1, text/event-stream;q=0",
|
|
83
|
+
accept_header_value="application/json",
|
|
94
84
|
http_headers=http_headers,
|
|
95
85
|
security=self.sdk_configuration.security,
|
|
96
86
|
get_serialized_body=lambda: utils.serialize_request_body(
|
|
@@ -139,10 +129,8 @@ class Embeddings(BaseSDK):
|
|
|
139
129
|
response_data: Any = None
|
|
140
130
|
if utils.match_response(http_res, "200", "application/json"):
|
|
141
131
|
return unmarshal_json_response(
|
|
142
|
-
operations.
|
|
132
|
+
operations.CreateEmbeddingsResponse, http_res
|
|
143
133
|
)
|
|
144
|
-
if utils.match_response(http_res, "200", "text/event-stream"):
|
|
145
|
-
return http_res.text
|
|
146
134
|
if utils.match_response(http_res, "400", "application/json"):
|
|
147
135
|
response_data = unmarshal_json_response(
|
|
148
136
|
errors.BadRequestResponseErrorData, http_res
|
|
@@ -224,7 +212,6 @@ class Embeddings(BaseSDK):
|
|
|
224
212
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
225
213
|
server_url: Optional[str] = None,
|
|
226
214
|
timeout_ms: Optional[int] = None,
|
|
227
|
-
accept_header_override: Optional[GenerateAcceptEnum] = None,
|
|
228
215
|
http_headers: Optional[Mapping[str, str]] = None,
|
|
229
216
|
) -> operations.CreateEmbeddingsResponse:
|
|
230
217
|
r"""Submit an embedding request
|
|
@@ -241,7 +228,6 @@ class Embeddings(BaseSDK):
|
|
|
241
228
|
:param retries: Override the default retry configuration for this method
|
|
242
229
|
:param server_url: Override the default server URL for this method
|
|
243
230
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
244
|
-
:param accept_header_override: Override the default accept header for this method
|
|
245
231
|
:param http_headers: Additional headers to set or replace on requests.
|
|
246
232
|
"""
|
|
247
233
|
base_url = None
|
|
@@ -276,9 +262,7 @@ class Embeddings(BaseSDK):
|
|
|
276
262
|
request_has_path_params=False,
|
|
277
263
|
request_has_query_params=True,
|
|
278
264
|
user_agent_header="user-agent",
|
|
279
|
-
accept_header_value=
|
|
280
|
-
if accept_header_override is not None
|
|
281
|
-
else "application/json;q=1, text/event-stream;q=0",
|
|
265
|
+
accept_header_value="application/json",
|
|
282
266
|
http_headers=http_headers,
|
|
283
267
|
security=self.sdk_configuration.security,
|
|
284
268
|
get_serialized_body=lambda: utils.serialize_request_body(
|
|
@@ -327,10 +311,8 @@ class Embeddings(BaseSDK):
|
|
|
327
311
|
response_data: Any = None
|
|
328
312
|
if utils.match_response(http_res, "200", "application/json"):
|
|
329
313
|
return unmarshal_json_response(
|
|
330
|
-
operations.
|
|
314
|
+
operations.CreateEmbeddingsResponse, http_res
|
|
331
315
|
)
|
|
332
|
-
if utils.match_response(http_res, "200", "text/event-stream"):
|
|
333
|
-
return http_res.text
|
|
334
316
|
if utils.match_response(http_res, "400", "application/json"):
|
|
335
317
|
response_data = unmarshal_json_response(
|
|
336
318
|
errors.BadRequestResponseErrorData, http_res
|
|
@@ -45,8 +45,6 @@ if TYPE_CHECKING:
|
|
|
45
45
|
CreateEmbeddingsRequest,
|
|
46
46
|
CreateEmbeddingsRequestTypedDict,
|
|
47
47
|
CreateEmbeddingsResponse,
|
|
48
|
-
CreateEmbeddingsResponseBody,
|
|
49
|
-
CreateEmbeddingsResponseBodyTypedDict,
|
|
50
48
|
CreateEmbeddingsResponseTypedDict,
|
|
51
49
|
Embedding,
|
|
52
50
|
EmbeddingTypedDict,
|
|
@@ -221,8 +219,6 @@ __all__ = [
|
|
|
221
219
|
"CreateEmbeddingsRequest",
|
|
222
220
|
"CreateEmbeddingsRequestTypedDict",
|
|
223
221
|
"CreateEmbeddingsResponse",
|
|
224
|
-
"CreateEmbeddingsResponseBody",
|
|
225
|
-
"CreateEmbeddingsResponseBodyTypedDict",
|
|
226
222
|
"CreateEmbeddingsResponseTypedDict",
|
|
227
223
|
"CreateKeysData",
|
|
228
224
|
"CreateKeysDataTypedDict",
|
|
@@ -377,8 +373,6 @@ _dynamic_imports: dict[str, str] = {
|
|
|
377
373
|
"CreateEmbeddingsRequest": ".createembeddings",
|
|
378
374
|
"CreateEmbeddingsRequestTypedDict": ".createembeddings",
|
|
379
375
|
"CreateEmbeddingsResponse": ".createembeddings",
|
|
380
|
-
"CreateEmbeddingsResponseBody": ".createembeddings",
|
|
381
|
-
"CreateEmbeddingsResponseBodyTypedDict": ".createembeddings",
|
|
382
376
|
"CreateEmbeddingsResponseTypedDict": ".createembeddings",
|
|
383
377
|
"Embedding": ".createembeddings",
|
|
384
378
|
"EmbeddingTypedDict": ".createembeddings",
|
|
@@ -395,7 +395,7 @@ class Usage(BaseModel):
|
|
|
395
395
|
cost: Optional[float] = None
|
|
396
396
|
|
|
397
397
|
|
|
398
|
-
class
|
|
398
|
+
class CreateEmbeddingsResponseTypedDict(TypedDict):
|
|
399
399
|
r"""Embedding response"""
|
|
400
400
|
|
|
401
401
|
object: Object
|
|
@@ -405,7 +405,7 @@ class CreateEmbeddingsResponseBodyTypedDict(TypedDict):
|
|
|
405
405
|
usage: NotRequired[UsageTypedDict]
|
|
406
406
|
|
|
407
407
|
|
|
408
|
-
class
|
|
408
|
+
class CreateEmbeddingsResponse(BaseModel):
|
|
409
409
|
r"""Embedding response"""
|
|
410
410
|
|
|
411
411
|
object: Object
|
|
@@ -417,14 +417,3 @@ class CreateEmbeddingsResponseBody(BaseModel):
|
|
|
417
417
|
id: Optional[str] = None
|
|
418
418
|
|
|
419
419
|
usage: Optional[Usage] = None
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
CreateEmbeddingsResponseTypedDict = TypeAliasType(
|
|
423
|
-
"CreateEmbeddingsResponseTypedDict",
|
|
424
|
-
Union[CreateEmbeddingsResponseBodyTypedDict, str],
|
|
425
|
-
)
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
CreateEmbeddingsResponse = TypeAliasType(
|
|
429
|
-
"CreateEmbeddingsResponse", Union[CreateEmbeddingsResponseBody, str]
|
|
430
|
-
)
|
|
@@ -105,7 +105,7 @@ class UpdateKeysRequestBody(BaseModel):
|
|
|
105
105
|
class UpdateKeysRequestTypedDict(TypedDict):
|
|
106
106
|
hash: str
|
|
107
107
|
r"""The hash identifier of the API key to update"""
|
|
108
|
-
|
|
108
|
+
body: UpdateKeysRequestBodyTypedDict
|
|
109
109
|
|
|
110
110
|
|
|
111
111
|
class UpdateKeysRequest(BaseModel):
|
|
@@ -114,7 +114,7 @@ class UpdateKeysRequest(BaseModel):
|
|
|
114
114
|
]
|
|
115
115
|
r"""The hash identifier of the API key to update"""
|
|
116
116
|
|
|
117
|
-
|
|
117
|
+
body: Annotated[
|
|
118
118
|
UpdateKeysRequestBody,
|
|
119
119
|
FieldMetadata(request=RequestMetadata(media_type="application/json")),
|
|
120
120
|
]
|
openrouter/responses.py
CHANGED
|
@@ -79,7 +79,6 @@ class Responses(BaseSDK):
|
|
|
79
79
|
Union[List[components.Plugin], List[components.PluginTypedDict]]
|
|
80
80
|
] = None,
|
|
81
81
|
user: Optional[str] = None,
|
|
82
|
-
session_id: Optional[str] = None,
|
|
83
82
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
84
83
|
server_url: Optional[str] = None,
|
|
85
84
|
timeout_ms: Optional[int] = None,
|
|
@@ -115,7 +114,6 @@ class Responses(BaseSDK):
|
|
|
115
114
|
:param provider: When multiple model providers are available, optionally indicate your routing preference.
|
|
116
115
|
:param plugins: Plugins you want to enable for this request, including their settings.
|
|
117
116
|
:param user: A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 128 characters.
|
|
118
|
-
:param session_id: A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 128 characters.
|
|
119
117
|
:param retries: Override the default retry configuration for this method
|
|
120
118
|
:param server_url: Override the default server URL for this method
|
|
121
119
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
@@ -184,7 +182,6 @@ class Responses(BaseSDK):
|
|
|
184
182
|
Union[List[components.Plugin], List[components.PluginTypedDict]]
|
|
185
183
|
] = None,
|
|
186
184
|
user: Optional[str] = None,
|
|
187
|
-
session_id: Optional[str] = None,
|
|
188
185
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
189
186
|
server_url: Optional[str] = None,
|
|
190
187
|
timeout_ms: Optional[int] = None,
|
|
@@ -220,7 +217,6 @@ class Responses(BaseSDK):
|
|
|
220
217
|
:param provider: When multiple model providers are available, optionally indicate your routing preference.
|
|
221
218
|
:param plugins: Plugins you want to enable for this request, including their settings.
|
|
222
219
|
:param user: A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 128 characters.
|
|
223
|
-
:param session_id: A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 128 characters.
|
|
224
220
|
:param retries: Override the default retry configuration for this method
|
|
225
221
|
:param server_url: Override the default server URL for this method
|
|
226
222
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
@@ -288,7 +284,6 @@ class Responses(BaseSDK):
|
|
|
288
284
|
Union[List[components.Plugin], List[components.PluginTypedDict]]
|
|
289
285
|
] = None,
|
|
290
286
|
user: Optional[str] = None,
|
|
291
|
-
session_id: Optional[str] = None,
|
|
292
287
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
293
288
|
server_url: Optional[str] = None,
|
|
294
289
|
timeout_ms: Optional[int] = None,
|
|
@@ -324,7 +319,6 @@ class Responses(BaseSDK):
|
|
|
324
319
|
:param provider: When multiple model providers are available, optionally indicate your routing preference.
|
|
325
320
|
:param plugins: Plugins you want to enable for this request, including their settings.
|
|
326
321
|
:param user: A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 128 characters.
|
|
327
|
-
:param session_id: A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 128 characters.
|
|
328
322
|
:param retries: Override the default retry configuration for this method
|
|
329
323
|
:param server_url: Override the default server URL for this method
|
|
330
324
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
@@ -384,7 +378,6 @@ class Responses(BaseSDK):
|
|
|
384
378
|
plugins, Optional[List[components.Plugin]]
|
|
385
379
|
),
|
|
386
380
|
user=user,
|
|
387
|
-
session_id=session_id,
|
|
388
381
|
)
|
|
389
382
|
|
|
390
383
|
req = self._build_request(
|
|
@@ -637,7 +630,6 @@ class Responses(BaseSDK):
|
|
|
637
630
|
Union[List[components.Plugin], List[components.PluginTypedDict]]
|
|
638
631
|
] = None,
|
|
639
632
|
user: Optional[str] = None,
|
|
640
|
-
session_id: Optional[str] = None,
|
|
641
633
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
642
634
|
server_url: Optional[str] = None,
|
|
643
635
|
timeout_ms: Optional[int] = None,
|
|
@@ -673,7 +665,6 @@ class Responses(BaseSDK):
|
|
|
673
665
|
:param provider: When multiple model providers are available, optionally indicate your routing preference.
|
|
674
666
|
:param plugins: Plugins you want to enable for this request, including their settings.
|
|
675
667
|
:param user: A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 128 characters.
|
|
676
|
-
:param session_id: A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 128 characters.
|
|
677
668
|
:param retries: Override the default retry configuration for this method
|
|
678
669
|
:param server_url: Override the default server URL for this method
|
|
679
670
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
@@ -742,7 +733,6 @@ class Responses(BaseSDK):
|
|
|
742
733
|
Union[List[components.Plugin], List[components.PluginTypedDict]]
|
|
743
734
|
] = None,
|
|
744
735
|
user: Optional[str] = None,
|
|
745
|
-
session_id: Optional[str] = None,
|
|
746
736
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
747
737
|
server_url: Optional[str] = None,
|
|
748
738
|
timeout_ms: Optional[int] = None,
|
|
@@ -778,7 +768,6 @@ class Responses(BaseSDK):
|
|
|
778
768
|
:param provider: When multiple model providers are available, optionally indicate your routing preference.
|
|
779
769
|
:param plugins: Plugins you want to enable for this request, including their settings.
|
|
780
770
|
:param user: A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 128 characters.
|
|
781
|
-
:param session_id: A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 128 characters.
|
|
782
771
|
:param retries: Override the default retry configuration for this method
|
|
783
772
|
:param server_url: Override the default server URL for this method
|
|
784
773
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
@@ -846,7 +835,6 @@ class Responses(BaseSDK):
|
|
|
846
835
|
Union[List[components.Plugin], List[components.PluginTypedDict]]
|
|
847
836
|
] = None,
|
|
848
837
|
user: Optional[str] = None,
|
|
849
|
-
session_id: Optional[str] = None,
|
|
850
838
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
851
839
|
server_url: Optional[str] = None,
|
|
852
840
|
timeout_ms: Optional[int] = None,
|
|
@@ -882,7 +870,6 @@ class Responses(BaseSDK):
|
|
|
882
870
|
:param provider: When multiple model providers are available, optionally indicate your routing preference.
|
|
883
871
|
:param plugins: Plugins you want to enable for this request, including their settings.
|
|
884
872
|
:param user: A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 128 characters.
|
|
885
|
-
:param session_id: A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 128 characters.
|
|
886
873
|
:param retries: Override the default retry configuration for this method
|
|
887
874
|
:param server_url: Override the default server URL for this method
|
|
888
875
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
@@ -942,7 +929,6 @@ class Responses(BaseSDK):
|
|
|
942
929
|
plugins, Optional[List[components.Plugin]]
|
|
943
930
|
),
|
|
944
931
|
user=user,
|
|
945
|
-
session_id=session_id,
|
|
946
932
|
)
|
|
947
933
|
|
|
948
934
|
req = self._build_request_async(
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
openrouter/__init__.py,sha256=w2u919V3Tzv4zEPQ-OYJ79gQ_4_SyW7GOFFoHtqXDFA,401
|
|
2
|
-
openrouter/_version.py,sha256=
|
|
2
|
+
openrouter/_version.py,sha256=KVxTickedLucovT9-lJ3-8hy7GH7I_aw6tT7-SJKHhk,462
|
|
3
3
|
openrouter/analytics.py,sha256=0yULK6M4DpIdOrHCgLF5ZmcbI0oPg7oBUp1Qx5gx2vw,9793
|
|
4
|
-
openrouter/api_keys.py,sha256=
|
|
4
|
+
openrouter/api_keys.py,sha256=nNg1mHHoZWuacfOzytuP1776oz-yONzvDtNr4HZVhU0,57520
|
|
5
5
|
openrouter/basesdk.py,sha256=VhwM2eELTCr-7vgi1MLohTxYmNJurxN0hwhQjJKfOsA,12595
|
|
6
6
|
openrouter/beta.py,sha256=MzJTf7x1qwLAR2nd5Y4yzD8bIQCOsREEPf8uhwune_U,668
|
|
7
7
|
openrouter/chat.py,sha256=VRPDeS7yZk-o1iYUShduOcn3-9-h0I8F4_iwGMjhon4,31807
|
|
8
8
|
openrouter/completions.py,sha256=TB7mb7XSfflk7XtMnys0l5sTI-3RY88xKTWYw1MqdHU,14276
|
|
9
9
|
openrouter/credits.py,sha256=h1oyFu4FoShOzFNvwHz1_ZKWJeof5Mf5V0A8OIU8Jps,18916
|
|
10
|
-
openrouter/embeddings.py,sha256=
|
|
10
|
+
openrouter/embeddings.py,sha256=qF9qV2J2yfY1A35b3_PBjo29qWNieszaz4RyxDJHQwI,23428
|
|
11
11
|
openrouter/endpoints.py,sha256=z50tI4vJbF6Sbq9_rKdKWIxmU1MYOfKau2K8GNnxInY,15520
|
|
12
12
|
openrouter/generations.py,sha256=sOwPS56RWFLLVaeher1gLoYhdQLa0BcZ-TBwQsmtEAU,12092
|
|
13
13
|
openrouter/httpclient.py,sha256=dqTPONDBpRn4ktXfcetQiRXnG93f0pJkFhqsYFhLUac,3945
|
|
@@ -16,7 +16,7 @@ openrouter/oauth.py,sha256=zjmDnnJipJVzM6dqCft5Y73KOtL69rlYPXCXHgXCoTo,21476
|
|
|
16
16
|
openrouter/parameters.py,sha256=DNE-FBjsaYBVAyPVBZNSAtbD9qK_LKhC5jkYsjGN-ZY,9648
|
|
17
17
|
openrouter/providers.py,sha256=UDurmmNvy1y78TGJ8KrxOwx0XY6VGw2n1ZZBv0IOI3U,7414
|
|
18
18
|
openrouter/py.typed,sha256=zrp19r0G21lr2yRiMC0f8MFkQFGj9wMpSbboePMg8KM,59
|
|
19
|
-
openrouter/responses.py,sha256=
|
|
19
|
+
openrouter/responses.py,sha256=zFUGta3Kg6ri1102t0ux828733UN3O8kv7NVmADbpa8,50325
|
|
20
20
|
openrouter/sdk.py,sha256=e9a8LB2W9ECr6iCKnuzTLsXteyTaFzuGVjL6_8F44TY,9177
|
|
21
21
|
openrouter/sdkconfiguration.py,sha256=Dy4l6oqgR2cdrWqL7i9nkGmjaWaS7X0m5TeOUDzHc5o,1848
|
|
22
22
|
openrouter/_hooks/__init__.py,sha256=9_7W5jAYw8rcO8Kfc-Ty-lB82BHfksAJJpVFb_UeU1c,146
|
|
@@ -106,7 +106,7 @@ openrouter/components/openresponsesreasoningdoneevent.py,sha256=8uaytNWLnKY0zeGc
|
|
|
106
106
|
openrouter/components/openresponsesreasoningsummarypartaddedevent.py,sha256=XIwRwP2ajJBjFikH5XaHUaWf5arv7XnOeoM-8ADoJns,1053
|
|
107
107
|
openrouter/components/openresponsesreasoningsummarytextdeltaevent.py,sha256=CENzEhU9hur6ZUekCoiysSRVzfoVIHFK9aXAs5lQ760,940
|
|
108
108
|
openrouter/components/openresponsesreasoningsummarytextdoneevent.py,sha256=iRWYHS1Men5in-_McPGfGTJtp-mifontwNw6VoKAmME,940
|
|
109
|
-
openrouter/components/openresponsesrequest.py,sha256=
|
|
109
|
+
openrouter/components/openresponsesrequest.py,sha256=i0U6anDSZ8y09W-UZKDdPL7cNi6b5WO6hdupRbtyBZ8,22709
|
|
110
110
|
openrouter/components/openresponsesresponsetext.py,sha256=EvJncVKeadIuD3qBsjCCc2rpgybVMvsE-U4ZQbWMxX8,2415
|
|
111
111
|
openrouter/components/openresponsesstreamevent.py,sha256=5A6qa56E3PtEN87rixCMiumQhVbfFcZIoYXA5ILkOeQ,20717
|
|
112
112
|
openrouter/components/openresponsestoplogprobs.py,sha256=G6evfWbvhl0K_XapnUwN0lB67Z38NJgr6BV1GUssbXU,566
|
|
@@ -122,7 +122,7 @@ openrouter/components/parameter.py,sha256=ffPZ8lvlReTST8pTkyDyJVvLTOT0VxqVYktbSX
|
|
|
122
122
|
openrouter/components/payloadtoolargeresponseerrordata.py,sha256=kksPhvoVefVY_snEVvP37TEh_TlZd_fCYft0T8RA5Pc,1663
|
|
123
123
|
openrouter/components/paymentrequiredresponseerrordata.py,sha256=rwnrHSbpFug6BjgVPRbgx9eZyxMqwtySBa23PMVk3B8,1663
|
|
124
124
|
openrouter/components/perrequestlimits.py,sha256=_qhdLIdZCGoPP_V874ik7tOIaD4fm0s0F95etZCgpaU,641
|
|
125
|
-
openrouter/components/providername.py,sha256=
|
|
125
|
+
openrouter/components/providername.py,sha256=7YO9ltpV48qdY8SB7VGiUFsLYwNMNH-PGzGipIItsEk,1583
|
|
126
126
|
openrouter/components/provideroverloadedresponseerrordata.py,sha256=mHwExxgAplc5sL0rJS0x6ajSAs2-Hu16lWy-0UX6BN0,1675
|
|
127
127
|
openrouter/components/providersort.py,sha256=wseCudRZlwH_oL9cEbxZAcrpB-NiS-ZM36rz9_cG0rg,438
|
|
128
128
|
openrouter/components/publicendpoint.py,sha256=yXNmXUf5obvhxgFvMqpd9Zs5Vr9Rl7mQiAVVdzXdDlk,5751
|
|
@@ -191,10 +191,10 @@ openrouter/errors/unprocessableentityresponse_error.py,sha256=uepXefHSgB1-5HS3A3
|
|
|
191
191
|
openrouter/models/__init__.py,sha256=wIW9sbvSKlrGyoPY4mXvHqw-_Inpl6zqpN6U6j-w6SU,83
|
|
192
192
|
openrouter/models/internal/__init__.py,sha256=xowceJVTVAP3WRyQ0NEGkm9PAoYU1l0_VYgXZP0ZvlM,1569
|
|
193
193
|
openrouter/models/internal/globals.py,sha256=fI0KPVfEWU8t5H3Wph85DiLo6NSIt69gSnCW9wLY4NI,1363
|
|
194
|
-
openrouter/operations/__init__.py,sha256=
|
|
194
|
+
openrouter/operations/__init__.py,sha256=6X8lquJZ45iXX0UVjwI9fUgsQ63vNpxj_JsRPUwoXqg,18168
|
|
195
195
|
openrouter/operations/createauthkeyscode.py,sha256=WM9oLRrH7U64XfYEpXDUDvf7w4N6qm6BUZhEXdHPKLg,4034
|
|
196
196
|
openrouter/operations/createcoinbasecharge.py,sha256=yOkAvPj_e6rAqM6ThuZKHs7QId5m9S2vH701oNOeYAU,2241
|
|
197
|
-
openrouter/operations/createembeddings.py,sha256=
|
|
197
|
+
openrouter/operations/createembeddings.py,sha256=fWFbsoL-5We3AibZlyJ-y4tZXDUP7uX9L60m43J6s4c,13471
|
|
198
198
|
openrouter/operations/createkeys.py,sha256=P6UbY4onogiWdMCMfcnNPHvJLRSIuB-KetdHznD2PAM,8322
|
|
199
199
|
openrouter/operations/createresponses.py,sha256=Vu1lRymqLWq4PvxkJPJIwHqFRdyyy47bI3SMuU4v2j0,1942
|
|
200
200
|
openrouter/operations/deletekeys.py,sha256=_XTN4M6sU22DBdhZVj-4qaCo5k-CWEq1e_Xsp5fqqIU,1149
|
|
@@ -204,7 +204,7 @@ openrouter/operations/getcurrentkey.py,sha256=NJd5s5QfvZCHjSiUPlS7rZNFm7sBQz1pyT
|
|
|
204
204
|
openrouter/operations/getgeneration.py,sha256=vp1Mp7Bb4TezPuciT8uPS4n42c_3tgaMe9d9HFAxShw,8270
|
|
205
205
|
openrouter/operations/getkey.py,sha256=upv7udNsaAILJpqq-L4Mvn971xCts_4nQqzP3zJB9mU,5473
|
|
206
206
|
openrouter/operations/getmodels.py,sha256=AUooAWNQiSGWrmKhEvelwjX4AdbUgBpFb2qABjAsCTQ,748
|
|
207
|
-
openrouter/operations/getparameters.py,sha256=
|
|
207
|
+
openrouter/operations/getparameters.py,sha256=wC7vcGmqqjj-eeBvO34UXKa2DHM6mIGwmQOSE3vX9IE,4364
|
|
208
208
|
openrouter/operations/getuseractivity.py,sha256=oeqU_jqy8t2xtBjnQ9opfDY-FtJlK5essI9oJvfYTjs,1252
|
|
209
209
|
openrouter/operations/list.py,sha256=meW1unMF371YvOdNFdIjh3Ya2ADY-7xo2WQcFaKAwHk,5766
|
|
210
210
|
openrouter/operations/listendpoints.py,sha256=keS39WecfOoZvYVZdPEN7Fuxb5LFWhgpbhNXaVReGSQ,1117
|
|
@@ -212,7 +212,7 @@ openrouter/operations/listendpointszdr.py,sha256=2CdXrknZg79FTHvFOMA165epUYulrg0
|
|
|
212
212
|
openrouter/operations/listmodelsuser.py,sha256=m_jM93D_m-MnUB6S0WUDHX1bQMP-UJimYOxAcM0Kqjw,643
|
|
213
213
|
openrouter/operations/listproviders.py,sha256=072auQF9sz-yb0UmZAo8sRacibp0IldU0pndumAyK1g,2530
|
|
214
214
|
openrouter/operations/sendchatcompletionrequest.py,sha256=AtBi9ZPxgU9kb0sKpt-5gCXrkgY2Qsmj_D2GNLRzOXg,1364
|
|
215
|
-
openrouter/operations/updatekeys.py,sha256=
|
|
215
|
+
openrouter/operations/updatekeys.py,sha256=8dYLGR6-1WFIFKo_YvgIGIoDoT_yTsDQFm08-PEyuz8,8602
|
|
216
216
|
openrouter/types/__init__.py,sha256=RArOwSgeeTIva6h-4ttjXwMUeCkz10nAFBL9D-QljI4,377
|
|
217
217
|
openrouter/types/basemodel.py,sha256=L79WXvTECbSqaJzs8D3ud_KdIWkU7Cx2wbohDAktE9E,1127
|
|
218
218
|
openrouter/utils/__init__.py,sha256=CAG0O76aEToGKXpT6Ft87Vd-iiQTh4XdBrQ37BVbsiM,5861
|
|
@@ -234,8 +234,8 @@ openrouter/utils/serializers.py,sha256=Hndks5M_rJXVub_N5lu0gKZQUoEmWrn6PN7R-0Hwv
|
|
|
234
234
|
openrouter/utils/unmarshal_json_response.py,sha256=glq_wLEH2vSvfMedJOY2dbd5T_z_I4yDxwbBJDI8OjU,875
|
|
235
235
|
openrouter/utils/url.py,sha256=BgGPgcTA6MRK4bF8fjP2dUopN3NzEzxWMXPBVg8NQUA,5254
|
|
236
236
|
openrouter/utils/values.py,sha256=CcaCXEa3xHhkUDROyXZocN8f0bdITftv9Y0P9lTf0YM,3517
|
|
237
|
-
openrouter-0.
|
|
238
|
-
openrouter-0.
|
|
239
|
-
openrouter-0.
|
|
240
|
-
openrouter-0.
|
|
241
|
-
openrouter-0.
|
|
237
|
+
openrouter-0.1.1.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
238
|
+
openrouter-0.1.1.dist-info/METADATA,sha256=GjxduvBgab2sFGvG2cwPmmznJ2eM-lxtNzneZKCZSqc,7461
|
|
239
|
+
openrouter-0.1.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
240
|
+
openrouter-0.1.1.dist-info/top_level.txt,sha256=0jnlCcRirGeYZLm5ZbWQRUonIp4tTPl_9mq-ds_1SEo,11
|
|
241
|
+
openrouter-0.1.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|