openrouter 0.0.18__py3-none-any.whl → 0.0.19__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 +3 -3
- openrouter/analytics.py +0 -2
- openrouter/api_keys.py +4 -24
- openrouter/basesdk.py +0 -6
- openrouter/chat.py +14 -212
- openrouter/completions.py +0 -2
- openrouter/components/__init__.py +105 -447
- openrouter/components/chatgenerationparams.py +17 -559
- openrouter/components/chatgenerationtokenusage.py +0 -3
- openrouter/components/chatmessagecontentitem.py +1 -1
- openrouter/components/chatmessagecontentitemaudio.py +25 -6
- openrouter/components/chatmessagecontentitemtext.py +2 -9
- openrouter/components/chatmessagecontentitemvideo.py +5 -9
- openrouter/components/chatmessagetokenlogprob.py +4 -4
- openrouter/components/chatresponsechoice.py +67 -6
- openrouter/components/chatstreamingmessagechunk.py +1 -12
- openrouter/components/chatstreamingresponsechunk.py +1 -1
- openrouter/components/completionchoice.py +5 -18
- openrouter/components/completioncreateparams.py +10 -10
- openrouter/components/completionresponse.py +0 -3
- openrouter/components/message.py +9 -10
- openrouter/components/openairesponsesannotation.py +4 -11
- openrouter/components/openairesponsesreasoningeffort.py +0 -1
- openrouter/components/openresponseseasyinputmessage.py +20 -93
- openrouter/components/openresponsesinput.py +2 -2
- openrouter/components/openresponsesinputmessageitem.py +14 -87
- openrouter/components/openresponsesnonstreamingresponse.py +19 -33
- openrouter/components/openresponsesreasoning.py +0 -1
- openrouter/components/openresponsesrequest.py +119 -246
- openrouter/components/openresponsesstreamevent.py +39 -110
- openrouter/components/outputmessage.py +4 -10
- openrouter/components/parameter.py +0 -1
- openrouter/components/providername.py +2 -10
- openrouter/components/providersort.py +1 -0
- openrouter/components/publicendpoint.py +49 -60
- openrouter/components/publicpricing.py +49 -49
- openrouter/components/responseformattextconfig.py +7 -9
- openrouter/components/responseoutputtext.py +1 -36
- openrouter/components/responsesoutputitem.py +11 -13
- openrouter/components/responsesoutputitemreasoning.py +3 -43
- openrouter/components/responsesoutputmessage.py +5 -10
- openrouter/credits.py +0 -4
- openrouter/embeddings.py +8 -10
- openrouter/endpoints.py +0 -4
- openrouter/generations.py +0 -2
- openrouter/models_.py +0 -6
- openrouter/oauth.py +0 -4
- openrouter/operations/__init__.py +34 -10
- openrouter/operations/createembeddings.py +247 -16
- openrouter/operations/getcredits.py +0 -19
- openrouter/operations/getgeneration.py +0 -6
- openrouter/operations/getparameters.py +71 -5
- openrouter/operations/updatekeys.py +2 -2
- openrouter/parameters.py +2 -4
- openrouter/providers.py +0 -2
- openrouter/responses.py +36 -188
- openrouter/sdk.py +0 -13
- openrouter/sdkconfiguration.py +0 -2
- openrouter/utils/forms.py +10 -21
- openrouter/utils/queryparams.py +2 -14
- openrouter/utils/retries.py +5 -69
- {openrouter-0.0.18.dist-info → openrouter-0.0.19.dist-info}/METADATA +1 -1
- {openrouter-0.0.18.dist-info → openrouter-0.0.19.dist-info}/RECORD +66 -87
- openrouter/components/_schema0.py +0 -94
- openrouter/components/_schema3.py +0 -229
- openrouter/components/chatcompletionfinishreason.py +0 -17
- openrouter/components/chatmessagecontentitemcachecontrol.py +0 -32
- openrouter/components/chatstreamingchoice.py +0 -72
- openrouter/components/pdfparserengine.py +0 -16
- openrouter/components/pdfparseroptions.py +0 -25
- openrouter/components/percentilelatencycutoffs.py +0 -71
- openrouter/components/percentilestats.py +0 -34
- openrouter/components/percentilethroughputcutoffs.py +0 -71
- openrouter/components/preferredmaxlatency.py +0 -21
- openrouter/components/preferredminthroughput.py +0 -22
- openrouter/components/providerpreferences.py +0 -355
- openrouter/components/providersortconfig.py +0 -71
- openrouter/components/providersortunion.py +0 -23
- openrouter/components/responseinputvideo.py +0 -26
- openrouter/components/responsesoutputmodality.py +0 -14
- openrouter/components/websearchengine.py +0 -15
- openrouter/models/__init__.py +0 -3
- openrouter/models/internal/__init__.py +0 -54
- openrouter/models/internal/globals.py +0 -41
- {openrouter-0.0.18.dist-info → openrouter-0.0.19.dist-info}/WHEEL +0 -0
- {openrouter-0.0.18.dist-info → openrouter-0.0.19.dist-info}/licenses/LICENSE +0 -0
- {openrouter-0.0.18.dist-info → openrouter-0.0.19.dist-info}/top_level.txt +0 -0
|
@@ -25,10 +25,8 @@ from .responseswebsearchcalloutput import (
|
|
|
25
25
|
ResponsesWebSearchCallOutput,
|
|
26
26
|
ResponsesWebSearchCallOutputTypedDict,
|
|
27
27
|
)
|
|
28
|
-
from openrouter.utils import get_discriminator
|
|
29
|
-
from pydantic import Discriminator, Tag
|
|
30
28
|
from typing import Union
|
|
31
|
-
from typing_extensions import
|
|
29
|
+
from typing_extensions import TypeAliasType
|
|
32
30
|
|
|
33
31
|
|
|
34
32
|
ResponsesOutputItemTypedDict = TypeAliasType(
|
|
@@ -38,22 +36,22 @@ ResponsesOutputItemTypedDict = TypeAliasType(
|
|
|
38
36
|
ResponsesOutputItemFileSearchCallTypedDict,
|
|
39
37
|
ResponsesImageGenerationCallTypedDict,
|
|
40
38
|
ResponsesOutputMessageTypedDict,
|
|
41
|
-
ResponsesOutputItemFunctionCallTypedDict,
|
|
42
39
|
ResponsesOutputItemReasoningTypedDict,
|
|
40
|
+
ResponsesOutputItemFunctionCallTypedDict,
|
|
43
41
|
],
|
|
44
42
|
)
|
|
45
43
|
r"""An output item from the response"""
|
|
46
44
|
|
|
47
45
|
|
|
48
|
-
ResponsesOutputItem =
|
|
46
|
+
ResponsesOutputItem = TypeAliasType(
|
|
47
|
+
"ResponsesOutputItem",
|
|
49
48
|
Union[
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
49
|
+
ResponsesWebSearchCallOutput,
|
|
50
|
+
ResponsesOutputItemFileSearchCall,
|
|
51
|
+
ResponsesImageGenerationCall,
|
|
52
|
+
ResponsesOutputMessage,
|
|
53
|
+
ResponsesOutputItemReasoning,
|
|
54
|
+
ResponsesOutputItemFunctionCall,
|
|
56
55
|
],
|
|
57
|
-
|
|
58
|
-
]
|
|
56
|
+
)
|
|
59
57
|
r"""An output item from the response"""
|
|
@@ -9,14 +9,10 @@ from openrouter.types import (
|
|
|
9
9
|
OptionalNullable,
|
|
10
10
|
UNSET,
|
|
11
11
|
UNSET_SENTINEL,
|
|
12
|
-
UnrecognizedStr,
|
|
13
12
|
)
|
|
14
|
-
from openrouter.utils import validate_open_enum
|
|
15
|
-
import pydantic
|
|
16
13
|
from pydantic import model_serializer
|
|
17
|
-
from pydantic.functional_validators import PlainValidator
|
|
18
14
|
from typing import List, Literal, Optional, Union
|
|
19
|
-
from typing_extensions import
|
|
15
|
+
from typing_extensions import NotRequired, TypeAliasType, TypedDict
|
|
20
16
|
|
|
21
17
|
|
|
22
18
|
ResponsesOutputItemReasoningType = Literal["reasoning",]
|
|
@@ -51,20 +47,6 @@ ResponsesOutputItemReasoningStatusUnion = TypeAliasType(
|
|
|
51
47
|
)
|
|
52
48
|
|
|
53
49
|
|
|
54
|
-
ResponsesOutputItemReasoningFormat = Union[
|
|
55
|
-
Literal[
|
|
56
|
-
"unknown",
|
|
57
|
-
"openai-responses-v1",
|
|
58
|
-
"azure-openai-responses-v1",
|
|
59
|
-
"xai-responses-v1",
|
|
60
|
-
"anthropic-claude-v1",
|
|
61
|
-
"google-gemini-v1",
|
|
62
|
-
],
|
|
63
|
-
UnrecognizedStr,
|
|
64
|
-
]
|
|
65
|
-
r"""The format of the reasoning content"""
|
|
66
|
-
|
|
67
|
-
|
|
68
50
|
class ResponsesOutputItemReasoningTypedDict(TypedDict):
|
|
69
51
|
r"""An output item containing reasoning"""
|
|
70
52
|
|
|
@@ -74,10 +56,6 @@ class ResponsesOutputItemReasoningTypedDict(TypedDict):
|
|
|
74
56
|
content: NotRequired[List[ReasoningTextContentTypedDict]]
|
|
75
57
|
encrypted_content: NotRequired[Nullable[str]]
|
|
76
58
|
status: NotRequired[ResponsesOutputItemReasoningStatusUnionTypedDict]
|
|
77
|
-
signature: NotRequired[Nullable[str]]
|
|
78
|
-
r"""A signature for the reasoning content, used for verification"""
|
|
79
|
-
format_: NotRequired[Nullable[ResponsesOutputItemReasoningFormat]]
|
|
80
|
-
r"""The format of the reasoning content"""
|
|
81
59
|
|
|
82
60
|
|
|
83
61
|
class ResponsesOutputItemReasoning(BaseModel):
|
|
@@ -95,28 +73,10 @@ class ResponsesOutputItemReasoning(BaseModel):
|
|
|
95
73
|
|
|
96
74
|
status: Optional[ResponsesOutputItemReasoningStatusUnion] = None
|
|
97
75
|
|
|
98
|
-
signature: OptionalNullable[str] = UNSET
|
|
99
|
-
r"""A signature for the reasoning content, used for verification"""
|
|
100
|
-
|
|
101
|
-
format_: Annotated[
|
|
102
|
-
Annotated[
|
|
103
|
-
OptionalNullable[ResponsesOutputItemReasoningFormat],
|
|
104
|
-
PlainValidator(validate_open_enum(False)),
|
|
105
|
-
],
|
|
106
|
-
pydantic.Field(alias="format"),
|
|
107
|
-
] = UNSET
|
|
108
|
-
r"""The format of the reasoning content"""
|
|
109
|
-
|
|
110
76
|
@model_serializer(mode="wrap")
|
|
111
77
|
def serialize_model(self, handler):
|
|
112
|
-
optional_fields = [
|
|
113
|
-
|
|
114
|
-
"encrypted_content",
|
|
115
|
-
"status",
|
|
116
|
-
"signature",
|
|
117
|
-
"format",
|
|
118
|
-
]
|
|
119
|
-
nullable_fields = ["encrypted_content", "signature", "format"]
|
|
78
|
+
optional_fields = ["content", "encrypted_content", "status"]
|
|
79
|
+
nullable_fields = ["encrypted_content"]
|
|
120
80
|
null_default_fields = []
|
|
121
81
|
|
|
122
82
|
serialized = handler(self)
|
|
@@ -7,10 +7,8 @@ from .openairesponsesrefusalcontent import (
|
|
|
7
7
|
)
|
|
8
8
|
from .responseoutputtext import ResponseOutputText, ResponseOutputTextTypedDict
|
|
9
9
|
from openrouter.types import BaseModel
|
|
10
|
-
from openrouter.utils import get_discriminator
|
|
11
|
-
from pydantic import Discriminator, Tag
|
|
12
10
|
from typing import List, Literal, Optional, Union
|
|
13
|
-
from typing_extensions import
|
|
11
|
+
from typing_extensions import NotRequired, TypeAliasType, TypedDict
|
|
14
12
|
|
|
15
13
|
|
|
16
14
|
ResponsesOutputMessageRole = Literal["assistant",]
|
|
@@ -54,13 +52,10 @@ ResponsesOutputMessageContentTypedDict = TypeAliasType(
|
|
|
54
52
|
)
|
|
55
53
|
|
|
56
54
|
|
|
57
|
-
ResponsesOutputMessageContent =
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
],
|
|
62
|
-
Discriminator(lambda m: get_discriminator(m, "type", "type")),
|
|
63
|
-
]
|
|
55
|
+
ResponsesOutputMessageContent = TypeAliasType(
|
|
56
|
+
"ResponsesOutputMessageContent",
|
|
57
|
+
Union[OpenAIResponsesRefusalContent, ResponseOutputText],
|
|
58
|
+
)
|
|
64
59
|
|
|
65
60
|
|
|
66
61
|
class ResponsesOutputMessageTypedDict(TypedDict):
|
openrouter/credits.py
CHANGED
|
@@ -51,7 +51,6 @@ class Credits(BaseSDK):
|
|
|
51
51
|
accept_header_value="application/json",
|
|
52
52
|
http_headers=http_headers,
|
|
53
53
|
security=self.sdk_configuration.security,
|
|
54
|
-
allow_empty_value=None,
|
|
55
54
|
timeout_ms=timeout_ms,
|
|
56
55
|
)
|
|
57
56
|
|
|
@@ -148,7 +147,6 @@ class Credits(BaseSDK):
|
|
|
148
147
|
accept_header_value="application/json",
|
|
149
148
|
http_headers=http_headers,
|
|
150
149
|
security=self.sdk_configuration.security,
|
|
151
|
-
allow_empty_value=None,
|
|
152
150
|
timeout_ms=timeout_ms,
|
|
153
151
|
)
|
|
154
152
|
|
|
@@ -268,7 +266,6 @@ class Credits(BaseSDK):
|
|
|
268
266
|
get_serialized_body=lambda: utils.serialize_request_body(
|
|
269
267
|
request, False, False, "json", components.CreateChargeRequest
|
|
270
268
|
),
|
|
271
|
-
allow_empty_value=None,
|
|
272
269
|
timeout_ms=timeout_ms,
|
|
273
270
|
)
|
|
274
271
|
|
|
@@ -393,7 +390,6 @@ class Credits(BaseSDK):
|
|
|
393
390
|
get_serialized_body=lambda: utils.serialize_request_body(
|
|
394
391
|
request, False, False, "json", components.CreateChargeRequest
|
|
395
392
|
),
|
|
396
|
-
allow_empty_value=None,
|
|
397
393
|
timeout_ms=timeout_ms,
|
|
398
394
|
)
|
|
399
395
|
|
openrouter/embeddings.py
CHANGED
|
@@ -28,7 +28,8 @@ class Embeddings(BaseSDK):
|
|
|
28
28
|
user: Optional[str] = None,
|
|
29
29
|
provider: Optional[
|
|
30
30
|
Union[
|
|
31
|
-
|
|
31
|
+
operations.CreateEmbeddingsProvider,
|
|
32
|
+
operations.CreateEmbeddingsProviderTypedDict,
|
|
32
33
|
]
|
|
33
34
|
] = None,
|
|
34
35
|
input_type: Optional[str] = None,
|
|
@@ -47,7 +48,7 @@ class Embeddings(BaseSDK):
|
|
|
47
48
|
:param encoding_format:
|
|
48
49
|
:param dimensions:
|
|
49
50
|
:param user:
|
|
50
|
-
:param provider:
|
|
51
|
+
:param provider:
|
|
51
52
|
:param input_type:
|
|
52
53
|
:param retries: Override the default retry configuration for this method
|
|
53
54
|
:param server_url: Override the default server URL for this method
|
|
@@ -72,7 +73,7 @@ class Embeddings(BaseSDK):
|
|
|
72
73
|
dimensions=dimensions,
|
|
73
74
|
user=user,
|
|
74
75
|
provider=utils.get_pydantic_model(
|
|
75
|
-
provider, Optional[
|
|
76
|
+
provider, Optional[operations.CreateEmbeddingsProvider]
|
|
76
77
|
),
|
|
77
78
|
input_type=input_type,
|
|
78
79
|
)
|
|
@@ -95,7 +96,6 @@ class Embeddings(BaseSDK):
|
|
|
95
96
|
get_serialized_body=lambda: utils.serialize_request_body(
|
|
96
97
|
request, False, False, "json", operations.CreateEmbeddingsRequest
|
|
97
98
|
),
|
|
98
|
-
allow_empty_value=None,
|
|
99
99
|
timeout_ms=timeout_ms,
|
|
100
100
|
)
|
|
101
101
|
|
|
@@ -215,7 +215,8 @@ class Embeddings(BaseSDK):
|
|
|
215
215
|
user: Optional[str] = None,
|
|
216
216
|
provider: Optional[
|
|
217
217
|
Union[
|
|
218
|
-
|
|
218
|
+
operations.CreateEmbeddingsProvider,
|
|
219
|
+
operations.CreateEmbeddingsProviderTypedDict,
|
|
219
220
|
]
|
|
220
221
|
] = None,
|
|
221
222
|
input_type: Optional[str] = None,
|
|
@@ -234,7 +235,7 @@ class Embeddings(BaseSDK):
|
|
|
234
235
|
:param encoding_format:
|
|
235
236
|
:param dimensions:
|
|
236
237
|
:param user:
|
|
237
|
-
:param provider:
|
|
238
|
+
:param provider:
|
|
238
239
|
:param input_type:
|
|
239
240
|
:param retries: Override the default retry configuration for this method
|
|
240
241
|
:param server_url: Override the default server URL for this method
|
|
@@ -259,7 +260,7 @@ class Embeddings(BaseSDK):
|
|
|
259
260
|
dimensions=dimensions,
|
|
260
261
|
user=user,
|
|
261
262
|
provider=utils.get_pydantic_model(
|
|
262
|
-
provider, Optional[
|
|
263
|
+
provider, Optional[operations.CreateEmbeddingsProvider]
|
|
263
264
|
),
|
|
264
265
|
input_type=input_type,
|
|
265
266
|
)
|
|
@@ -282,7 +283,6 @@ class Embeddings(BaseSDK):
|
|
|
282
283
|
get_serialized_body=lambda: utils.serialize_request_body(
|
|
283
284
|
request, False, False, "json", operations.CreateEmbeddingsRequest
|
|
284
285
|
),
|
|
285
|
-
allow_empty_value=None,
|
|
286
286
|
timeout_ms=timeout_ms,
|
|
287
287
|
)
|
|
288
288
|
|
|
@@ -431,7 +431,6 @@ class Embeddings(BaseSDK):
|
|
|
431
431
|
accept_header_value="application/json",
|
|
432
432
|
http_headers=http_headers,
|
|
433
433
|
security=self.sdk_configuration.security,
|
|
434
|
-
allow_empty_value=None,
|
|
435
434
|
timeout_ms=timeout_ms,
|
|
436
435
|
)
|
|
437
436
|
|
|
@@ -523,7 +522,6 @@ class Embeddings(BaseSDK):
|
|
|
523
522
|
accept_header_value="application/json",
|
|
524
523
|
http_headers=http_headers,
|
|
525
524
|
security=self.sdk_configuration.security,
|
|
526
|
-
allow_empty_value=None,
|
|
527
525
|
timeout_ms=timeout_ms,
|
|
528
526
|
)
|
|
529
527
|
|
openrouter/endpoints.py
CHANGED
|
@@ -59,7 +59,6 @@ class Endpoints(BaseSDK):
|
|
|
59
59
|
accept_header_value="application/json",
|
|
60
60
|
http_headers=http_headers,
|
|
61
61
|
security=self.sdk_configuration.security,
|
|
62
|
-
allow_empty_value=None,
|
|
63
62
|
timeout_ms=timeout_ms,
|
|
64
63
|
)
|
|
65
64
|
|
|
@@ -159,7 +158,6 @@ class Endpoints(BaseSDK):
|
|
|
159
158
|
accept_header_value="application/json",
|
|
160
159
|
http_headers=http_headers,
|
|
161
160
|
security=self.sdk_configuration.security,
|
|
162
|
-
allow_empty_value=None,
|
|
163
161
|
timeout_ms=timeout_ms,
|
|
164
162
|
)
|
|
165
163
|
|
|
@@ -249,7 +247,6 @@ class Endpoints(BaseSDK):
|
|
|
249
247
|
accept_header_value="application/json",
|
|
250
248
|
http_headers=http_headers,
|
|
251
249
|
security=self.sdk_configuration.security,
|
|
252
|
-
allow_empty_value=None,
|
|
253
250
|
timeout_ms=timeout_ms,
|
|
254
251
|
)
|
|
255
252
|
|
|
@@ -336,7 +333,6 @@ class Endpoints(BaseSDK):
|
|
|
336
333
|
accept_header_value="application/json",
|
|
337
334
|
http_headers=http_headers,
|
|
338
335
|
security=self.sdk_configuration.security,
|
|
339
|
-
allow_empty_value=None,
|
|
340
336
|
timeout_ms=timeout_ms,
|
|
341
337
|
)
|
|
342
338
|
|
openrouter/generations.py
CHANGED
|
@@ -56,7 +56,6 @@ class Generations(BaseSDK):
|
|
|
56
56
|
accept_header_value="application/json",
|
|
57
57
|
http_headers=http_headers,
|
|
58
58
|
security=self.sdk_configuration.security,
|
|
59
|
-
allow_empty_value=None,
|
|
60
59
|
timeout_ms=timeout_ms,
|
|
61
60
|
)
|
|
62
61
|
|
|
@@ -194,7 +193,6 @@ class Generations(BaseSDK):
|
|
|
194
193
|
accept_header_value="application/json",
|
|
195
194
|
http_headers=http_headers,
|
|
196
195
|
security=self.sdk_configuration.security,
|
|
197
|
-
allow_empty_value=None,
|
|
198
196
|
timeout_ms=timeout_ms,
|
|
199
197
|
)
|
|
200
198
|
|
openrouter/models_.py
CHANGED
|
@@ -49,7 +49,6 @@ class Models(BaseSDK):
|
|
|
49
49
|
accept_header_value="application/json",
|
|
50
50
|
http_headers=http_headers,
|
|
51
51
|
security=self.sdk_configuration.security,
|
|
52
|
-
allow_empty_value=None,
|
|
53
52
|
timeout_ms=timeout_ms,
|
|
54
53
|
)
|
|
55
54
|
|
|
@@ -134,7 +133,6 @@ class Models(BaseSDK):
|
|
|
134
133
|
accept_header_value="application/json",
|
|
135
134
|
http_headers=http_headers,
|
|
136
135
|
security=self.sdk_configuration.security,
|
|
137
|
-
allow_empty_value=None,
|
|
138
136
|
timeout_ms=timeout_ms,
|
|
139
137
|
)
|
|
140
138
|
|
|
@@ -229,7 +227,6 @@ class Models(BaseSDK):
|
|
|
229
227
|
accept_header_value="application/json",
|
|
230
228
|
http_headers=http_headers,
|
|
231
229
|
security=self.sdk_configuration.security,
|
|
232
|
-
allow_empty_value=None,
|
|
233
230
|
timeout_ms=timeout_ms,
|
|
234
231
|
)
|
|
235
232
|
|
|
@@ -329,7 +326,6 @@ class Models(BaseSDK):
|
|
|
329
326
|
accept_header_value="application/json",
|
|
330
327
|
http_headers=http_headers,
|
|
331
328
|
security=self.sdk_configuration.security,
|
|
332
|
-
allow_empty_value=None,
|
|
333
329
|
timeout_ms=timeout_ms,
|
|
334
330
|
)
|
|
335
331
|
|
|
@@ -426,7 +422,6 @@ class Models(BaseSDK):
|
|
|
426
422
|
security=utils.get_pydantic_model(
|
|
427
423
|
security, operations.ListModelsUserSecurity
|
|
428
424
|
),
|
|
429
|
-
allow_empty_value=None,
|
|
430
425
|
timeout_ms=timeout_ms,
|
|
431
426
|
)
|
|
432
427
|
|
|
@@ -521,7 +516,6 @@ class Models(BaseSDK):
|
|
|
521
516
|
security=utils.get_pydantic_model(
|
|
522
517
|
security, operations.ListModelsUserSecurity
|
|
523
518
|
),
|
|
524
|
-
allow_empty_value=None,
|
|
525
519
|
timeout_ms=timeout_ms,
|
|
526
520
|
)
|
|
527
521
|
|
openrouter/oauth.py
CHANGED
|
@@ -74,7 +74,6 @@ class OAuth(BaseSDK):
|
|
|
74
74
|
"json",
|
|
75
75
|
operations.ExchangeAuthCodeForAPIKeyRequest,
|
|
76
76
|
),
|
|
77
|
-
allow_empty_value=None,
|
|
78
77
|
timeout_ms=timeout_ms,
|
|
79
78
|
)
|
|
80
79
|
|
|
@@ -195,7 +194,6 @@ class OAuth(BaseSDK):
|
|
|
195
194
|
"json",
|
|
196
195
|
operations.ExchangeAuthCodeForAPIKeyRequest,
|
|
197
196
|
),
|
|
198
|
-
allow_empty_value=None,
|
|
199
197
|
timeout_ms=timeout_ms,
|
|
200
198
|
)
|
|
201
199
|
|
|
@@ -318,7 +316,6 @@ class OAuth(BaseSDK):
|
|
|
318
316
|
get_serialized_body=lambda: utils.serialize_request_body(
|
|
319
317
|
request, False, False, "json", operations.CreateAuthKeysCodeRequest
|
|
320
318
|
),
|
|
321
|
-
allow_empty_value=None,
|
|
322
319
|
timeout_ms=timeout_ms,
|
|
323
320
|
)
|
|
324
321
|
|
|
@@ -441,7 +438,6 @@ class OAuth(BaseSDK):
|
|
|
441
438
|
get_serialized_body=lambda: utils.serialize_request_body(
|
|
442
439
|
request, False, False, "json", operations.CreateAuthKeysCodeRequest
|
|
443
440
|
),
|
|
444
|
-
allow_empty_value=None,
|
|
445
441
|
timeout_ms=timeout_ms,
|
|
446
442
|
)
|
|
447
443
|
|
|
@@ -40,6 +40,8 @@ if TYPE_CHECKING:
|
|
|
40
40
|
ContentTypedDict,
|
|
41
41
|
CreateEmbeddingsData,
|
|
42
42
|
CreateEmbeddingsDataTypedDict,
|
|
43
|
+
CreateEmbeddingsProvider,
|
|
44
|
+
CreateEmbeddingsProviderTypedDict,
|
|
43
45
|
CreateEmbeddingsRequest,
|
|
44
46
|
CreateEmbeddingsRequestTypedDict,
|
|
45
47
|
CreateEmbeddingsResponse,
|
|
@@ -49,14 +51,22 @@ if TYPE_CHECKING:
|
|
|
49
51
|
Embedding,
|
|
50
52
|
EmbeddingTypedDict,
|
|
51
53
|
EncodingFormat,
|
|
54
|
+
Ignore,
|
|
55
|
+
IgnoreTypedDict,
|
|
52
56
|
ImageURL,
|
|
53
57
|
ImageURLTypedDict,
|
|
54
58
|
Input,
|
|
55
59
|
InputTypedDict,
|
|
56
60
|
InputUnion,
|
|
57
61
|
InputUnionTypedDict,
|
|
62
|
+
MaxPrice,
|
|
63
|
+
MaxPriceTypedDict,
|
|
58
64
|
Object,
|
|
59
65
|
ObjectEmbedding,
|
|
66
|
+
Only,
|
|
67
|
+
OnlyTypedDict,
|
|
68
|
+
Order,
|
|
69
|
+
OrderTypedDict,
|
|
60
70
|
TypeImageURL,
|
|
61
71
|
TypeText,
|
|
62
72
|
Usage,
|
|
@@ -90,12 +100,7 @@ if TYPE_CHECKING:
|
|
|
90
100
|
ExchangeAuthCodeForAPIKeyResponse,
|
|
91
101
|
ExchangeAuthCodeForAPIKeyResponseTypedDict,
|
|
92
102
|
)
|
|
93
|
-
from .getcredits import
|
|
94
|
-
GetCreditsData,
|
|
95
|
-
GetCreditsDataTypedDict,
|
|
96
|
-
GetCreditsResponse,
|
|
97
|
-
GetCreditsResponseTypedDict,
|
|
98
|
-
)
|
|
103
|
+
from .getcredits import GetCreditsResponse, GetCreditsResponseTypedDict
|
|
99
104
|
from .getcurrentkey import (
|
|
100
105
|
GetCurrentKeyData,
|
|
101
106
|
GetCurrentKeyDataTypedDict,
|
|
@@ -125,6 +130,7 @@ if TYPE_CHECKING:
|
|
|
125
130
|
from .getparameters import (
|
|
126
131
|
GetParametersData,
|
|
127
132
|
GetParametersDataTypedDict,
|
|
133
|
+
GetParametersProvider,
|
|
128
134
|
GetParametersRequest,
|
|
129
135
|
GetParametersRequestTypedDict,
|
|
130
136
|
GetParametersResponse,
|
|
@@ -205,6 +211,8 @@ __all__ = [
|
|
|
205
211
|
"CreateCoinbaseChargeSecurityTypedDict",
|
|
206
212
|
"CreateEmbeddingsData",
|
|
207
213
|
"CreateEmbeddingsDataTypedDict",
|
|
214
|
+
"CreateEmbeddingsProvider",
|
|
215
|
+
"CreateEmbeddingsProviderTypedDict",
|
|
208
216
|
"CreateEmbeddingsRequest",
|
|
209
217
|
"CreateEmbeddingsRequestTypedDict",
|
|
210
218
|
"CreateEmbeddingsResponse",
|
|
@@ -234,8 +242,6 @@ __all__ = [
|
|
|
234
242
|
"ExchangeAuthCodeForAPIKeyRequestTypedDict",
|
|
235
243
|
"ExchangeAuthCodeForAPIKeyResponse",
|
|
236
244
|
"ExchangeAuthCodeForAPIKeyResponseTypedDict",
|
|
237
|
-
"GetCreditsData",
|
|
238
|
-
"GetCreditsDataTypedDict",
|
|
239
245
|
"GetCreditsResponse",
|
|
240
246
|
"GetCreditsResponseTypedDict",
|
|
241
247
|
"GetCurrentKeyData",
|
|
@@ -258,6 +264,7 @@ __all__ = [
|
|
|
258
264
|
"GetModelsRequestTypedDict",
|
|
259
265
|
"GetParametersData",
|
|
260
266
|
"GetParametersDataTypedDict",
|
|
267
|
+
"GetParametersProvider",
|
|
261
268
|
"GetParametersRequest",
|
|
262
269
|
"GetParametersRequestTypedDict",
|
|
263
270
|
"GetParametersResponse",
|
|
@@ -268,6 +275,8 @@ __all__ = [
|
|
|
268
275
|
"GetUserActivityRequestTypedDict",
|
|
269
276
|
"GetUserActivityResponse",
|
|
270
277
|
"GetUserActivityResponseTypedDict",
|
|
278
|
+
"Ignore",
|
|
279
|
+
"IgnoreTypedDict",
|
|
271
280
|
"ImageURL",
|
|
272
281
|
"ImageURLTypedDict",
|
|
273
282
|
"Input",
|
|
@@ -292,10 +301,16 @@ __all__ = [
|
|
|
292
301
|
"ListRequestTypedDict",
|
|
293
302
|
"ListResponse",
|
|
294
303
|
"ListResponseTypedDict",
|
|
304
|
+
"MaxPrice",
|
|
305
|
+
"MaxPriceTypedDict",
|
|
295
306
|
"Metadata",
|
|
296
307
|
"MetadataTypedDict",
|
|
297
308
|
"Object",
|
|
298
309
|
"ObjectEmbedding",
|
|
310
|
+
"Only",
|
|
311
|
+
"OnlyTypedDict",
|
|
312
|
+
"Order",
|
|
313
|
+
"OrderTypedDict",
|
|
299
314
|
"RateLimit",
|
|
300
315
|
"RateLimitTypedDict",
|
|
301
316
|
"SendChatCompletionRequestResponse",
|
|
@@ -350,6 +365,8 @@ _dynamic_imports: dict[str, str] = {
|
|
|
350
365
|
"ContentTypedDict": ".createembeddings",
|
|
351
366
|
"CreateEmbeddingsData": ".createembeddings",
|
|
352
367
|
"CreateEmbeddingsDataTypedDict": ".createembeddings",
|
|
368
|
+
"CreateEmbeddingsProvider": ".createembeddings",
|
|
369
|
+
"CreateEmbeddingsProviderTypedDict": ".createembeddings",
|
|
353
370
|
"CreateEmbeddingsRequest": ".createembeddings",
|
|
354
371
|
"CreateEmbeddingsRequestTypedDict": ".createembeddings",
|
|
355
372
|
"CreateEmbeddingsResponse": ".createembeddings",
|
|
@@ -359,14 +376,22 @@ _dynamic_imports: dict[str, str] = {
|
|
|
359
376
|
"Embedding": ".createembeddings",
|
|
360
377
|
"EmbeddingTypedDict": ".createembeddings",
|
|
361
378
|
"EncodingFormat": ".createembeddings",
|
|
379
|
+
"Ignore": ".createembeddings",
|
|
380
|
+
"IgnoreTypedDict": ".createembeddings",
|
|
362
381
|
"ImageURL": ".createembeddings",
|
|
363
382
|
"ImageURLTypedDict": ".createembeddings",
|
|
364
383
|
"Input": ".createembeddings",
|
|
365
384
|
"InputTypedDict": ".createembeddings",
|
|
366
385
|
"InputUnion": ".createembeddings",
|
|
367
386
|
"InputUnionTypedDict": ".createembeddings",
|
|
387
|
+
"MaxPrice": ".createembeddings",
|
|
388
|
+
"MaxPriceTypedDict": ".createembeddings",
|
|
368
389
|
"Object": ".createembeddings",
|
|
369
390
|
"ObjectEmbedding": ".createembeddings",
|
|
391
|
+
"Only": ".createembeddings",
|
|
392
|
+
"OnlyTypedDict": ".createembeddings",
|
|
393
|
+
"Order": ".createembeddings",
|
|
394
|
+
"OrderTypedDict": ".createembeddings",
|
|
370
395
|
"TypeImageURL": ".createembeddings",
|
|
371
396
|
"TypeText": ".createembeddings",
|
|
372
397
|
"Usage": ".createembeddings",
|
|
@@ -391,8 +416,6 @@ _dynamic_imports: dict[str, str] = {
|
|
|
391
416
|
"ExchangeAuthCodeForAPIKeyRequestTypedDict": ".exchangeauthcodeforapikey",
|
|
392
417
|
"ExchangeAuthCodeForAPIKeyResponse": ".exchangeauthcodeforapikey",
|
|
393
418
|
"ExchangeAuthCodeForAPIKeyResponseTypedDict": ".exchangeauthcodeforapikey",
|
|
394
|
-
"GetCreditsData": ".getcredits",
|
|
395
|
-
"GetCreditsDataTypedDict": ".getcredits",
|
|
396
419
|
"GetCreditsResponse": ".getcredits",
|
|
397
420
|
"GetCreditsResponseTypedDict": ".getcredits",
|
|
398
421
|
"GetCurrentKeyData": ".getcurrentkey",
|
|
@@ -418,6 +441,7 @@ _dynamic_imports: dict[str, str] = {
|
|
|
418
441
|
"GetModelsRequestTypedDict": ".getmodels",
|
|
419
442
|
"GetParametersData": ".getparameters",
|
|
420
443
|
"GetParametersDataTypedDict": ".getparameters",
|
|
444
|
+
"GetParametersProvider": ".getparameters",
|
|
421
445
|
"GetParametersRequest": ".getparameters",
|
|
422
446
|
"GetParametersRequestTypedDict": ".getparameters",
|
|
423
447
|
"GetParametersResponse": ".getparameters",
|