Compare commits

..
1 Commits
Author SHA1 Message Date
OpenRouter Team 9bd5d826d8 Commits included in this export:
- 45687f423707f5838461585c568a024a19eb2f06
  - 3103d3ca68b6e42ccdb6136588ec2b6edc8dcab0
  - fd9f991606027cd86116317c71f8eb7b4e2aa3eb
  - 0f312019161edd76c1e5923d142c788d22f096d5
  - 5dbab2094bc744db4a90b3097520d897e5d0d634
  - 4c47d1af1735db18a1c1a7f463e801c7f71ad4e5

GitOrigin-RevId: 45687f423707f5838461585c568a024a19eb2f06
2026-02-20 19:10:44 +00:00
27 changed files with 159 additions and 22 deletions
+4 -3
View File
@@ -1,12 +1,12 @@
lockVersion: 2.0.0
id: cfd52247-6a25-4c6d-bbce-fe6fce0cd69d
management:
docChecksum: a8fed71df7458c6d948fc393e17aa9bc
docChecksum: 44cf69670d08f875912803fcbf819e62
docVersion: 1.0.0
speakeasyVersion: 1.666.0
generationVersion: 2.768.0
releaseVersion: 0.7.0
configChecksum: fb83a92d2ee84da7390a12353d622d23
releaseVersion: 0.7.3
configChecksum: b2d1a05e03508d9e74db24120e9e88e2
repoURL: https://github.com/OpenRouterTeam/python-sdk.git
installationURL: https://github.com/OpenRouterTeam/python-sdk.git
published: true
@@ -666,6 +666,7 @@ 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.0
version: 0.7.3
additionalDependencies:
dev: {}
main: {}
+22 -2
View File
@@ -3574,6 +3574,7 @@ components:
- Inceptron
- InferenceNet
- Infermatic
- Io Net
- Inflection
- Liquid
- Mara
@@ -7545,7 +7546,6 @@ components:
required:
- prompt
- completion
additionalProperties: false
description: Pricing information for the model
example:
prompt: '0.00003'
@@ -8053,7 +8053,6 @@ components:
required:
- prompt
- completion
additionalProperties: false
provider_name:
$ref: '#/components/schemas/ProviderName'
tag:
@@ -8388,6 +8387,7 @@ components:
- Inceptron
- InferenceNet
- Infermatic
- Io Net
- Inflection
- Liquid
- Mara
@@ -9106,6 +9106,8 @@ components:
- type: 'null'
required:
- name
cache_control:
$ref: '#/components/schemas/ChatMessageContentItemCacheControl'
required:
- type
- function
@@ -9299,6 +9301,10 @@ components:
minimum: 0
maximum: 2
- type: 'null'
parallel_tool_calls:
anyOf:
- type: boolean
- type: 'null'
tool_choice:
$ref: '#/components/schemas/ToolChoiceOption'
tools:
@@ -10616,6 +10622,7 @@ paths:
- Inceptron
- InferenceNet
- Infermatic
- Io Net
- Inflection
- Liquid
- Mara
@@ -13768,6 +13775,19 @@ 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:
+23 -2
View File
@@ -3593,6 +3593,7 @@ components:
- Inceptron
- InferenceNet
- Infermatic
- Io Net
- Inflection
- Liquid
- Mara
@@ -7551,7 +7552,6 @@ components:
required:
- prompt
- completion
additionalProperties: false
description: Pricing information for the model
example:
prompt: '0.00003'
@@ -8065,7 +8065,6 @@ components:
required:
- prompt
- completion
additionalProperties: false
provider_name:
$ref: '#/components/schemas/ProviderName'
tag:
@@ -8384,6 +8383,7 @@ components:
- Inceptron
- InferenceNet
- Infermatic
- Io Net
- Inflection
- Liquid
- Mara
@@ -9110,6 +9110,8 @@ components:
- type: 'null'
required:
- name
cache_control:
$ref: '#/components/schemas/ChatMessageContentItemCacheControl'
required:
- type
- function
@@ -9301,6 +9303,10 @@ components:
minimum: 0
maximum: 2
- type: 'null'
parallel_tool_calls:
anyOf:
- type: boolean
- type: 'null'
tool_choice:
$ref: '#/components/schemas/ToolChoiceOption'
tools:
@@ -10639,6 +10645,7 @@ paths:
- Inceptron
- InferenceNet
- Infermatic
- Io Net
- Inflection
- Liquid
- Mara
@@ -13827,6 +13834,20 @@ 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:79b8d064e91a2614d9853eb640f9e7255a8b1e9614882641ab5c75ac071814d6
sourceBlobDigest: sha256:b74fe6d34af037172e5b80f6d03b85df45eb5360577027682ea7d3fd308e8293
sourceRevisionDigest: sha256:c35c30cefa7374fca9158283ca25f10c981f1098509d9e4ac03cbfed356479df
sourceBlobDigest: sha256:c09875e3f18d78b78c948d40ec1a5ac7af9be1725db1ee5c7cd2bbe8bb446ffb
tags:
- latest
- main
@@ -18,10 +18,10 @@ targets:
open-router:
source: OpenRouter API
sourceNamespace: open-router-chat-completions-api
sourceRevisionDigest: sha256:79b8d064e91a2614d9853eb640f9e7255a8b1e9614882641ab5c75ac071814d6
sourceBlobDigest: sha256:b74fe6d34af037172e5b80f6d03b85df45eb5360577027682ea7d3fd308e8293
sourceRevisionDigest: sha256:c35c30cefa7374fca9158283ca25f10c981f1098509d9e4ac03cbfed356479df
sourceBlobDigest: sha256:c09875e3f18d78b78c948d40ec1a5ac7af9be1725db1ee5c7cd2bbe8bb446ffb
codeSamplesNamespace: open-router-python-code-samples
codeSamplesRevisionDigest: sha256:ff5b83e50996943aaf26b9089fd02488fc49b8c5f742dc432135c8eeb69c7042
codeSamplesRevisionDigest: sha256:0fdbb46fc2029d053bd04962e251a7cd3cfcd96a19a31dcfce59f25cbf30b3b1
workflow:
workflowVersion: 1.0.0
speakeasyVersion: 1.666.0
+4
View File
@@ -182,6 +182,8 @@ 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...
@@ -191,6 +193,8 @@ 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,6 +29,7 @@
| `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,6 +40,7 @@
| `INCEPTRON` | Inceptron |
| `INFERENCE_NET` | InferenceNet |
| `INFERMATIC` | Infermatic |
| `IO_NET` | Io Net |
| `INFLECTION` | Inflection |
| `LIQUID` | Liquid |
| `MARA` | Mara |
+1
View File
@@ -40,6 +40,7 @@
| `INCEPTRON` | Inceptron |
| `INFERENCE_NET` | InferenceNet |
| `INFERMATIC` | Infermatic |
| `IO_NET` | Io Net |
| `INFLECTION` | Inflection |
| `LIQUID` | Liquid |
| `MARA` | Mara |
+5 -4
View File
@@ -3,7 +3,8 @@
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ |
| `type` | *Literal["function"]* | :heavy_check_mark: | N/A |
| `function` | [components.ToolDefinitionJSONFunction](../components/tooldefinitionjsonfunction.md) | :heavy_check_mark: | 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 |
| `cache_control` | [Optional[components.ChatMessageContentItemCacheControl]](../components/chatmessagecontentitemcachecontrol.md) | :heavy_minus_sign: | N/A |
@@ -10,3 +10,5 @@
| `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,6 +68,7 @@
| `INCEPTRON` | Inceptron |
| `INFERENCE_NET` | InferenceNet |
| `INFERMATIC` | Infermatic |
| `IO_NET` | Io Net |
| `INFLECTION` | Inflection |
| `LIQUID` | Liquid |
| `MARA` | Mara |
+12
View File
@@ -0,0 +1,12 @@
# 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,6 +64,7 @@ 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,6 +95,8 @@ 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.0"
version = "0.7.3"
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.0"
__version__: str = "0.7.3"
__openapi_doc_version__: str = "1.0.0"
__gen_version__: str = "2.768.0"
__user_agent__: str = "speakeasy-sdk/python 0.7.0 2.768.0 1.0.0 openrouter"
__user_agent__: str = "speakeasy-sdk/python 0.7.3 2.768.0 1.0.0 openrouter"
try:
if __package__ is not None:
+14
View File
@@ -60,6 +60,7 @@ 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[
@@ -114,6 +115,7 @@ class Chat(BaseSDK):
:param stream:
:param stream_options:
:param temperature:
:param parallel_tool_calls:
:param tool_choice:
:param tools:
:param top_p:
@@ -171,6 +173,7 @@ 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[
@@ -225,6 +228,7 @@ class Chat(BaseSDK):
:param stream:
:param stream_options:
:param temperature:
:param parallel_tool_calls:
:param tool_choice:
:param tools:
:param top_p:
@@ -281,6 +285,7 @@ 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[
@@ -335,6 +340,7 @@ class Chat(BaseSDK):
:param stream:
:param stream_options:
:param temperature:
:param parallel_tool_calls:
:param tool_choice:
:param tools:
:param top_p:
@@ -395,6 +401,7 @@ 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]]
@@ -545,6 +552,7 @@ 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[
@@ -599,6 +607,7 @@ class Chat(BaseSDK):
:param stream:
:param stream_options:
:param temperature:
:param parallel_tool_calls:
:param tool_choice:
:param tools:
:param top_p:
@@ -656,6 +665,7 @@ 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[
@@ -710,6 +720,7 @@ class Chat(BaseSDK):
:param stream:
:param stream_options:
:param temperature:
:param parallel_tool_calls:
:param tool_choice:
:param tools:
:param top_p:
@@ -766,6 +777,7 @@ 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[
@@ -820,6 +832,7 @@ class Chat(BaseSDK):
:param stream:
:param stream_options:
:param temperature:
:param parallel_tool_calls:
:param tool_choice:
:param tools:
:param top_p:
@@ -880,6 +893,7 @@ 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,6 +45,7 @@ Schema5Enum = Union[
"Inceptron",
"InferenceNet",
"Infermatic",
"Io Net",
"Inflection",
"Liquid",
"Mara",
@@ -404,6 +404,7 @@ 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]]
@@ -463,6 +464,8 @@ class ChatGenerationParams(BaseModel):
temperature: OptionalNullable[float] = UNSET
parallel_tool_calls: OptionalNullable[bool] = UNSET
tool_choice: Optional[Any] = None
tools: Optional[List[ToolDefinitionJSON]] = None
@@ -503,6 +506,7 @@ class ChatGenerationParams(BaseModel):
"stream",
"stream_options",
"temperature",
"parallel_tool_calls",
"tool_choice",
"tools",
"top_p",
@@ -524,6 +528,7 @@ class ChatGenerationParams(BaseModel):
"stop",
"stream_options",
"temperature",
"parallel_tool_calls",
"top_p",
]
null_default_fields = []
@@ -42,6 +42,7 @@ ProviderName = Union[
"Inceptron",
"InferenceNet",
"Infermatic",
"Io Net",
"Inflection",
"Liquid",
"Mara",
@@ -1,6 +1,10 @@
"""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,
@@ -66,6 +70,7 @@ class ToolDefinitionJSONFunction(BaseModel):
class ToolDefinitionJSONTypedDict(TypedDict):
function: ToolDefinitionJSONFunctionTypedDict
type: Literal["function"]
cache_control: NotRequired[ChatMessageContentItemCacheControlTypedDict]
class ToolDefinitionJSON(BaseModel):
@@ -75,3 +80,5 @@ class ToolDefinitionJSON(BaseModel):
Annotated[Literal["function"], AfterValidator(validate_const("function"))],
pydantic.Field(alias="type"),
] = "function"
cache_control: Optional[ChatMessageContentItemCacheControl] = None
+12
View File
@@ -297,6 +297,8 @@ 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,
@@ -316,6 +318,8 @@ 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
@@ -340,6 +344,8 @@ 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,
),
)
@@ -439,6 +445,8 @@ 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,
@@ -458,6 +466,8 @@ 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
@@ -482,6 +492,8 @@ 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,6 +58,7 @@ if TYPE_CHECKING:
CreateAuthKeysCodeRequestTypedDict,
CreateAuthKeysCodeResponse,
CreateAuthKeysCodeResponseTypedDict,
UsageLimitType,
)
from .createcoinbasecharge import (
CallData,
@@ -707,6 +708,7 @@ __all__ = [
"UpdateKeysResponse",
"UpdateKeysResponseTypedDict",
"Usage",
"UsageLimitType",
"UsageTypedDict",
"Web3Data",
"Web3DataTypedDict",
@@ -756,6 +758,7 @@ _dynamic_imports: dict[str, str] = {
"CreateAuthKeysCodeRequestTypedDict": ".createauthkeyscode",
"CreateAuthKeysCodeResponse": ".createauthkeyscode",
"CreateAuthKeysCodeResponseTypedDict": ".createauthkeyscode",
"UsageLimitType": ".createauthkeyscode",
"CallData": ".createcoinbasecharge",
"CallDataTypedDict": ".createcoinbasecharge",
"CreateCoinbaseChargeData": ".createcoinbasecharge",
@@ -66,6 +66,17 @@ 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."""
@@ -77,6 +88,10 @@ 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):
@@ -98,6 +113,14 @@ 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 = [
@@ -105,6 +128,8 @@ class CreateAuthKeysCodeRequestBody(BaseModel):
"code_challenge_method",
"limit",
"expires_at",
"key_label",
"usage_limit_type",
]
nullable_fields = ["expires_at"]
null_default_fields = []
@@ -161,6 +161,7 @@ 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.2.0"
version = "0.7.3"
source = { editable = "." }
dependencies = [
{ name = "httpcore" },