mirror of
https://github.com/wassname/openrouter-python-sdk-retry-errors.git
synced 2026-07-29 11:23:49 +08:00
latest updates
This commit is contained in:
@@ -26,4 +26,5 @@
|
||||
| `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 |
|
||||
| `user` | *Optional[str]* | :heavy_minus_sign: | N/A |
|
||||
| `user` | *Optional[str]* | :heavy_minus_sign: | N/A |
|
||||
| `debug` | [Optional[components.Debug]](../components/debug.md) | :heavy_minus_sign: | N/A |
|
||||
@@ -1,14 +0,0 @@
|
||||
# ChatMessageContentItemAudioFormat
|
||||
|
||||
|
||||
## Values
|
||||
|
||||
| Name | Value |
|
||||
| ------- | ------- |
|
||||
| `WAV` | wav |
|
||||
| `MP3` | mp3 |
|
||||
| `FLAC` | flac |
|
||||
| `M4A` | m4a |
|
||||
| `OGG` | ogg |
|
||||
| `PCM16` | pcm16 |
|
||||
| `PCM24` | pcm24 |
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- |
|
||||
| `data` | *str* | :heavy_check_mark: | N/A |
|
||||
| `format_` | [components.ChatMessageContentItemAudioFormat](../components/chatmessagecontentitemaudioformat.md) | :heavy_check_mark: | N/A |
|
||||
| Field | Type | Required | Description |
|
||||
| ------------------ | ------------------ | ------------------ | ------------------ |
|
||||
| `data` | *str* | :heavy_check_mark: | N/A |
|
||||
| `format_` | *str* | :heavy_check_mark: | N/A |
|
||||
@@ -0,0 +1,9 @@
|
||||
# ChatMessageContentItemCacheControl
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| `type` | *Literal["ephemeral"]* | :heavy_check_mark: | N/A |
|
||||
| `ttl` | [Optional[components.TTL]](../components/ttl.md) | :heavy_minus_sign: | N/A |
|
||||
@@ -3,7 +3,8 @@
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ------------------ | ------------------ | ------------------ | ------------------ |
|
||||
| `type` | *Literal["text"]* | :heavy_check_mark: | N/A |
|
||||
| `text` | *str* | :heavy_check_mark: | N/A |
|
||||
| Field | Type | Required | Description |
|
||||
| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- |
|
||||
| `type` | *Literal["text"]* | :heavy_check_mark: | N/A |
|
||||
| `text` | *str* | :heavy_check_mark: | N/A |
|
||||
| `cache_control` | [Optional[components.ChatMessageContentItemCacheControl]](../components/chatmessagecontentitemcachecontrol.md) | :heavy_minus_sign: | N/A |
|
||||
@@ -8,4 +8,6 @@
|
||||
| `text` | *str* | :heavy_check_mark: | N/A |
|
||||
| `index` | *float* | :heavy_check_mark: | N/A |
|
||||
| `logprobs` | [Nullable[components.CompletionLogprobs]](../components/completionlogprobs.md) | :heavy_check_mark: | N/A |
|
||||
| `finish_reason` | [Nullable[components.CompletionFinishReason]](../components/completionfinishreason.md) | :heavy_check_mark: | N/A |
|
||||
| `finish_reason` | [Nullable[components.CompletionFinishReason]](../components/completionfinishreason.md) | :heavy_check_mark: | N/A |
|
||||
| `native_finish_reason` | *Optional[str]* | :heavy_minus_sign: | N/A |
|
||||
| `reasoning` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
|
||||
@@ -9,6 +9,7 @@
|
||||
| `object` | *Literal["text_completion"]* | :heavy_check_mark: | N/A |
|
||||
| `created` | *float* | :heavy_check_mark: | N/A |
|
||||
| `model` | *str* | :heavy_check_mark: | N/A |
|
||||
| `provider` | *Optional[str]* | :heavy_minus_sign: | N/A |
|
||||
| `system_fingerprint` | *Optional[str]* | :heavy_minus_sign: | N/A |
|
||||
| `choices` | List[[components.CompletionChoice](../components/completionchoice.md)] | :heavy_check_mark: | N/A |
|
||||
| `usage` | [Optional[components.CompletionUsage]](../components/completionusage.md) | :heavy_minus_sign: | N/A |
|
||||
@@ -0,0 +1,8 @@
|
||||
# Debug
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| -------------------- | -------------------- | -------------------- | -------------------- |
|
||||
| `echo_upstream_body` | *Optional[bool]* | :heavy_minus_sign: | N/A |
|
||||
@@ -0,0 +1,8 @@
|
||||
# IDResponseHealing
|
||||
|
||||
|
||||
## Values
|
||||
|
||||
| Name | Value |
|
||||
| ------------------ | ------------------ |
|
||||
| `RESPONSE_HEALING` | response-healing |
|
||||
@@ -27,8 +27,8 @@ Request schema for Responses endpoint
|
||||
| `include` | List[[components.OpenAIResponsesIncludable](../components/openairesponsesincludable.md)] | :heavy_minus_sign: | N/A | |
|
||||
| `background` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | |
|
||||
| `safety_identifier` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
|
||||
| `store` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | |
|
||||
| `service_tier` | [OptionalNullable[components.ServiceTier]](../components/servicetier.md) | :heavy_minus_sign: | N/A | auto |
|
||||
| `store` | *Optional[Literal[False]]* | :heavy_minus_sign: | N/A | |
|
||||
| `service_tier` | [Optional[components.ServiceTier]](../components/servicetier.md) | :heavy_minus_sign: | N/A | |
|
||||
| `truncation` | [OptionalNullable[components.Truncation]](../components/truncation.md) | :heavy_minus_sign: | N/A | auto |
|
||||
| `stream` | *Optional[bool]* | :heavy_minus_sign: | N/A | |
|
||||
| `provider` | [OptionalNullable[components.Provider]](../components/provider.md) | :heavy_minus_sign: | When multiple model providers are available, optionally indicate your routing preference. | |
|
||||
|
||||
@@ -21,3 +21,9 @@ value: components.PluginWeb = /* values here */
|
||||
value: components.PluginFileParser = /* values here */
|
||||
```
|
||||
|
||||
### `components.PluginResponseHealing`
|
||||
|
||||
```python
|
||||
value: components.PluginResponseHealing = /* values here */
|
||||
```
|
||||
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
# PluginResponseHealing
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ |
|
||||
| `id` | [components.IDResponseHealing](../components/idresponsehealing.md) | :heavy_check_mark: | N/A |
|
||||
@@ -9,12 +9,14 @@
|
||||
| `AION_LABS` | AionLabs |
|
||||
| `ALIBABA` | Alibaba |
|
||||
| `AMAZON_BEDROCK` | Amazon Bedrock |
|
||||
| `AMAZON_NOVA` | Amazon Nova |
|
||||
| `ANTHROPIC` | Anthropic |
|
||||
| `ARCEE` | Arcee |
|
||||
| `ARCEE_AI` | Arcee AI |
|
||||
| `ATLAS_CLOUD` | AtlasCloud |
|
||||
| `AVIAN` | Avian |
|
||||
| `AZURE` | Azure |
|
||||
| `BASE_TEN` | BaseTen |
|
||||
| `BYTE_PLUS` | BytePlus |
|
||||
| `BLACK_FOREST_LABS` | Black Forest Labs |
|
||||
| `CEREBRAS` | Cerebras |
|
||||
| `CHUTES` | Chutes |
|
||||
@@ -29,6 +31,7 @@
|
||||
| `FIREWORKS` | Fireworks |
|
||||
| `FRIENDLI` | Friendli |
|
||||
| `GMI_CLOUD` | GMICloud |
|
||||
| `GO_POMELO` | GoPomelo |
|
||||
| `GOOGLE` | Google |
|
||||
| `GOOGLE_AI_STUDIO` | Google AI Studio |
|
||||
| `GROQ` | Groq |
|
||||
@@ -59,6 +62,7 @@
|
||||
| `SAMBA_NOVA` | SambaNova |
|
||||
| `SILICON_FLOW` | SiliconFlow |
|
||||
| `STEALTH` | Stealth |
|
||||
| `STREAM_LAKE` | StreamLake |
|
||||
| `SWITCHPOINT` | Switchpoint |
|
||||
| `TARGON` | Targon |
|
||||
| `TOGETHER` | Together |
|
||||
|
||||
@@ -3,10 +3,6 @@
|
||||
|
||||
## Values
|
||||
|
||||
| Name | Value |
|
||||
| ---------- | ---------- |
|
||||
| `AUTO` | auto |
|
||||
| `DEFAULT` | default |
|
||||
| `FLEX` | flex |
|
||||
| `PRIORITY` | priority |
|
||||
| `SCALE` | scale |
|
||||
| Name | Value |
|
||||
| ------ | ------ |
|
||||
| `AUTO` | auto |
|
||||
@@ -0,0 +1,9 @@
|
||||
# TTL
|
||||
|
||||
|
||||
## Values
|
||||
|
||||
| Name | Value |
|
||||
| ------- | ------- |
|
||||
| `FIVEM` | 5m |
|
||||
| `ONEH` | 1h |
|
||||
@@ -0,0 +1,9 @@
|
||||
# Globals
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.<br/>This is used to track API usage per application.<br/> |
|
||||
| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> |
|
||||
@@ -1,17 +1,14 @@
|
||||
# CreateEmbeddingsResponse
|
||||
|
||||
Embedding response
|
||||
|
||||
## Supported Types
|
||||
|
||||
### `operations.CreateEmbeddingsResponseBody`
|
||||
|
||||
```python
|
||||
value: operations.CreateEmbeddingsResponseBody = /* values here */
|
||||
```
|
||||
|
||||
### `str`
|
||||
|
||||
```python
|
||||
value: str = /* values here */
|
||||
```
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ |
|
||||
| `id` | *Optional[str]* | :heavy_minus_sign: | N/A |
|
||||
| `object` | [operations.Object](../operations/object.md) | :heavy_check_mark: | N/A |
|
||||
| `data` | List[[operations.CreateEmbeddingsData](../operations/createembeddingsdata.md)] | :heavy_check_mark: | N/A |
|
||||
| `model` | *str* | :heavy_check_mark: | N/A |
|
||||
| `usage` | [Optional[operations.Usage]](../operations/usage.md) | :heavy_minus_sign: | N/A |
|
||||
@@ -1,14 +0,0 @@
|
||||
# CreateEmbeddingsResponseBody
|
||||
|
||||
Embedding response
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ |
|
||||
| `id` | *Optional[str]* | :heavy_minus_sign: | N/A |
|
||||
| `object` | [operations.Object](../operations/object.md) | :heavy_check_mark: | N/A |
|
||||
| `data` | List[[operations.CreateEmbeddingsData](../operations/createembeddingsdata.md)] | :heavy_check_mark: | N/A |
|
||||
| `model` | *str* | :heavy_check_mark: | N/A |
|
||||
| `usage` | [Optional[operations.Usage]](../operations/usage.md) | :heavy_minus_sign: | N/A |
|
||||
@@ -0,0 +1,9 @@
|
||||
# GetCreditsData
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ----------------------- | ----------------------- | ----------------------- | ----------------------- | ----------------------- |
|
||||
| `total_credits` | *float* | :heavy_check_mark: | Total credits purchased | 100.5 |
|
||||
| `total_usage` | *float* | :heavy_check_mark: | Total credits used | 25.75 |
|
||||
@@ -5,5 +5,6 @@ Total credits purchased and used
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ----------- | ----------- | ----------- | ----------- |
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ |
|
||||
| `data` | [operations.GetCreditsData](../operations/getcreditsdata.md) | :heavy_check_mark: | N/A | {<br/>"total_credits": 100.5,<br/>"total_usage": 25.75<br/>} |
|
||||
@@ -9,12 +9,14 @@
|
||||
| `AION_LABS` | AionLabs |
|
||||
| `ALIBABA` | Alibaba |
|
||||
| `AMAZON_BEDROCK` | Amazon Bedrock |
|
||||
| `AMAZON_NOVA` | Amazon Nova |
|
||||
| `ANTHROPIC` | Anthropic |
|
||||
| `ARCEE` | Arcee |
|
||||
| `ARCEE_AI` | Arcee AI |
|
||||
| `ATLAS_CLOUD` | AtlasCloud |
|
||||
| `AVIAN` | Avian |
|
||||
| `AZURE` | Azure |
|
||||
| `BASE_TEN` | BaseTen |
|
||||
| `BYTE_PLUS` | BytePlus |
|
||||
| `BLACK_FOREST_LABS` | Black Forest Labs |
|
||||
| `CEREBRAS` | Cerebras |
|
||||
| `CHUTES` | Chutes |
|
||||
@@ -29,6 +31,7 @@
|
||||
| `FIREWORKS` | Fireworks |
|
||||
| `FRIENDLI` | Friendli |
|
||||
| `GMI_CLOUD` | GMICloud |
|
||||
| `GO_POMELO` | GoPomelo |
|
||||
| `GOOGLE` | Google |
|
||||
| `GOOGLE_AI_STUDIO` | Google AI Studio |
|
||||
| `GROQ` | Groq |
|
||||
@@ -59,6 +62,7 @@
|
||||
| `SAMBA_NOVA` | SambaNova |
|
||||
| `SILICON_FLOW` | SiliconFlow |
|
||||
| `STEALTH` | Stealth |
|
||||
| `STREAM_LAKE` | StreamLake |
|
||||
| `SWITCHPOINT` | Switchpoint |
|
||||
| `TARGON` | Targon |
|
||||
| `TOGETHER` | Together |
|
||||
|
||||
@@ -58,6 +58,7 @@ with OpenRouter(
|
||||
| `tools` | List[[components.ToolDefinitionJSON](../../components/tooldefinitionjson.md)] | :heavy_minus_sign: | N/A |
|
||||
| `top_p` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
|
||||
| `user` | *Optional[str]* | :heavy_minus_sign: | N/A |
|
||||
| `debug` | [Optional[components.Debug]](../../components/debug.md) | :heavy_minus_sign: | N/A |
|
||||
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
|
||||
|
||||
### Response
|
||||
|
||||
@@ -112,8 +112,7 @@ with OpenRouter(
|
||||
| `include` | List[[components.OpenAIResponsesIncludable](../../components/openairesponsesincludable.md)] | :heavy_minus_sign: | N/A | |
|
||||
| `background` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | |
|
||||
| `safety_identifier` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
|
||||
| `store` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | |
|
||||
| `service_tier` | [OptionalNullable[components.ServiceTier]](../../components/servicetier.md) | :heavy_minus_sign: | N/A | auto |
|
||||
| `service_tier` | [Optional[components.ServiceTier]](../../components/servicetier.md) | :heavy_minus_sign: | N/A | |
|
||||
| `truncation` | [OptionalNullable[components.Truncation]](../../components/truncation.md) | :heavy_minus_sign: | N/A | auto |
|
||||
| `stream` | *Optional[bool]* | :heavy_minus_sign: | N/A | |
|
||||
| `provider` | [OptionalNullable[components.Provider]](../../components/provider.md) | :heavy_minus_sign: | When multiple model providers are available, optionally indicate your routing preference. | |
|
||||
|
||||
Reference in New Issue
Block a user