openrouter 0.1.2__py3-none-any.whl → 0.1.3__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/analytics.py +2 -2
- openrouter/api_keys.py +20 -0
- openrouter/components/__init__.py +46 -34
- openrouter/components/{_schema3.py → _schema2.py} +22 -22
- openrouter/components/assistantmessage.py +32 -1
- openrouter/components/chatmessagecontentitemimage.py +4 -4
- openrouter/components/chatresponsechoice.py +1 -6
- openrouter/components/chatstreamingmessagechunk.py +3 -3
- openrouter/components/model.py +7 -1
- openrouter/components/outputmodality.py +1 -0
- openrouter/components/publicendpoint.py +10 -0
- openrouter/components/publicpricing.py +5 -0
- openrouter/credits.py +2 -2
- openrouter/guardrails.py +3017 -0
- openrouter/models_.py +4 -4
- openrouter/operations/__init__.py +281 -30
- openrouter/operations/bulkassignkeystoguardrail.py +49 -0
- openrouter/operations/bulkassignmemberstoguardrail.py +49 -0
- openrouter/operations/bulkunassignkeysfromguardrail.py +49 -0
- openrouter/operations/bulkunassignmembersfromguardrail.py +49 -0
- openrouter/operations/createguardrail.py +247 -0
- openrouter/operations/deleteguardrail.py +38 -0
- openrouter/operations/getguardrail.py +161 -0
- openrouter/operations/getmodels.py +28 -5
- openrouter/operations/listguardrailkeyassignments.py +125 -0
- openrouter/operations/listguardrailmemberassignments.py +120 -0
- openrouter/operations/listguardrails.py +171 -0
- openrouter/operations/listkeyassignments.py +118 -0
- openrouter/operations/listmemberassignments.py +113 -0
- openrouter/operations/updateguardrail.py +271 -0
- openrouter/sdk.py +4 -4
- openrouter/types/models.py +378 -0
- {openrouter-0.1.2.dist-info → openrouter-0.1.3.dist-info}/METADATA +1 -1
- {openrouter-0.1.2.dist-info → openrouter-0.1.3.dist-info}/RECORD +38 -25
- openrouter/operations/getparameters.py +0 -123
- openrouter/parameters.py +0 -237
- {openrouter-0.1.2.dist-info → openrouter-0.1.3.dist-info}/WHEEL +0 -0
- {openrouter-0.1.2.dist-info → openrouter-0.1.3.dist-info}/licenses/LICENSE +0 -0
- {openrouter-0.1.2.dist-info → openrouter-0.1.3.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from openrouter.types import (
|
|
5
|
+
BaseModel,
|
|
6
|
+
Nullable,
|
|
7
|
+
OptionalNullable,
|
|
8
|
+
UNSET,
|
|
9
|
+
UNSET_SENTINEL,
|
|
10
|
+
UnrecognizedStr,
|
|
11
|
+
)
|
|
12
|
+
from openrouter.utils import (
|
|
13
|
+
FieldMetadata,
|
|
14
|
+
PathParamMetadata,
|
|
15
|
+
RequestMetadata,
|
|
16
|
+
validate_open_enum,
|
|
17
|
+
)
|
|
18
|
+
from pydantic import model_serializer
|
|
19
|
+
from pydantic.functional_validators import PlainValidator
|
|
20
|
+
from typing import List, Literal, Optional, Union
|
|
21
|
+
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
UpdateGuardrailResetIntervalRequest = Union[
|
|
25
|
+
Literal[
|
|
26
|
+
"daily",
|
|
27
|
+
"weekly",
|
|
28
|
+
"monthly",
|
|
29
|
+
],
|
|
30
|
+
UnrecognizedStr,
|
|
31
|
+
]
|
|
32
|
+
r"""Interval at which the limit resets (daily, weekly, monthly)"""
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
class UpdateGuardrailRequestBodyTypedDict(TypedDict):
|
|
36
|
+
name: NotRequired[str]
|
|
37
|
+
r"""New name for the guardrail"""
|
|
38
|
+
description: NotRequired[Nullable[str]]
|
|
39
|
+
r"""New description for the guardrail"""
|
|
40
|
+
limit_usd: NotRequired[Nullable[float]]
|
|
41
|
+
r"""New spending limit in USD"""
|
|
42
|
+
reset_interval: NotRequired[Nullable[UpdateGuardrailResetIntervalRequest]]
|
|
43
|
+
r"""Interval at which the limit resets (daily, weekly, monthly)"""
|
|
44
|
+
allowed_providers: NotRequired[Nullable[List[str]]]
|
|
45
|
+
r"""New list of allowed provider IDs"""
|
|
46
|
+
allowed_models: NotRequired[Nullable[List[str]]]
|
|
47
|
+
r"""Array of model identifiers (slug or canonical_slug accepted)"""
|
|
48
|
+
enforce_zdr: NotRequired[Nullable[bool]]
|
|
49
|
+
r"""Whether to enforce zero data retention"""
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
class UpdateGuardrailRequestBody(BaseModel):
|
|
53
|
+
name: Optional[str] = None
|
|
54
|
+
r"""New name for the guardrail"""
|
|
55
|
+
|
|
56
|
+
description: OptionalNullable[str] = UNSET
|
|
57
|
+
r"""New description for the guardrail"""
|
|
58
|
+
|
|
59
|
+
limit_usd: OptionalNullable[float] = UNSET
|
|
60
|
+
r"""New spending limit in USD"""
|
|
61
|
+
|
|
62
|
+
reset_interval: Annotated[
|
|
63
|
+
OptionalNullable[UpdateGuardrailResetIntervalRequest],
|
|
64
|
+
PlainValidator(validate_open_enum(False)),
|
|
65
|
+
] = UNSET
|
|
66
|
+
r"""Interval at which the limit resets (daily, weekly, monthly)"""
|
|
67
|
+
|
|
68
|
+
allowed_providers: OptionalNullable[List[str]] = UNSET
|
|
69
|
+
r"""New list of allowed provider IDs"""
|
|
70
|
+
|
|
71
|
+
allowed_models: OptionalNullable[List[str]] = UNSET
|
|
72
|
+
r"""Array of model identifiers (slug or canonical_slug accepted)"""
|
|
73
|
+
|
|
74
|
+
enforce_zdr: OptionalNullable[bool] = UNSET
|
|
75
|
+
r"""Whether to enforce zero data retention"""
|
|
76
|
+
|
|
77
|
+
@model_serializer(mode="wrap")
|
|
78
|
+
def serialize_model(self, handler):
|
|
79
|
+
optional_fields = [
|
|
80
|
+
"name",
|
|
81
|
+
"description",
|
|
82
|
+
"limit_usd",
|
|
83
|
+
"reset_interval",
|
|
84
|
+
"allowed_providers",
|
|
85
|
+
"allowed_models",
|
|
86
|
+
"enforce_zdr",
|
|
87
|
+
]
|
|
88
|
+
nullable_fields = [
|
|
89
|
+
"description",
|
|
90
|
+
"limit_usd",
|
|
91
|
+
"reset_interval",
|
|
92
|
+
"allowed_providers",
|
|
93
|
+
"allowed_models",
|
|
94
|
+
"enforce_zdr",
|
|
95
|
+
]
|
|
96
|
+
null_default_fields = []
|
|
97
|
+
|
|
98
|
+
serialized = handler(self)
|
|
99
|
+
|
|
100
|
+
m = {}
|
|
101
|
+
|
|
102
|
+
for n, f in type(self).model_fields.items():
|
|
103
|
+
k = f.alias or n
|
|
104
|
+
val = serialized.get(k)
|
|
105
|
+
serialized.pop(k, None)
|
|
106
|
+
|
|
107
|
+
optional_nullable = k in optional_fields and k in nullable_fields
|
|
108
|
+
is_set = (
|
|
109
|
+
self.__pydantic_fields_set__.intersection({n})
|
|
110
|
+
or k in null_default_fields
|
|
111
|
+
) # pylint: disable=no-member
|
|
112
|
+
|
|
113
|
+
if val is not None and val != UNSET_SENTINEL:
|
|
114
|
+
m[k] = val
|
|
115
|
+
elif val != UNSET_SENTINEL and (
|
|
116
|
+
not k in optional_fields or (optional_nullable and is_set)
|
|
117
|
+
):
|
|
118
|
+
m[k] = val
|
|
119
|
+
|
|
120
|
+
return m
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
class UpdateGuardrailRequestTypedDict(TypedDict):
|
|
124
|
+
id: str
|
|
125
|
+
r"""The unique identifier of the guardrail to update"""
|
|
126
|
+
request_body: UpdateGuardrailRequestBodyTypedDict
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
class UpdateGuardrailRequest(BaseModel):
|
|
130
|
+
id: Annotated[
|
|
131
|
+
str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
|
|
132
|
+
]
|
|
133
|
+
r"""The unique identifier of the guardrail to update"""
|
|
134
|
+
|
|
135
|
+
request_body: Annotated[
|
|
136
|
+
UpdateGuardrailRequestBody,
|
|
137
|
+
FieldMetadata(request=RequestMetadata(media_type="application/json")),
|
|
138
|
+
]
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
UpdateGuardrailResetIntervalResponse = Union[
|
|
142
|
+
Literal[
|
|
143
|
+
"daily",
|
|
144
|
+
"weekly",
|
|
145
|
+
"monthly",
|
|
146
|
+
],
|
|
147
|
+
UnrecognizedStr,
|
|
148
|
+
]
|
|
149
|
+
r"""Interval at which the limit resets (daily, weekly, monthly)"""
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
class UpdateGuardrailDataTypedDict(TypedDict):
|
|
153
|
+
r"""The updated guardrail"""
|
|
154
|
+
|
|
155
|
+
id: str
|
|
156
|
+
r"""Unique identifier for the guardrail"""
|
|
157
|
+
name: str
|
|
158
|
+
r"""Name of the guardrail"""
|
|
159
|
+
created_at: str
|
|
160
|
+
r"""ISO 8601 timestamp of when the guardrail was created"""
|
|
161
|
+
description: NotRequired[Nullable[str]]
|
|
162
|
+
r"""Description of the guardrail"""
|
|
163
|
+
limit_usd: NotRequired[Nullable[float]]
|
|
164
|
+
r"""Spending limit in USD"""
|
|
165
|
+
reset_interval: NotRequired[Nullable[UpdateGuardrailResetIntervalResponse]]
|
|
166
|
+
r"""Interval at which the limit resets (daily, weekly, monthly)"""
|
|
167
|
+
allowed_providers: NotRequired[Nullable[List[str]]]
|
|
168
|
+
r"""List of allowed provider IDs"""
|
|
169
|
+
allowed_models: NotRequired[Nullable[List[str]]]
|
|
170
|
+
r"""Array of model canonical_slugs (immutable identifiers)"""
|
|
171
|
+
enforce_zdr: NotRequired[Nullable[bool]]
|
|
172
|
+
r"""Whether to enforce zero data retention"""
|
|
173
|
+
updated_at: NotRequired[Nullable[str]]
|
|
174
|
+
r"""ISO 8601 timestamp of when the guardrail was last updated"""
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
class UpdateGuardrailData(BaseModel):
|
|
178
|
+
r"""The updated guardrail"""
|
|
179
|
+
|
|
180
|
+
id: str
|
|
181
|
+
r"""Unique identifier for the guardrail"""
|
|
182
|
+
|
|
183
|
+
name: str
|
|
184
|
+
r"""Name of the guardrail"""
|
|
185
|
+
|
|
186
|
+
created_at: str
|
|
187
|
+
r"""ISO 8601 timestamp of when the guardrail was created"""
|
|
188
|
+
|
|
189
|
+
description: OptionalNullable[str] = UNSET
|
|
190
|
+
r"""Description of the guardrail"""
|
|
191
|
+
|
|
192
|
+
limit_usd: OptionalNullable[float] = UNSET
|
|
193
|
+
r"""Spending limit in USD"""
|
|
194
|
+
|
|
195
|
+
reset_interval: Annotated[
|
|
196
|
+
OptionalNullable[UpdateGuardrailResetIntervalResponse],
|
|
197
|
+
PlainValidator(validate_open_enum(False)),
|
|
198
|
+
] = UNSET
|
|
199
|
+
r"""Interval at which the limit resets (daily, weekly, monthly)"""
|
|
200
|
+
|
|
201
|
+
allowed_providers: OptionalNullable[List[str]] = UNSET
|
|
202
|
+
r"""List of allowed provider IDs"""
|
|
203
|
+
|
|
204
|
+
allowed_models: OptionalNullable[List[str]] = UNSET
|
|
205
|
+
r"""Array of model canonical_slugs (immutable identifiers)"""
|
|
206
|
+
|
|
207
|
+
enforce_zdr: OptionalNullable[bool] = UNSET
|
|
208
|
+
r"""Whether to enforce zero data retention"""
|
|
209
|
+
|
|
210
|
+
updated_at: OptionalNullable[str] = UNSET
|
|
211
|
+
r"""ISO 8601 timestamp of when the guardrail was last updated"""
|
|
212
|
+
|
|
213
|
+
@model_serializer(mode="wrap")
|
|
214
|
+
def serialize_model(self, handler):
|
|
215
|
+
optional_fields = [
|
|
216
|
+
"description",
|
|
217
|
+
"limit_usd",
|
|
218
|
+
"reset_interval",
|
|
219
|
+
"allowed_providers",
|
|
220
|
+
"allowed_models",
|
|
221
|
+
"enforce_zdr",
|
|
222
|
+
"updated_at",
|
|
223
|
+
]
|
|
224
|
+
nullable_fields = [
|
|
225
|
+
"description",
|
|
226
|
+
"limit_usd",
|
|
227
|
+
"reset_interval",
|
|
228
|
+
"allowed_providers",
|
|
229
|
+
"allowed_models",
|
|
230
|
+
"enforce_zdr",
|
|
231
|
+
"updated_at",
|
|
232
|
+
]
|
|
233
|
+
null_default_fields = []
|
|
234
|
+
|
|
235
|
+
serialized = handler(self)
|
|
236
|
+
|
|
237
|
+
m = {}
|
|
238
|
+
|
|
239
|
+
for n, f in type(self).model_fields.items():
|
|
240
|
+
k = f.alias or n
|
|
241
|
+
val = serialized.get(k)
|
|
242
|
+
serialized.pop(k, None)
|
|
243
|
+
|
|
244
|
+
optional_nullable = k in optional_fields and k in nullable_fields
|
|
245
|
+
is_set = (
|
|
246
|
+
self.__pydantic_fields_set__.intersection({n})
|
|
247
|
+
or k in null_default_fields
|
|
248
|
+
) # pylint: disable=no-member
|
|
249
|
+
|
|
250
|
+
if val is not None and val != UNSET_SENTINEL:
|
|
251
|
+
m[k] = val
|
|
252
|
+
elif val != UNSET_SENTINEL and (
|
|
253
|
+
not k in optional_fields or (optional_nullable and is_set)
|
|
254
|
+
):
|
|
255
|
+
m[k] = val
|
|
256
|
+
|
|
257
|
+
return m
|
|
258
|
+
|
|
259
|
+
|
|
260
|
+
class UpdateGuardrailResponseTypedDict(TypedDict):
|
|
261
|
+
r"""Guardrail updated successfully"""
|
|
262
|
+
|
|
263
|
+
data: UpdateGuardrailDataTypedDict
|
|
264
|
+
r"""The updated guardrail"""
|
|
265
|
+
|
|
266
|
+
|
|
267
|
+
class UpdateGuardrailResponse(BaseModel):
|
|
268
|
+
r"""Guardrail updated successfully"""
|
|
269
|
+
|
|
270
|
+
data: UpdateGuardrailData
|
|
271
|
+
r"""The updated guardrail"""
|
openrouter/sdk.py
CHANGED
|
@@ -25,9 +25,9 @@ if TYPE_CHECKING:
|
|
|
25
25
|
from openrouter.embeddings import Embeddings
|
|
26
26
|
from openrouter.endpoints import Endpoints
|
|
27
27
|
from openrouter.generations import Generations
|
|
28
|
+
from openrouter.guardrails import Guardrails
|
|
28
29
|
from openrouter.models_ import Models
|
|
29
30
|
from openrouter.oauth import OAuth
|
|
30
|
-
from openrouter.parameters import Parameters
|
|
31
31
|
from openrouter.providers import Providers
|
|
32
32
|
|
|
33
33
|
|
|
@@ -49,12 +49,12 @@ class OpenRouter(BaseSDK):
|
|
|
49
49
|
r"""Model information endpoints"""
|
|
50
50
|
endpoints: "Endpoints"
|
|
51
51
|
r"""Endpoint information"""
|
|
52
|
-
parameters: "Parameters"
|
|
53
|
-
r"""Parameters endpoints"""
|
|
54
52
|
providers: "Providers"
|
|
55
53
|
r"""Provider information endpoints"""
|
|
56
54
|
api_keys: "APIKeys"
|
|
57
55
|
r"""API key management endpoints"""
|
|
56
|
+
guardrails: "Guardrails"
|
|
57
|
+
r"""Guardrails endpoints"""
|
|
58
58
|
o_auth: "OAuth"
|
|
59
59
|
r"""OAuth authentication endpoints"""
|
|
60
60
|
chat: "Chat"
|
|
@@ -67,9 +67,9 @@ class OpenRouter(BaseSDK):
|
|
|
67
67
|
"generations": ("openrouter.generations", "Generations"),
|
|
68
68
|
"models": ("openrouter.models_", "Models"),
|
|
69
69
|
"endpoints": ("openrouter.endpoints", "Endpoints"),
|
|
70
|
-
"parameters": ("openrouter.parameters", "Parameters"),
|
|
71
70
|
"providers": ("openrouter.providers", "Providers"),
|
|
72
71
|
"api_keys": ("openrouter.api_keys", "APIKeys"),
|
|
72
|
+
"guardrails": ("openrouter.guardrails", "Guardrails"),
|
|
73
73
|
"o_auth": ("openrouter.oauth", "OAuth"),
|
|
74
74
|
"chat": ("openrouter.chat", "Chat"),
|
|
75
75
|
"completions": ("openrouter.completions", "Completions"),
|
|
@@ -0,0 +1,378 @@
|
|
|
1
|
+
"""Auto-generated by @openrouter/cli types. Do not edit manually."""
|
|
2
|
+
# Run `npx @openrouter/cli types` to regenerate
|
|
3
|
+
# Generated: 2025-12-23T14:51:29.122Z
|
|
4
|
+
# Model count: 351
|
|
5
|
+
|
|
6
|
+
from typing import Literal, Union
|
|
7
|
+
from typing_extensions import TypeAlias
|
|
8
|
+
|
|
9
|
+
# Union type of all available model IDs on OpenRouter.
|
|
10
|
+
# Includes base models and their variants (e.g., ":free", ":nitro").
|
|
11
|
+
ModelId: TypeAlias = Literal[
|
|
12
|
+
'ai21/jamba-large-1.7',
|
|
13
|
+
'ai21/jamba-mini-1.7',
|
|
14
|
+
'aion-labs/aion-1.0',
|
|
15
|
+
'aion-labs/aion-1.0-mini',
|
|
16
|
+
'aion-labs/aion-rp-llama-3.1-8b',
|
|
17
|
+
'alfredpros/codellama-7b-instruct-solidity',
|
|
18
|
+
'alibaba/tongyi-deepresearch-30b-a3b',
|
|
19
|
+
'alibaba/tongyi-deepresearch-30b-a3b:free',
|
|
20
|
+
'allenai/olmo-2-0325-32b-instruct',
|
|
21
|
+
'allenai/olmo-3-32b-think:free',
|
|
22
|
+
'allenai/olmo-3-7b-instruct',
|
|
23
|
+
'allenai/olmo-3-7b-think',
|
|
24
|
+
'allenai/olmo-3.1-32b-think:free',
|
|
25
|
+
'alpindale/goliath-120b',
|
|
26
|
+
'amazon/nova-2-lite-v1',
|
|
27
|
+
'amazon/nova-lite-v1',
|
|
28
|
+
'amazon/nova-micro-v1',
|
|
29
|
+
'amazon/nova-premier-v1',
|
|
30
|
+
'amazon/nova-pro-v1',
|
|
31
|
+
'anthracite-org/magnum-v4-72b',
|
|
32
|
+
'anthropic/claude-3-haiku',
|
|
33
|
+
'anthropic/claude-3-opus',
|
|
34
|
+
'anthropic/claude-3.5-haiku',
|
|
35
|
+
'anthropic/claude-3.5-haiku-20241022',
|
|
36
|
+
'anthropic/claude-3.5-sonnet',
|
|
37
|
+
'anthropic/claude-3.7-sonnet',
|
|
38
|
+
'anthropic/claude-3.7-sonnet:thinking',
|
|
39
|
+
'anthropic/claude-haiku-4.5',
|
|
40
|
+
'anthropic/claude-opus-4',
|
|
41
|
+
'anthropic/claude-opus-4.1',
|
|
42
|
+
'anthropic/claude-opus-4.5',
|
|
43
|
+
'anthropic/claude-sonnet-4',
|
|
44
|
+
'anthropic/claude-sonnet-4.5',
|
|
45
|
+
'arcee-ai/coder-large',
|
|
46
|
+
'arcee-ai/maestro-reasoning',
|
|
47
|
+
'arcee-ai/spotlight',
|
|
48
|
+
'arcee-ai/trinity-mini',
|
|
49
|
+
'arcee-ai/trinity-mini:free',
|
|
50
|
+
'arcee-ai/virtuoso-large',
|
|
51
|
+
'arliai/qwq-32b-arliai-rpr-v1',
|
|
52
|
+
'baidu/ernie-4.5-21b-a3b',
|
|
53
|
+
'baidu/ernie-4.5-21b-a3b-thinking',
|
|
54
|
+
'baidu/ernie-4.5-300b-a47b',
|
|
55
|
+
'baidu/ernie-4.5-vl-28b-a3b',
|
|
56
|
+
'baidu/ernie-4.5-vl-424b-a47b',
|
|
57
|
+
'bytedance/ui-tars-1.5-7b',
|
|
58
|
+
'cognitivecomputations/dolphin-mistral-24b-venice-edition:free',
|
|
59
|
+
'cohere/command-a',
|
|
60
|
+
'cohere/command-r-08-2024',
|
|
61
|
+
'cohere/command-r-plus-08-2024',
|
|
62
|
+
'cohere/command-r7b-12-2024',
|
|
63
|
+
'deepcogito/cogito-v2-preview-llama-109b-moe',
|
|
64
|
+
'deepcogito/cogito-v2-preview-llama-405b',
|
|
65
|
+
'deepcogito/cogito-v2-preview-llama-70b',
|
|
66
|
+
'deepcogito/cogito-v2.1-671b',
|
|
67
|
+
'deepseek/deepseek-chat',
|
|
68
|
+
'deepseek/deepseek-chat-v3-0324',
|
|
69
|
+
'deepseek/deepseek-chat-v3.1',
|
|
70
|
+
'deepseek/deepseek-prover-v2',
|
|
71
|
+
'deepseek/deepseek-r1',
|
|
72
|
+
'deepseek/deepseek-r1-0528',
|
|
73
|
+
'deepseek/deepseek-r1-0528-qwen3-8b',
|
|
74
|
+
'deepseek/deepseek-r1-0528:free',
|
|
75
|
+
'deepseek/deepseek-r1-distill-llama-70b',
|
|
76
|
+
'deepseek/deepseek-r1-distill-qwen-14b',
|
|
77
|
+
'deepseek/deepseek-r1-distill-qwen-32b',
|
|
78
|
+
'deepseek/deepseek-v3.1-terminus',
|
|
79
|
+
'deepseek/deepseek-v3.1-terminus:exacto',
|
|
80
|
+
'deepseek/deepseek-v3.2',
|
|
81
|
+
'deepseek/deepseek-v3.2-exp',
|
|
82
|
+
'deepseek/deepseek-v3.2-speciale',
|
|
83
|
+
'eleutherai/llemma_7b',
|
|
84
|
+
'essentialai/rnj-1-instruct',
|
|
85
|
+
'google/gemini-2.0-flash-001',
|
|
86
|
+
'google/gemini-2.0-flash-exp:free',
|
|
87
|
+
'google/gemini-2.0-flash-lite-001',
|
|
88
|
+
'google/gemini-2.5-flash',
|
|
89
|
+
'google/gemini-2.5-flash-image',
|
|
90
|
+
'google/gemini-2.5-flash-image-preview',
|
|
91
|
+
'google/gemini-2.5-flash-lite',
|
|
92
|
+
'google/gemini-2.5-flash-lite-preview-09-2025',
|
|
93
|
+
'google/gemini-2.5-flash-preview-09-2025',
|
|
94
|
+
'google/gemini-2.5-pro',
|
|
95
|
+
'google/gemini-2.5-pro-preview',
|
|
96
|
+
'google/gemini-2.5-pro-preview-05-06',
|
|
97
|
+
'google/gemini-3-flash-preview',
|
|
98
|
+
'google/gemini-3-pro-image-preview',
|
|
99
|
+
'google/gemini-3-pro-preview',
|
|
100
|
+
'google/gemma-2-27b-it',
|
|
101
|
+
'google/gemma-2-9b-it',
|
|
102
|
+
'google/gemma-3-12b-it',
|
|
103
|
+
'google/gemma-3-12b-it:free',
|
|
104
|
+
'google/gemma-3-27b-it',
|
|
105
|
+
'google/gemma-3-27b-it:free',
|
|
106
|
+
'google/gemma-3-4b-it',
|
|
107
|
+
'google/gemma-3-4b-it:free',
|
|
108
|
+
'google/gemma-3n-e2b-it:free',
|
|
109
|
+
'google/gemma-3n-e4b-it',
|
|
110
|
+
'google/gemma-3n-e4b-it:free',
|
|
111
|
+
'gryphe/mythomax-l2-13b',
|
|
112
|
+
'ibm-granite/granite-4.0-h-micro',
|
|
113
|
+
'inception/mercury',
|
|
114
|
+
'inception/mercury-coder',
|
|
115
|
+
'inflection/inflection-3-pi',
|
|
116
|
+
'inflection/inflection-3-productivity',
|
|
117
|
+
'kwaipilot/kat-coder-pro:free',
|
|
118
|
+
'liquid/lfm-2.2-6b',
|
|
119
|
+
'liquid/lfm2-8b-a1b',
|
|
120
|
+
'mancer/weaver',
|
|
121
|
+
'meituan/longcat-flash-chat',
|
|
122
|
+
'meta-llama/llama-3-70b-instruct',
|
|
123
|
+
'meta-llama/llama-3-8b-instruct',
|
|
124
|
+
'meta-llama/llama-3.1-405b',
|
|
125
|
+
'meta-llama/llama-3.1-405b-instruct',
|
|
126
|
+
'meta-llama/llama-3.1-405b-instruct:free',
|
|
127
|
+
'meta-llama/llama-3.1-70b-instruct',
|
|
128
|
+
'meta-llama/llama-3.1-8b-instruct',
|
|
129
|
+
'meta-llama/llama-3.2-11b-vision-instruct',
|
|
130
|
+
'meta-llama/llama-3.2-1b-instruct',
|
|
131
|
+
'meta-llama/llama-3.2-3b-instruct',
|
|
132
|
+
'meta-llama/llama-3.2-3b-instruct:free',
|
|
133
|
+
'meta-llama/llama-3.2-90b-vision-instruct',
|
|
134
|
+
'meta-llama/llama-3.3-70b-instruct',
|
|
135
|
+
'meta-llama/llama-3.3-70b-instruct:free',
|
|
136
|
+
'meta-llama/llama-4-maverick',
|
|
137
|
+
'meta-llama/llama-4-scout',
|
|
138
|
+
'meta-llama/llama-guard-2-8b',
|
|
139
|
+
'meta-llama/llama-guard-3-8b',
|
|
140
|
+
'meta-llama/llama-guard-4-12b',
|
|
141
|
+
'microsoft/phi-3-medium-128k-instruct',
|
|
142
|
+
'microsoft/phi-3-mini-128k-instruct',
|
|
143
|
+
'microsoft/phi-3.5-mini-128k-instruct',
|
|
144
|
+
'microsoft/phi-4',
|
|
145
|
+
'microsoft/phi-4-multimodal-instruct',
|
|
146
|
+
'microsoft/phi-4-reasoning-plus',
|
|
147
|
+
'microsoft/wizardlm-2-8x22b',
|
|
148
|
+
'minimax/minimax-01',
|
|
149
|
+
'minimax/minimax-m1',
|
|
150
|
+
'minimax/minimax-m2',
|
|
151
|
+
'minimax/minimax-m2.1',
|
|
152
|
+
'mistralai/codestral-2508',
|
|
153
|
+
'mistralai/devstral-2512',
|
|
154
|
+
'mistralai/devstral-2512:free',
|
|
155
|
+
'mistralai/devstral-medium',
|
|
156
|
+
'mistralai/devstral-small',
|
|
157
|
+
'mistralai/devstral-small-2505',
|
|
158
|
+
'mistralai/ministral-14b-2512',
|
|
159
|
+
'mistralai/ministral-3b',
|
|
160
|
+
'mistralai/ministral-3b-2512',
|
|
161
|
+
'mistralai/ministral-8b',
|
|
162
|
+
'mistralai/ministral-8b-2512',
|
|
163
|
+
'mistralai/mistral-7b-instruct',
|
|
164
|
+
'mistralai/mistral-7b-instruct-v0.1',
|
|
165
|
+
'mistralai/mistral-7b-instruct-v0.2',
|
|
166
|
+
'mistralai/mistral-7b-instruct-v0.3',
|
|
167
|
+
'mistralai/mistral-7b-instruct:free',
|
|
168
|
+
'mistralai/mistral-large',
|
|
169
|
+
'mistralai/mistral-large-2407',
|
|
170
|
+
'mistralai/mistral-large-2411',
|
|
171
|
+
'mistralai/mistral-large-2512',
|
|
172
|
+
'mistralai/mistral-medium-3',
|
|
173
|
+
'mistralai/mistral-medium-3.1',
|
|
174
|
+
'mistralai/mistral-nemo',
|
|
175
|
+
'mistralai/mistral-saba',
|
|
176
|
+
'mistralai/mistral-small-24b-instruct-2501',
|
|
177
|
+
'mistralai/mistral-small-3.1-24b-instruct',
|
|
178
|
+
'mistralai/mistral-small-3.1-24b-instruct:free',
|
|
179
|
+
'mistralai/mistral-small-3.2-24b-instruct',
|
|
180
|
+
'mistralai/mistral-small-creative',
|
|
181
|
+
'mistralai/mistral-tiny',
|
|
182
|
+
'mistralai/mixtral-8x22b-instruct',
|
|
183
|
+
'mistralai/mixtral-8x7b-instruct',
|
|
184
|
+
'mistralai/pixtral-12b',
|
|
185
|
+
'mistralai/pixtral-large-2411',
|
|
186
|
+
'mistralai/voxtral-small-24b-2507',
|
|
187
|
+
'moonshotai/kimi-dev-72b',
|
|
188
|
+
'moonshotai/kimi-k2',
|
|
189
|
+
'moonshotai/kimi-k2-0905',
|
|
190
|
+
'moonshotai/kimi-k2-0905:exacto',
|
|
191
|
+
'moonshotai/kimi-k2-thinking',
|
|
192
|
+
'moonshotai/kimi-k2:free',
|
|
193
|
+
'morph/morph-v3-fast',
|
|
194
|
+
'morph/morph-v3-large',
|
|
195
|
+
'neversleep/llama-3.1-lumimaid-8b',
|
|
196
|
+
'neversleep/noromaid-20b',
|
|
197
|
+
'nex-agi/deepseek-v3.1-nex-n1:free',
|
|
198
|
+
'nousresearch/deephermes-3-mistral-24b-preview',
|
|
199
|
+
'nousresearch/hermes-2-pro-llama-3-8b',
|
|
200
|
+
'nousresearch/hermes-3-llama-3.1-405b',
|
|
201
|
+
'nousresearch/hermes-3-llama-3.1-405b:free',
|
|
202
|
+
'nousresearch/hermes-3-llama-3.1-70b',
|
|
203
|
+
'nousresearch/hermes-4-405b',
|
|
204
|
+
'nousresearch/hermes-4-70b',
|
|
205
|
+
'nvidia/llama-3.1-nemotron-70b-instruct',
|
|
206
|
+
'nvidia/llama-3.1-nemotron-ultra-253b-v1',
|
|
207
|
+
'nvidia/llama-3.3-nemotron-super-49b-v1.5',
|
|
208
|
+
'nvidia/nemotron-3-nano-30b-a3b',
|
|
209
|
+
'nvidia/nemotron-3-nano-30b-a3b:free',
|
|
210
|
+
'nvidia/nemotron-nano-12b-v2-vl',
|
|
211
|
+
'nvidia/nemotron-nano-12b-v2-vl:free',
|
|
212
|
+
'nvidia/nemotron-nano-9b-v2',
|
|
213
|
+
'nvidia/nemotron-nano-9b-v2:free',
|
|
214
|
+
'openai/chatgpt-4o-latest',
|
|
215
|
+
'openai/codex-mini',
|
|
216
|
+
'openai/gpt-3.5-turbo',
|
|
217
|
+
'openai/gpt-3.5-turbo-0613',
|
|
218
|
+
'openai/gpt-3.5-turbo-16k',
|
|
219
|
+
'openai/gpt-3.5-turbo-instruct',
|
|
220
|
+
'openai/gpt-4',
|
|
221
|
+
'openai/gpt-4-0314',
|
|
222
|
+
'openai/gpt-4-1106-preview',
|
|
223
|
+
'openai/gpt-4-turbo',
|
|
224
|
+
'openai/gpt-4-turbo-preview',
|
|
225
|
+
'openai/gpt-4.1',
|
|
226
|
+
'openai/gpt-4.1-mini',
|
|
227
|
+
'openai/gpt-4.1-nano',
|
|
228
|
+
'openai/gpt-4o',
|
|
229
|
+
'openai/gpt-4o-2024-05-13',
|
|
230
|
+
'openai/gpt-4o-2024-08-06',
|
|
231
|
+
'openai/gpt-4o-2024-11-20',
|
|
232
|
+
'openai/gpt-4o-audio-preview',
|
|
233
|
+
'openai/gpt-4o-mini',
|
|
234
|
+
'openai/gpt-4o-mini-2024-07-18',
|
|
235
|
+
'openai/gpt-4o-mini-search-preview',
|
|
236
|
+
'openai/gpt-4o-search-preview',
|
|
237
|
+
'openai/gpt-4o:extended',
|
|
238
|
+
'openai/gpt-5',
|
|
239
|
+
'openai/gpt-5-chat',
|
|
240
|
+
'openai/gpt-5-codex',
|
|
241
|
+
'openai/gpt-5-image',
|
|
242
|
+
'openai/gpt-5-image-mini',
|
|
243
|
+
'openai/gpt-5-mini',
|
|
244
|
+
'openai/gpt-5-nano',
|
|
245
|
+
'openai/gpt-5-pro',
|
|
246
|
+
'openai/gpt-5.1',
|
|
247
|
+
'openai/gpt-5.1-chat',
|
|
248
|
+
'openai/gpt-5.1-codex',
|
|
249
|
+
'openai/gpt-5.1-codex-max',
|
|
250
|
+
'openai/gpt-5.1-codex-mini',
|
|
251
|
+
'openai/gpt-5.2',
|
|
252
|
+
'openai/gpt-5.2-chat',
|
|
253
|
+
'openai/gpt-5.2-pro',
|
|
254
|
+
'openai/gpt-oss-120b',
|
|
255
|
+
'openai/gpt-oss-120b:exacto',
|
|
256
|
+
'openai/gpt-oss-120b:free',
|
|
257
|
+
'openai/gpt-oss-20b',
|
|
258
|
+
'openai/gpt-oss-20b:free',
|
|
259
|
+
'openai/gpt-oss-safeguard-20b',
|
|
260
|
+
'openai/o1',
|
|
261
|
+
'openai/o1-pro',
|
|
262
|
+
'openai/o3',
|
|
263
|
+
'openai/o3-deep-research',
|
|
264
|
+
'openai/o3-mini',
|
|
265
|
+
'openai/o3-mini-high',
|
|
266
|
+
'openai/o3-pro',
|
|
267
|
+
'openai/o4-mini',
|
|
268
|
+
'openai/o4-mini-deep-research',
|
|
269
|
+
'openai/o4-mini-high',
|
|
270
|
+
'opengvlab/internvl3-78b',
|
|
271
|
+
'openrouter/auto',
|
|
272
|
+
'openrouter/bodybuilder',
|
|
273
|
+
'perplexity/sonar',
|
|
274
|
+
'perplexity/sonar-deep-research',
|
|
275
|
+
'perplexity/sonar-pro',
|
|
276
|
+
'perplexity/sonar-pro-search',
|
|
277
|
+
'perplexity/sonar-reasoning',
|
|
278
|
+
'perplexity/sonar-reasoning-pro',
|
|
279
|
+
'prime-intellect/intellect-3',
|
|
280
|
+
'qwen/qwen-2.5-72b-instruct',
|
|
281
|
+
'qwen/qwen-2.5-7b-instruct',
|
|
282
|
+
'qwen/qwen-2.5-coder-32b-instruct',
|
|
283
|
+
'qwen/qwen-2.5-vl-7b-instruct',
|
|
284
|
+
'qwen/qwen-2.5-vl-7b-instruct:free',
|
|
285
|
+
'qwen/qwen-max',
|
|
286
|
+
'qwen/qwen-plus',
|
|
287
|
+
'qwen/qwen-plus-2025-07-28',
|
|
288
|
+
'qwen/qwen-plus-2025-07-28:thinking',
|
|
289
|
+
'qwen/qwen-turbo',
|
|
290
|
+
'qwen/qwen-vl-max',
|
|
291
|
+
'qwen/qwen-vl-plus',
|
|
292
|
+
'qwen/qwen2.5-coder-7b-instruct',
|
|
293
|
+
'qwen/qwen2.5-vl-32b-instruct',
|
|
294
|
+
'qwen/qwen2.5-vl-72b-instruct',
|
|
295
|
+
'qwen/qwen3-14b',
|
|
296
|
+
'qwen/qwen3-235b-a22b',
|
|
297
|
+
'qwen/qwen3-235b-a22b-2507',
|
|
298
|
+
'qwen/qwen3-235b-a22b-thinking-2507',
|
|
299
|
+
'qwen/qwen3-30b-a3b',
|
|
300
|
+
'qwen/qwen3-30b-a3b-instruct-2507',
|
|
301
|
+
'qwen/qwen3-30b-a3b-thinking-2507',
|
|
302
|
+
'qwen/qwen3-32b',
|
|
303
|
+
'qwen/qwen3-4b:free',
|
|
304
|
+
'qwen/qwen3-8b',
|
|
305
|
+
'qwen/qwen3-coder',
|
|
306
|
+
'qwen/qwen3-coder-30b-a3b-instruct',
|
|
307
|
+
'qwen/qwen3-coder-flash',
|
|
308
|
+
'qwen/qwen3-coder-plus',
|
|
309
|
+
'qwen/qwen3-coder:exacto',
|
|
310
|
+
'qwen/qwen3-coder:free',
|
|
311
|
+
'qwen/qwen3-max',
|
|
312
|
+
'qwen/qwen3-next-80b-a3b-instruct',
|
|
313
|
+
'qwen/qwen3-next-80b-a3b-thinking',
|
|
314
|
+
'qwen/qwen3-vl-235b-a22b-instruct',
|
|
315
|
+
'qwen/qwen3-vl-235b-a22b-thinking',
|
|
316
|
+
'qwen/qwen3-vl-30b-a3b-instruct',
|
|
317
|
+
'qwen/qwen3-vl-30b-a3b-thinking',
|
|
318
|
+
'qwen/qwen3-vl-32b-instruct',
|
|
319
|
+
'qwen/qwen3-vl-8b-instruct',
|
|
320
|
+
'qwen/qwen3-vl-8b-thinking',
|
|
321
|
+
'qwen/qwq-32b',
|
|
322
|
+
'raifle/sorcererlm-8x22b',
|
|
323
|
+
'relace/relace-apply-3',
|
|
324
|
+
'relace/relace-search',
|
|
325
|
+
'sao10k/l3-euryale-70b',
|
|
326
|
+
'sao10k/l3-lunaris-8b',
|
|
327
|
+
'sao10k/l3.1-70b-hanami-x1',
|
|
328
|
+
'sao10k/l3.1-euryale-70b',
|
|
329
|
+
'sao10k/l3.3-euryale-70b',
|
|
330
|
+
'stepfun-ai/step3',
|
|
331
|
+
'switchpoint/router',
|
|
332
|
+
'tencent/hunyuan-a13b-instruct',
|
|
333
|
+
'thedrummer/cydonia-24b-v4.1',
|
|
334
|
+
'thedrummer/rocinante-12b',
|
|
335
|
+
'thedrummer/skyfall-36b-v2',
|
|
336
|
+
'thedrummer/unslopnemo-12b',
|
|
337
|
+
'thudm/glm-4.1v-9b-thinking',
|
|
338
|
+
'tngtech/deepseek-r1t-chimera',
|
|
339
|
+
'tngtech/deepseek-r1t-chimera:free',
|
|
340
|
+
'tngtech/deepseek-r1t2-chimera',
|
|
341
|
+
'tngtech/deepseek-r1t2-chimera:free',
|
|
342
|
+
'tngtech/tng-r1t-chimera',
|
|
343
|
+
'tngtech/tng-r1t-chimera:free',
|
|
344
|
+
'undi95/remm-slerp-l2-13b',
|
|
345
|
+
'x-ai/grok-3',
|
|
346
|
+
'x-ai/grok-3-beta',
|
|
347
|
+
'x-ai/grok-3-mini',
|
|
348
|
+
'x-ai/grok-3-mini-beta',
|
|
349
|
+
'x-ai/grok-4',
|
|
350
|
+
'x-ai/grok-4-fast',
|
|
351
|
+
'x-ai/grok-4.1-fast',
|
|
352
|
+
'x-ai/grok-code-fast-1',
|
|
353
|
+
'xiaomi/mimo-v2-flash:free',
|
|
354
|
+
'z-ai/glm-4-32b',
|
|
355
|
+
'z-ai/glm-4.5',
|
|
356
|
+
'z-ai/glm-4.5-air',
|
|
357
|
+
'z-ai/glm-4.5-air:free',
|
|
358
|
+
'z-ai/glm-4.5v',
|
|
359
|
+
'z-ai/glm-4.6',
|
|
360
|
+
'z-ai/glm-4.6:exacto',
|
|
361
|
+
'z-ai/glm-4.6v',
|
|
362
|
+
'z-ai/glm-4.7'
|
|
363
|
+
]
|
|
364
|
+
|
|
365
|
+
# Static variants that create distinct model IDs.
|
|
366
|
+
# These are already present in the API response (e.g., "openai/gpt-4:free").
|
|
367
|
+
StaticVariant: TypeAlias = Literal['free', 'extended', 'exacto', 'thinking']
|
|
368
|
+
|
|
369
|
+
# Virtual variants used for routing hints.
|
|
370
|
+
# These do not create distinct model IDs but affect routing behavior.
|
|
371
|
+
VirtualVariant: TypeAlias = Literal['all', 'online', 'nitro', 'floor']
|
|
372
|
+
|
|
373
|
+
# All available variants.
|
|
374
|
+
Variant: TypeAlias = Union[StaticVariant, VirtualVariant]
|
|
375
|
+
|
|
376
|
+
# Hash of model IDs for staleness checking.
|
|
377
|
+
# Used by postinstall script to detect outdated types.
|
|
378
|
+
MODEL_HASH: str = '986e77d89072f654'
|