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