mirror of
https://github.com/wassname/openrouter-python-sdk-retry-errors.git
synced 2026-07-31 12:30:30 +08:00
Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7f812f831d | ||
|
|
95cb1260c7 |
+6
-5
@@ -1,12 +1,12 @@
|
||||
lockVersion: 2.0.0
|
||||
id: cfd52247-6a25-4c6d-bbce-fe6fce0cd69d
|
||||
management:
|
||||
docChecksum: 7c3a22e3f6b8d7c91ff063e2951aed2f
|
||||
docChecksum: d2e69fbbac1477d094fdfc212c13670c
|
||||
docVersion: 1.0.0
|
||||
speakeasyVersion: 1.666.0
|
||||
generationVersion: 2.768.0
|
||||
releaseVersion: 0.1.1
|
||||
configChecksum: 1206f35a1f0802441ea1b8674cd04f00
|
||||
speakeasyVersion: 1.668.0
|
||||
generationVersion: 2.770.0
|
||||
releaseVersion: 0.1.0
|
||||
configChecksum: fa0d13fb5fd38982a589d64e64b0d87d
|
||||
repoURL: https://github.com/OpenRouterTeam/python-sdk.git
|
||||
installationURL: https://github.com/OpenRouterTeam/python-sdk.git
|
||||
published: true
|
||||
@@ -1116,3 +1116,4 @@ examples:
|
||||
"500":
|
||||
application/json: {"error": {"code": "<value>", "message": "<value>"}}
|
||||
examplesVersion: 1.0.2
|
||||
releaseNotes: "## Python SDK Changes:\n* `open_router.beta.responses.send()`: `request` **Changed** **Breaking** :warning:\n* `open_router.embeddings.generate()`: `response.status[200].content[text/event-stream` **Removed** **Breaking** :warning:\n* `open_router.chat.send()`: \n * `request` **Changed** **Breaking** :warning:\n * `response.choices.[].message.content.[array].[]` **Changed** **Breaking** :warning:\n* `open_router.credits.get_credits()`: `response.data` **Added**\n* `open_router.parameters.get_parameters()`: `request.provider` **Changed**\n* `open_router.completions.generate()`: `response` **Changed**\n"
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@ generation:
|
||||
generateNewTests: true
|
||||
skipResponseBodyAssertions: false
|
||||
python:
|
||||
version: 0.1.1
|
||||
version: 0.1.0
|
||||
additionalDependencies:
|
||||
dev: {}
|
||||
main: {}
|
||||
|
||||
+31
-94
@@ -3447,14 +3447,12 @@ components:
|
||||
- AionLabs
|
||||
- Alibaba
|
||||
- Amazon Bedrock
|
||||
- Amazon Nova
|
||||
- Anthropic
|
||||
- Arcee AI
|
||||
- Arcee
|
||||
- AtlasCloud
|
||||
- Avian
|
||||
- Azure
|
||||
- BaseTen
|
||||
- BytePlus
|
||||
- Black Forest Labs
|
||||
- Cerebras
|
||||
- Chutes
|
||||
@@ -3469,7 +3467,6 @@ components:
|
||||
- Fireworks
|
||||
- Friendli
|
||||
- GMICloud
|
||||
- GoPomelo
|
||||
- Google
|
||||
- Google AI Studio
|
||||
- Groq
|
||||
@@ -3499,9 +3496,7 @@ components:
|
||||
- Relace
|
||||
- SambaNova
|
||||
- SiliconFlow
|
||||
- Sourceful
|
||||
- Stealth
|
||||
- StreamLake
|
||||
- Switchpoint
|
||||
- Targon
|
||||
- Together
|
||||
@@ -3633,13 +3628,17 @@ components:
|
||||
nullable: true
|
||||
store:
|
||||
type: boolean
|
||||
const: false
|
||||
default: false
|
||||
nullable: true
|
||||
service_tier:
|
||||
type: string
|
||||
enum:
|
||||
- auto
|
||||
default: auto
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/OpenAIResponsesServiceTier'
|
||||
- enum:
|
||||
- auto
|
||||
- default
|
||||
- flex
|
||||
- scale
|
||||
- priority
|
||||
example: auto
|
||||
truncation:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/OpenAIResponsesTruncation'
|
||||
@@ -3790,14 +3789,6 @@ components:
|
||||
- native
|
||||
required:
|
||||
- id
|
||||
- type: object
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
enum:
|
||||
- response-healing
|
||||
required:
|
||||
- id
|
||||
description: Plugins you want to enable for this request, including their settings.
|
||||
user:
|
||||
type: string
|
||||
@@ -3806,13 +3797,6 @@ components:
|
||||
A unique identifier representing your end-user, which helps distinguish between different users of your app.
|
||||
This allows your app to identify specific users in case of abuse reports, preventing your entire app from
|
||||
being affected by the actions of individual users. Maximum of 128 characters.
|
||||
session_id:
|
||||
type: string
|
||||
maxLength: 128
|
||||
description: >-
|
||||
A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for
|
||||
observability. If provided in both the request body and the x-session-id header, the body value takes
|
||||
precedence. Maximum of 128 characters.
|
||||
description: Request schema for Responses endpoint
|
||||
example:
|
||||
model: anthropic/claude-4.5-sonnet-20250929
|
||||
@@ -4593,10 +4577,6 @@ components:
|
||||
status: default
|
||||
uptime_last_30m: 99.5
|
||||
supports_implicit_caching: true
|
||||
__schema0:
|
||||
anyOf:
|
||||
- $ref: '#/components/schemas/ChatCompletionFinishReason'
|
||||
- type: 'null'
|
||||
ModelName:
|
||||
type: string
|
||||
ChatMessageContentItemText:
|
||||
@@ -4607,8 +4587,6 @@ components:
|
||||
const: text
|
||||
text:
|
||||
type: string
|
||||
cache_control:
|
||||
$ref: '#/components/schemas/ChatMessageContentItemCacheControl'
|
||||
required:
|
||||
- type
|
||||
- text
|
||||
@@ -4647,6 +4625,14 @@ components:
|
||||
type: string
|
||||
format:
|
||||
type: string
|
||||
enum:
|
||||
- wav
|
||||
- mp3
|
||||
- flac
|
||||
- m4a
|
||||
- ogg
|
||||
- pcm16
|
||||
- pcm24
|
||||
required:
|
||||
- data
|
||||
- format
|
||||
@@ -4824,13 +4810,15 @@ components:
|
||||
- prompt_tokens
|
||||
- total_tokens
|
||||
ChatCompletionFinishReason:
|
||||
type: string
|
||||
enum:
|
||||
- tool_calls
|
||||
- stop
|
||||
- length
|
||||
- content_filter
|
||||
- error
|
||||
anyOf:
|
||||
- type: string
|
||||
enum:
|
||||
- tool_calls
|
||||
- stop
|
||||
- length
|
||||
- content_filter
|
||||
- error
|
||||
- type: 'null'
|
||||
JSONSchemaConfig:
|
||||
type: object
|
||||
properties:
|
||||
@@ -4872,19 +4860,6 @@ components:
|
||||
required:
|
||||
- type
|
||||
- grammar
|
||||
ChatMessageContentItemCacheControl:
|
||||
type: object
|
||||
properties:
|
||||
type:
|
||||
type: string
|
||||
const: ephemeral
|
||||
ttl:
|
||||
type: string
|
||||
enum:
|
||||
- 5m
|
||||
- 1h
|
||||
required:
|
||||
- type
|
||||
SystemMessage:
|
||||
type: object
|
||||
properties:
|
||||
@@ -5195,18 +5170,13 @@ components:
|
||||
- type: 'null'
|
||||
user:
|
||||
type: string
|
||||
debug:
|
||||
type: object
|
||||
properties:
|
||||
echo_upstream_body:
|
||||
type: boolean
|
||||
required:
|
||||
- messages
|
||||
ChatResponseChoice:
|
||||
type: object
|
||||
properties:
|
||||
finish_reason:
|
||||
$ref: '#/components/schemas/__schema0'
|
||||
$ref: '#/components/schemas/ChatCompletionFinishReason'
|
||||
index:
|
||||
type: number
|
||||
message:
|
||||
@@ -5267,7 +5237,7 @@ components:
|
||||
delta:
|
||||
$ref: '#/components/schemas/ChatStreamingMessageChunk'
|
||||
finish_reason:
|
||||
$ref: '#/components/schemas/__schema0'
|
||||
$ref: '#/components/schemas/ChatCompletionFinishReason'
|
||||
index:
|
||||
type: number
|
||||
logprobs:
|
||||
@@ -5599,12 +5569,6 @@ components:
|
||||
- type: 'null'
|
||||
finish_reason:
|
||||
$ref: '#/components/schemas/CompletionFinishReason'
|
||||
native_finish_reason:
|
||||
type: string
|
||||
reasoning:
|
||||
anyOf:
|
||||
- type: string
|
||||
- type: 'null'
|
||||
required:
|
||||
- text
|
||||
- index
|
||||
@@ -5622,8 +5586,6 @@ components:
|
||||
type: number
|
||||
model:
|
||||
type: string
|
||||
provider:
|
||||
type: string
|
||||
system_fingerprint:
|
||||
type: string
|
||||
choices:
|
||||
@@ -5842,26 +5804,6 @@ paths:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
data:
|
||||
type: object
|
||||
properties:
|
||||
total_credits:
|
||||
type: number
|
||||
description: Total credits purchased
|
||||
example: 100.5
|
||||
total_usage:
|
||||
type: number
|
||||
description: Total credits used
|
||||
example: 25.75
|
||||
required:
|
||||
- total_credits
|
||||
- total_usage
|
||||
example:
|
||||
total_credits: 100.5
|
||||
total_usage: 25.75
|
||||
required:
|
||||
- data
|
||||
description: Total credits purchased and used
|
||||
example:
|
||||
data:
|
||||
@@ -6784,14 +6726,12 @@ paths:
|
||||
- AionLabs
|
||||
- Alibaba
|
||||
- Amazon Bedrock
|
||||
- Amazon Nova
|
||||
- Anthropic
|
||||
- Arcee AI
|
||||
- Arcee
|
||||
- AtlasCloud
|
||||
- Avian
|
||||
- Azure
|
||||
- BaseTen
|
||||
- BytePlus
|
||||
- Black Forest Labs
|
||||
- Cerebras
|
||||
- Chutes
|
||||
@@ -6806,7 +6746,6 @@ paths:
|
||||
- Fireworks
|
||||
- Friendli
|
||||
- GMICloud
|
||||
- GoPomelo
|
||||
- Google
|
||||
- Google AI Studio
|
||||
- Groq
|
||||
@@ -6836,9 +6775,7 @@ paths:
|
||||
- Relace
|
||||
- SambaNova
|
||||
- SiliconFlow
|
||||
- Sourceful
|
||||
- Stealth
|
||||
- StreamLake
|
||||
- Switchpoint
|
||||
- Targon
|
||||
- Together
|
||||
|
||||
+8365
-8367
File diff suppressed because it is too large
Load Diff
@@ -1,35 +0,0 @@
|
||||
overlay: 1.0.0
|
||||
x-speakeasy-jsonpath: rfc9535
|
||||
info:
|
||||
title: Add HTTP-Referer and X-Title as global parameters
|
||||
version: 0.0.0
|
||||
actions:
|
||||
# Add global parameters for app identification
|
||||
- target: $
|
||||
description: Add x-speakeasy-globals for HTTP-Referer and X-Title headers
|
||||
update:
|
||||
x-speakeasy-globals:
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/AppIdentifier"
|
||||
- $ref: "#/components/parameters/AppDisplayName"
|
||||
|
||||
# Add component parameters
|
||||
- target: $.components
|
||||
description: Add parameters for app identification headers
|
||||
update:
|
||||
parameters:
|
||||
AppIdentifier:
|
||||
name: HTTP-Referer
|
||||
in: header
|
||||
schema:
|
||||
type: string
|
||||
description: |
|
||||
The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
||||
This is used to track API usage per application.
|
||||
AppDisplayName:
|
||||
name: X-Title
|
||||
in: header
|
||||
schema:
|
||||
type: string
|
||||
description: |
|
||||
The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
||||
@@ -1,10 +0,0 @@
|
||||
overlay: 1.0.0
|
||||
x-speakeasy-jsonpath: rfc9535
|
||||
info:
|
||||
title: Add open enums
|
||||
version: 0.0.0
|
||||
actions:
|
||||
- target: $..[?length(@.enum) > 1]
|
||||
description: Automatically open all enums that have length > 1
|
||||
update:
|
||||
x-speakeasy-unknown-values: allow
|
||||
@@ -1,15 +0,0 @@
|
||||
overlay: 1.0.0
|
||||
x-speakeasy-jsonpath: rfc9535
|
||||
info:
|
||||
title: Remove RSS+XML response schemas and related parameters
|
||||
version: 0.0.0
|
||||
actions:
|
||||
- target: $..responses.*.content["application/rss+xml"]
|
||||
description: Remove application/rss+xml response schemas
|
||||
remove: true
|
||||
- target: $..parameters[?@.name == "use_rss"]
|
||||
description: Remove use_rss parameter
|
||||
remove: true
|
||||
- target: $..parameters[?@.name == "use_rss_chat_links"]
|
||||
description: Remove use_rss_chat_links parameter
|
||||
remove: true
|
||||
@@ -1,28 +1,25 @@
|
||||
speakeasyVersion: 1.666.0
|
||||
speakeasyVersion: 1.668.0
|
||||
sources:
|
||||
-OAS:
|
||||
sourceNamespace: open-router-chat-completions-api
|
||||
sourceRevisionDigest: sha256:f1b59b9b643de5e20d6e3299a8274783d8c0854615876f5d7f6f081814842695
|
||||
sourceBlobDigest: sha256:ee1f2422281b3ed5b38951c74636ad192c9bb160f216069c1f7931ccc4e52553
|
||||
sourceRevisionDigest: sha256:697f956356ab0195b9a9b9a5106e4ac979caa551709b3614c723df972c661829
|
||||
sourceBlobDigest: sha256:a286a09ceced7f78a685731aef81d1498b89a6a46f3794219dc93fa2d822853b
|
||||
tags:
|
||||
- latest
|
||||
- speakeasy-sdk-regen-1763684529
|
||||
targets:
|
||||
open-router:
|
||||
source: -OAS
|
||||
sourceNamespace: open-router-chat-completions-api
|
||||
sourceRevisionDigest: sha256:f1b59b9b643de5e20d6e3299a8274783d8c0854615876f5d7f6f081814842695
|
||||
sourceBlobDigest: sha256:ee1f2422281b3ed5b38951c74636ad192c9bb160f216069c1f7931ccc4e52553
|
||||
sourceRevisionDigest: sha256:697f956356ab0195b9a9b9a5106e4ac979caa551709b3614c723df972c661829
|
||||
sourceBlobDigest: sha256:a286a09ceced7f78a685731aef81d1498b89a6a46f3794219dc93fa2d822853b
|
||||
workflow:
|
||||
workflowVersion: 1.0.0
|
||||
speakeasyVersion: 1.666.0
|
||||
speakeasyVersion: latest
|
||||
sources:
|
||||
-OAS:
|
||||
inputs:
|
||||
- location: registry.speakeasyapi.dev/openrouter/sdk/open-router-chat-completions-api:main
|
||||
overlays:
|
||||
- location: .speakeasy/overlays/open-enums.overlay.yaml
|
||||
- location: .speakeasy/overlays/remove-rss-responses.overlay.yaml
|
||||
- location: .speakeasy/overlays/add-headers.overlay.yaml
|
||||
output: .speakeasy/out.openapi.yaml
|
||||
registry:
|
||||
location: registry.speakeasyapi.dev/openrouter/sdk/-oas
|
||||
|
||||
@@ -1,13 +1,9 @@
|
||||
workflowVersion: 1.0.0
|
||||
speakeasyVersion: 1.666.0
|
||||
speakeasyVersion: latest
|
||||
sources:
|
||||
-OAS:
|
||||
inputs:
|
||||
- location: registry.speakeasyapi.dev/openrouter/sdk/open-router-chat-completions-api:main
|
||||
overlays:
|
||||
- location: .speakeasy/overlays/open-enums.overlay.yaml
|
||||
- location: .speakeasy/overlays/remove-rss-responses.overlay.yaml
|
||||
- location: .speakeasy/overlays/add-headers.overlay.yaml
|
||||
output: .speakeasy/out.openapi.yaml
|
||||
registry:
|
||||
location: registry.speakeasyapi.dev/openrouter/sdk/-oas
|
||||
|
||||
+11
-1
@@ -8,4 +8,14 @@ Based on:
|
||||
### Generated
|
||||
- [python v0.0.16] .
|
||||
### Releases
|
||||
- [PyPI v0.0.16] https://pypi.org/project/openrouter/0.0.16 - .
|
||||
- [PyPI v0.0.16] https://pypi.org/project/openrouter/0.0.16 - .
|
||||
|
||||
## 2025-12-04 00:22:56
|
||||
### Changes
|
||||
Based on:
|
||||
- OpenAPI Doc
|
||||
- Speakeasy CLI 1.668.0 (2.770.0) https://github.com/speakeasy-api/speakeasy
|
||||
### Generated
|
||||
- [python v0.1.0] .
|
||||
### Releases
|
||||
- [PyPI v0.1.0] https://pypi.org/project/openrouter/0.1.0 - .
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
[project]
|
||||
name = "openrouter"
|
||||
version = "0.1.1"
|
||||
version = "0.1.0"
|
||||
description = "Official Python Client SDK for OpenRouter."
|
||||
authors = [{ name = "OpenRouter" },]
|
||||
readme = "README-PYPI.md"
|
||||
|
||||
@@ -3,10 +3,10 @@
|
||||
import importlib.metadata
|
||||
|
||||
__title__: str = "openrouter"
|
||||
__version__: str = "0.1.1"
|
||||
__version__: str = "0.1.0"
|
||||
__openapi_doc_version__: str = "1.0.0"
|
||||
__gen_version__: str = "2.768.0"
|
||||
__user_agent__: str = "speakeasy-sdk/python 0.1.1 2.768.0 1.0.0 openrouter"
|
||||
__gen_version__: str = "2.770.0"
|
||||
__user_agent__: str = "speakeasy-sdk/python 0.1.0 2.770.0 1.0.0 openrouter"
|
||||
|
||||
try:
|
||||
if __package__ is not None:
|
||||
|
||||
Reference in New Issue
Block a user