Compare commits

..
1 Commits
Author SHA1 Message Date
OpenRouter Team faad3acf8d Commits included in this export:
- 5dbab2094bc744db4a90b3097520d897e5d0d634
  - 4c47d1af1735db18a1c1a7f463e801c7f71ad4e5

GitOrigin-RevId: 5dbab2094bc744db4a90b3097520d897e5d0d634
2026-02-08 06:52:31 +00:00
27 changed files with 22 additions and 159 deletions
+3 -4
View File
@@ -1,12 +1,12 @@
lockVersion: 2.0.0
id: cfd52247-6a25-4c6d-bbce-fe6fce0cd69d
management:
docChecksum: 44cf69670d08f875912803fcbf819e62
docChecksum: a8fed71df7458c6d948fc393e17aa9bc
docVersion: 1.0.0
speakeasyVersion: 1.666.0
generationVersion: 2.768.0
releaseVersion: 0.7.3
configChecksum: b2d1a05e03508d9e74db24120e9e88e2
releaseVersion: 0.7.0
configChecksum: fb83a92d2ee84da7390a12353d622d23
repoURL: https://github.com/OpenRouterTeam/python-sdk.git
installationURL: https://github.com/OpenRouterTeam/python-sdk.git
published: true
@@ -666,7 +666,6 @@ generatedFiles:
- docs/operations/updatekeysrequestbody.md
- docs/operations/updatekeysresponse.md
- docs/operations/usage.md
- docs/operations/usagelimittype.md
- docs/operations/web3data.md
- docs/sdks/analytics/README.md
- docs/sdks/apikeys/README.md
+1 -1
View File
@@ -31,7 +31,7 @@ generation:
skipResponseBodyAssertions: false
preApplyUnionDiscriminators: true
python:
version: 0.7.3
version: 0.7.0
additionalDependencies:
dev: {}
main: {}
+2 -22
View File
@@ -3574,7 +3574,6 @@ components:
- Inceptron
- InferenceNet
- Infermatic
- Io Net
- Inflection
- Liquid
- Mara
@@ -7546,6 +7545,7 @@ components:
required:
- prompt
- completion
additionalProperties: false
description: Pricing information for the model
example:
prompt: '0.00003'
@@ -8053,6 +8053,7 @@ components:
required:
- prompt
- completion
additionalProperties: false
provider_name:
$ref: '#/components/schemas/ProviderName'
tag:
@@ -8387,7 +8388,6 @@ components:
- Inceptron
- InferenceNet
- Infermatic
- Io Net
- Inflection
- Liquid
- Mara
@@ -9106,8 +9106,6 @@ components:
- type: 'null'
required:
- name
cache_control:
$ref: '#/components/schemas/ChatMessageContentItemCacheControl'
required:
- type
- function
@@ -9301,10 +9299,6 @@ components:
minimum: 0
maximum: 2
- type: 'null'
parallel_tool_calls:
anyOf:
- type: boolean
- type: 'null'
tool_choice:
$ref: '#/components/schemas/ToolChoiceOption'
tools:
@@ -10622,7 +10616,6 @@ paths:
- Inceptron
- InferenceNet
- Infermatic
- Io Net
- Inflection
- Liquid
- Mara
@@ -13775,19 +13768,6 @@ paths:
nullable: true
format: date-time
description: Optional expiration time for the API key to be created
key_label:
type: string
maxLength: 100
description: Optional custom label for the API key. Defaults to the app name if not provided.
example: My Custom Key
usage_limit_type:
type: string
enum:
- daily
- weekly
- monthly
description: Optional credit limit reset interval. When set, the credit limit resets on this interval.
example: monthly
required:
- callback_url
example:
+2 -23
View File
@@ -3593,7 +3593,6 @@ components:
- Inceptron
- InferenceNet
- Infermatic
- Io Net
- Inflection
- Liquid
- Mara
@@ -7552,6 +7551,7 @@ components:
required:
- prompt
- completion
additionalProperties: false
description: Pricing information for the model
example:
prompt: '0.00003'
@@ -8065,6 +8065,7 @@ components:
required:
- prompt
- completion
additionalProperties: false
provider_name:
$ref: '#/components/schemas/ProviderName'
tag:
@@ -8383,7 +8384,6 @@ components:
- Inceptron
- InferenceNet
- Infermatic
- Io Net
- Inflection
- Liquid
- Mara
@@ -9110,8 +9110,6 @@ components:
- type: 'null'
required:
- name
cache_control:
$ref: '#/components/schemas/ChatMessageContentItemCacheControl'
required:
- type
- function
@@ -9303,10 +9301,6 @@ components:
minimum: 0
maximum: 2
- type: 'null'
parallel_tool_calls:
anyOf:
- type: boolean
- type: 'null'
tool_choice:
$ref: '#/components/schemas/ToolChoiceOption'
tools:
@@ -10645,7 +10639,6 @@ paths:
- Inceptron
- InferenceNet
- Infermatic
- Io Net
- Inflection
- Liquid
- Mara
@@ -13834,20 +13827,6 @@ paths:
nullable: true
format: date-time
description: Optional expiration time for the API key to be created
key_label:
type: string
maxLength: 100
description: Optional custom label for the API key. Defaults to the app name if not provided.
example: My Custom Key
usage_limit_type:
type: string
enum:
- daily
- weekly
- monthly
description: Optional credit limit reset interval. When set, the credit limit resets on this interval.
example: monthly
x-speakeasy-unknown-values: allow
required:
- callback_url
example:
+5 -5
View File
@@ -8,8 +8,8 @@ sources:
- latest
OpenRouter API:
sourceNamespace: open-router-chat-completions-api
sourceRevisionDigest: sha256:c35c30cefa7374fca9158283ca25f10c981f1098509d9e4ac03cbfed356479df
sourceBlobDigest: sha256:c09875e3f18d78b78c948d40ec1a5ac7af9be1725db1ee5c7cd2bbe8bb446ffb
sourceRevisionDigest: sha256:79b8d064e91a2614d9853eb640f9e7255a8b1e9614882641ab5c75ac071814d6
sourceBlobDigest: sha256:b74fe6d34af037172e5b80f6d03b85df45eb5360577027682ea7d3fd308e8293
tags:
- latest
- main
@@ -18,10 +18,10 @@ targets:
open-router:
source: OpenRouter API
sourceNamespace: open-router-chat-completions-api
sourceRevisionDigest: sha256:c35c30cefa7374fca9158283ca25f10c981f1098509d9e4ac03cbfed356479df
sourceBlobDigest: sha256:c09875e3f18d78b78c948d40ec1a5ac7af9be1725db1ee5c7cd2bbe8bb446ffb
sourceRevisionDigest: sha256:79b8d064e91a2614d9853eb640f9e7255a8b1e9614882641ab5c75ac071814d6
sourceBlobDigest: sha256:b74fe6d34af037172e5b80f6d03b85df45eb5360577027682ea7d3fd308e8293
codeSamplesNamespace: open-router-python-code-samples
codeSamplesRevisionDigest: sha256:0fdbb46fc2029d053bd04962e251a7cd3cfcd96a19a31dcfce59f25cbf30b3b1
codeSamplesRevisionDigest: sha256:ff5b83e50996943aaf26b9089fd02488fc49b8c5f742dc432135c8eeb69c7042
workflow:
workflowVersion: 1.0.0
speakeasyVersion: 1.666.0
-4
View File
@@ -182,8 +182,6 @@ import os
def main():
with OpenRouter(
http_referer="<value>",
x_title="<value>",
api_key=os.getenv("OPENROUTER_API_KEY", ""),
) as open_router:
# Rest of application here...
@@ -193,8 +191,6 @@ def main():
async def amain():
async with OpenRouter(
http_referer="<value>",
x_title="<value>",
api_key=os.getenv("OPENROUTER_API_KEY", ""),
) as open_router:
# Rest of application here...
-1
View File
@@ -29,7 +29,6 @@
| `stream` | *Optional[bool]* | :heavy_minus_sign: | N/A |
| `stream_options` | [OptionalNullable[components.ChatStreamOptions]](../components/chatstreamoptions.md) | :heavy_minus_sign: | N/A |
| `temperature` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `parallel_tool_calls` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A |
| `tool_choice` | *Optional[Any]* | :heavy_minus_sign: | N/A |
| `tools` | List[[components.ToolDefinitionJSON](../components/tooldefinitionjson.md)] | :heavy_minus_sign: | N/A |
| `top_p` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
-1
View File
@@ -40,7 +40,6 @@
| `INCEPTRON` | Inceptron |
| `INFERENCE_NET` | InferenceNet |
| `INFERMATIC` | Infermatic |
| `IO_NET` | Io Net |
| `INFLECTION` | Inflection |
| `LIQUID` | Liquid |
| `MARA` | Mara |
-1
View File
@@ -40,7 +40,6 @@
| `INCEPTRON` | Inceptron |
| `INFERENCE_NET` | InferenceNet |
| `INFERMATIC` | Infermatic |
| `IO_NET` | Io Net |
| `INFLECTION` | Inflection |
| `LIQUID` | Liquid |
| `MARA` | Mara |
+4 -5
View File
@@ -3,8 +3,7 @@
## Fields
| Field | Type | Required | Description |
| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- |
| `type` | *Literal["function"]* | :heavy_check_mark: | N/A |
| `function` | [components.ToolDefinitionJSONFunction](../components/tooldefinitionjsonfunction.md) | :heavy_check_mark: | N/A |
| `cache_control` | [Optional[components.ChatMessageContentItemCacheControl]](../components/chatmessagecontentitemcachecontrol.md) | :heavy_minus_sign: | N/A |
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ |
| `type` | *Literal["function"]* | :heavy_check_mark: | N/A |
| `function` | [components.ToolDefinitionJSONFunction](../components/tooldefinitionjsonfunction.md) | :heavy_check_mark: | N/A |
@@ -10,5 +10,3 @@
| `code_challenge_method` | [Optional[operations.CreateAuthKeysCodeCodeChallengeMethod]](../operations/createauthkeyscodecodechallengemethod.md) | :heavy_minus_sign: | The method used to generate the code challenge | S256 |
| `limit` | *Optional[float]* | :heavy_minus_sign: | Credit limit for the API key to be created | 100 |
| `expires_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Optional expiration time for the API key to be created | |
| `key_label` | *Optional[str]* | :heavy_minus_sign: | Optional custom label for the API key. Defaults to the app name if not provided. | My Custom Key |
| `usage_limit_type` | [Optional[operations.UsageLimitType]](../operations/usagelimittype.md) | :heavy_minus_sign: | Optional credit limit reset interval. When set, the credit limit resets on this interval. | monthly |
-1
View File
@@ -68,7 +68,6 @@
| `INCEPTRON` | Inceptron |
| `INFERENCE_NET` | InferenceNet |
| `INFERMATIC` | Infermatic |
| `IO_NET` | Io Net |
| `INFLECTION` | Inflection |
| `LIQUID` | Liquid |
| `MARA` | Mara |
-12
View File
@@ -1,12 +0,0 @@
# UsageLimitType
Optional credit limit reset interval. When set, the credit limit resets on this interval.
## Values
| Name | Value |
| --------- | --------- |
| `DAILY` | daily |
| `WEEKLY` | weekly |
| `MONTHLY` | monthly |
-1
View File
@@ -64,7 +64,6 @@ with OpenRouter(
| `stream` | *Optional[bool]* | :heavy_minus_sign: | N/A |
| `stream_options` | [OptionalNullable[components.ChatStreamOptions]](../../components/chatstreamoptions.md) | :heavy_minus_sign: | N/A |
| `temperature` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `parallel_tool_calls` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A |
| `tool_choice` | *Optional[Any]* | :heavy_minus_sign: | N/A |
| `tools` | List[[components.ToolDefinitionJSON](../../components/tooldefinitionjson.md)] | :heavy_minus_sign: | N/A |
| `top_p` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
-2
View File
@@ -95,8 +95,6 @@ with OpenRouter(
| `code_challenge_method` | [Optional[operations.CreateAuthKeysCodeCodeChallengeMethod]](../../operations/createauthkeyscodecodechallengemethod.md) | :heavy_minus_sign: | The method used to generate the code challenge | S256 |
| `limit` | *Optional[float]* | :heavy_minus_sign: | Credit limit for the API key to be created | 100 |
| `expires_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Optional expiration time for the API key to be created | |
| `key_label` | *Optional[str]* | :heavy_minus_sign: | Optional custom label for the API key. Defaults to the app name if not provided. | My Custom Key |
| `usage_limit_type` | [Optional[operations.UsageLimitType]](../../operations/usagelimittype.md) | :heavy_minus_sign: | Optional credit limit reset interval. When set, the credit limit resets on this interval. | monthly |
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
### Response
+1 -1
View File
@@ -1,6 +1,6 @@
[project]
name = "openrouter"
version = "0.7.3"
version = "0.7.0"
description = "Official Python Client SDK for OpenRouter."
authors = [{ name = "OpenRouter" },]
readme = "README-PYPI.md"
+2 -2
View File
@@ -3,10 +3,10 @@
import importlib.metadata
__title__: str = "openrouter"
__version__: str = "0.7.3"
__version__: str = "0.7.0"
__openapi_doc_version__: str = "1.0.0"
__gen_version__: str = "2.768.0"
__user_agent__: str = "speakeasy-sdk/python 0.7.3 2.768.0 1.0.0 openrouter"
__user_agent__: str = "speakeasy-sdk/python 0.7.0 2.768.0 1.0.0 openrouter"
try:
if __package__ is not None:
-14
View File
@@ -60,7 +60,6 @@ class Chat(BaseSDK):
Union[components.ChatStreamOptions, components.ChatStreamOptionsTypedDict]
] = UNSET,
temperature: OptionalNullable[float] = UNSET,
parallel_tool_calls: OptionalNullable[bool] = UNSET,
tool_choice: Optional[Any] = None,
tools: Optional[
Union[
@@ -115,7 +114,6 @@ class Chat(BaseSDK):
:param stream:
:param stream_options:
:param temperature:
:param parallel_tool_calls:
:param tool_choice:
:param tools:
:param top_p:
@@ -173,7 +171,6 @@ class Chat(BaseSDK):
Union[components.ChatStreamOptions, components.ChatStreamOptionsTypedDict]
] = UNSET,
temperature: OptionalNullable[float] = UNSET,
parallel_tool_calls: OptionalNullable[bool] = UNSET,
tool_choice: Optional[Any] = None,
tools: Optional[
Union[
@@ -228,7 +225,6 @@ class Chat(BaseSDK):
:param stream:
:param stream_options:
:param temperature:
:param parallel_tool_calls:
:param tool_choice:
:param tools:
:param top_p:
@@ -285,7 +281,6 @@ class Chat(BaseSDK):
Union[components.ChatStreamOptions, components.ChatStreamOptionsTypedDict]
] = UNSET,
temperature: OptionalNullable[float] = UNSET,
parallel_tool_calls: OptionalNullable[bool] = UNSET,
tool_choice: Optional[Any] = None,
tools: Optional[
Union[
@@ -340,7 +335,6 @@ class Chat(BaseSDK):
:param stream:
:param stream_options:
:param temperature:
:param parallel_tool_calls:
:param tool_choice:
:param tools:
:param top_p:
@@ -401,7 +395,6 @@ class Chat(BaseSDK):
stream_options, OptionalNullable[components.ChatStreamOptions]
),
temperature=temperature,
parallel_tool_calls=parallel_tool_calls,
tool_choice=tool_choice,
tools=utils.get_pydantic_model(
tools, Optional[List[components.ToolDefinitionJSON]]
@@ -552,7 +545,6 @@ class Chat(BaseSDK):
Union[components.ChatStreamOptions, components.ChatStreamOptionsTypedDict]
] = UNSET,
temperature: OptionalNullable[float] = UNSET,
parallel_tool_calls: OptionalNullable[bool] = UNSET,
tool_choice: Optional[Any] = None,
tools: Optional[
Union[
@@ -607,7 +599,6 @@ class Chat(BaseSDK):
:param stream:
:param stream_options:
:param temperature:
:param parallel_tool_calls:
:param tool_choice:
:param tools:
:param top_p:
@@ -665,7 +656,6 @@ class Chat(BaseSDK):
Union[components.ChatStreamOptions, components.ChatStreamOptionsTypedDict]
] = UNSET,
temperature: OptionalNullable[float] = UNSET,
parallel_tool_calls: OptionalNullable[bool] = UNSET,
tool_choice: Optional[Any] = None,
tools: Optional[
Union[
@@ -720,7 +710,6 @@ class Chat(BaseSDK):
:param stream:
:param stream_options:
:param temperature:
:param parallel_tool_calls:
:param tool_choice:
:param tools:
:param top_p:
@@ -777,7 +766,6 @@ class Chat(BaseSDK):
Union[components.ChatStreamOptions, components.ChatStreamOptionsTypedDict]
] = UNSET,
temperature: OptionalNullable[float] = UNSET,
parallel_tool_calls: OptionalNullable[bool] = UNSET,
tool_choice: Optional[Any] = None,
tools: Optional[
Union[
@@ -832,7 +820,6 @@ class Chat(BaseSDK):
:param stream:
:param stream_options:
:param temperature:
:param parallel_tool_calls:
:param tool_choice:
:param tools:
:param top_p:
@@ -893,7 +880,6 @@ class Chat(BaseSDK):
stream_options, OptionalNullable[components.ChatStreamOptions]
),
temperature=temperature,
parallel_tool_calls=parallel_tool_calls,
tool_choice=tool_choice,
tools=utils.get_pydantic_model(
tools, Optional[List[components.ToolDefinitionJSON]]
-1
View File
@@ -45,7 +45,6 @@ Schema5Enum = Union[
"Inceptron",
"InferenceNet",
"Infermatic",
"Io Net",
"Inflection",
"Liquid",
"Mara",
@@ -404,7 +404,6 @@ class ChatGenerationParamsTypedDict(TypedDict):
stream: NotRequired[bool]
stream_options: NotRequired[Nullable[ChatStreamOptionsTypedDict]]
temperature: NotRequired[Nullable[float]]
parallel_tool_calls: NotRequired[Nullable[bool]]
tool_choice: NotRequired[Any]
tools: NotRequired[List[ToolDefinitionJSONTypedDict]]
top_p: NotRequired[Nullable[float]]
@@ -464,8 +463,6 @@ class ChatGenerationParams(BaseModel):
temperature: OptionalNullable[float] = UNSET
parallel_tool_calls: OptionalNullable[bool] = UNSET
tool_choice: Optional[Any] = None
tools: Optional[List[ToolDefinitionJSON]] = None
@@ -506,7 +503,6 @@ class ChatGenerationParams(BaseModel):
"stream",
"stream_options",
"temperature",
"parallel_tool_calls",
"tool_choice",
"tools",
"top_p",
@@ -528,7 +524,6 @@ class ChatGenerationParams(BaseModel):
"stop",
"stream_options",
"temperature",
"parallel_tool_calls",
"top_p",
]
null_default_fields = []
@@ -42,7 +42,6 @@ ProviderName = Union[
"Inceptron",
"InferenceNet",
"Infermatic",
"Io Net",
"Inflection",
"Liquid",
"Mara",
@@ -1,10 +1,6 @@
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
from __future__ import annotations
from .chatmessagecontentitemcachecontrol import (
ChatMessageContentItemCacheControl,
ChatMessageContentItemCacheControlTypedDict,
)
from openrouter.types import (
BaseModel,
Nullable,
@@ -70,7 +66,6 @@ class ToolDefinitionJSONFunction(BaseModel):
class ToolDefinitionJSONTypedDict(TypedDict):
function: ToolDefinitionJSONFunctionTypedDict
type: Literal["function"]
cache_control: NotRequired[ChatMessageContentItemCacheControlTypedDict]
class ToolDefinitionJSON(BaseModel):
@@ -80,5 +75,3 @@ class ToolDefinitionJSON(BaseModel):
Annotated[Literal["function"], AfterValidator(validate_const("function"))],
pydantic.Field(alias="type"),
] = "function"
cache_control: Optional[ChatMessageContentItemCacheControl] = None
-12
View File
@@ -297,8 +297,6 @@ class OAuth(BaseSDK):
] = None,
limit: Optional[float] = None,
expires_at: OptionalNullable[datetime] = UNSET,
key_label: Optional[str] = None,
usage_limit_type: Optional[operations.UsageLimitType] = None,
retries: OptionalNullable[utils.RetryConfig] = UNSET,
server_url: Optional[str] = None,
timeout_ms: Optional[int] = None,
@@ -318,8 +316,6 @@ class OAuth(BaseSDK):
:param code_challenge_method: The method used to generate the code challenge
:param limit: Credit limit for the API key to be created
:param expires_at: Optional expiration time for the API key to be created
:param key_label: Optional custom label for the API key. Defaults to the app name if not provided.
:param usage_limit_type: Optional credit limit reset interval. When set, the credit limit resets on this interval.
:param retries: Override the default retry configuration for this method
:param server_url: Override the default server URL for this method
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
@@ -344,8 +340,6 @@ class OAuth(BaseSDK):
code_challenge_method=code_challenge_method,
limit=limit,
expires_at=expires_at,
key_label=key_label,
usage_limit_type=usage_limit_type,
),
)
@@ -445,8 +439,6 @@ class OAuth(BaseSDK):
] = None,
limit: Optional[float] = None,
expires_at: OptionalNullable[datetime] = UNSET,
key_label: Optional[str] = None,
usage_limit_type: Optional[operations.UsageLimitType] = None,
retries: OptionalNullable[utils.RetryConfig] = UNSET,
server_url: Optional[str] = None,
timeout_ms: Optional[int] = None,
@@ -466,8 +458,6 @@ class OAuth(BaseSDK):
:param code_challenge_method: The method used to generate the code challenge
:param limit: Credit limit for the API key to be created
:param expires_at: Optional expiration time for the API key to be created
:param key_label: Optional custom label for the API key. Defaults to the app name if not provided.
:param usage_limit_type: Optional credit limit reset interval. When set, the credit limit resets on this interval.
:param retries: Override the default retry configuration for this method
:param server_url: Override the default server URL for this method
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
@@ -492,8 +482,6 @@ class OAuth(BaseSDK):
code_challenge_method=code_challenge_method,
limit=limit,
expires_at=expires_at,
key_label=key_label,
usage_limit_type=usage_limit_type,
),
)
-3
View File
@@ -58,7 +58,6 @@ if TYPE_CHECKING:
CreateAuthKeysCodeRequestTypedDict,
CreateAuthKeysCodeResponse,
CreateAuthKeysCodeResponseTypedDict,
UsageLimitType,
)
from .createcoinbasecharge import (
CallData,
@@ -708,7 +707,6 @@ __all__ = [
"UpdateKeysResponse",
"UpdateKeysResponseTypedDict",
"Usage",
"UsageLimitType",
"UsageTypedDict",
"Web3Data",
"Web3DataTypedDict",
@@ -758,7 +756,6 @@ _dynamic_imports: dict[str, str] = {
"CreateAuthKeysCodeRequestTypedDict": ".createauthkeyscode",
"CreateAuthKeysCodeResponse": ".createauthkeyscode",
"CreateAuthKeysCodeResponseTypedDict": ".createauthkeyscode",
"UsageLimitType": ".createauthkeyscode",
"CallData": ".createcoinbasecharge",
"CallDataTypedDict": ".createcoinbasecharge",
"CreateCoinbaseChargeData": ".createcoinbasecharge",
@@ -66,17 +66,6 @@ CreateAuthKeysCodeCodeChallengeMethod = Union[
r"""The method used to generate the code challenge"""
UsageLimitType = Union[
Literal[
"daily",
"weekly",
"monthly",
],
UnrecognizedStr,
]
r"""Optional credit limit reset interval. When set, the credit limit resets on this interval."""
class CreateAuthKeysCodeRequestBodyTypedDict(TypedDict):
callback_url: str
r"""The callback URL to redirect to after authorization. Note, only https URLs on ports 443 and 3000 are allowed."""
@@ -88,10 +77,6 @@ class CreateAuthKeysCodeRequestBodyTypedDict(TypedDict):
r"""Credit limit for the API key to be created"""
expires_at: NotRequired[Nullable[datetime]]
r"""Optional expiration time for the API key to be created"""
key_label: NotRequired[str]
r"""Optional custom label for the API key. Defaults to the app name if not provided."""
usage_limit_type: NotRequired[UsageLimitType]
r"""Optional credit limit reset interval. When set, the credit limit resets on this interval."""
class CreateAuthKeysCodeRequestBody(BaseModel):
@@ -113,14 +98,6 @@ class CreateAuthKeysCodeRequestBody(BaseModel):
expires_at: OptionalNullable[datetime] = UNSET
r"""Optional expiration time for the API key to be created"""
key_label: Optional[str] = None
r"""Optional custom label for the API key. Defaults to the app name if not provided."""
usage_limit_type: Annotated[
Optional[UsageLimitType], PlainValidator(validate_open_enum(False))
] = None
r"""Optional credit limit reset interval. When set, the credit limit resets on this interval."""
@model_serializer(mode="wrap")
def serialize_model(self, handler):
optional_fields = [
@@ -128,8 +105,6 @@ class CreateAuthKeysCodeRequestBody(BaseModel):
"code_challenge_method",
"limit",
"expires_at",
"key_label",
"usage_limit_type",
]
nullable_fields = ["expires_at"]
null_default_fields = []
@@ -161,7 +161,6 @@ ProviderName = Union[
"Inceptron",
"InferenceNet",
"Infermatic",
"Io Net",
"Inflection",
"Liquid",
"Mara",
Generated
+1 -1
View File
@@ -211,7 +211,7 @@ wheels = [
[[package]]
name = "openrouter"
version = "0.7.3"
version = "0.2.0"
source = { editable = "." }
dependencies = [
{ name = "httpcore" },