mirror of
https://github.com/wassname/openrouter-python-sdk-retry-errors.git
synced 2026-07-29 11:23:49 +08:00
Initial commit: OpenRouter Python SDK
Auto-generated Python SDK for OpenRouter API, providing comprehensive client library with: - Chat completions and streaming support - Embeddings API - Model and provider information - API key management - Analytics and usage tracking - OAuth authentication flows - Full type hints and error handling
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
# BadGatewayResponseError
|
||||
|
||||
Bad Gateway - Provider/upstream API failure
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ |
|
||||
| `error` | [models.BadGatewayResponseErrorData](../models/badgatewayresponseerrordata.md) | :heavy_check_mark: | Error data for BadGatewayResponse | {<br/>"code": 502,<br/>"message": "Provider returned error"<br/>} |
|
||||
| `user_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
|
||||
@@ -0,0 +1,11 @@
|
||||
# BadRequestResponseError
|
||||
|
||||
Bad Request - Invalid request parameters or malformed input
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ |
|
||||
| `error` | [models.BadRequestResponseErrorData](../models/badrequestresponseerrordata.md) | :heavy_check_mark: | Error data for BadRequestResponse | {<br/>"code": 400,<br/>"message": "Invalid request parameters"<br/>} |
|
||||
| `user_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
|
||||
@@ -0,0 +1,8 @@
|
||||
# ChatError
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- |
|
||||
| `error` | [models.ChatErrorError](../models/chaterrorerror.md) | :heavy_check_mark: | N/A |
|
||||
@@ -0,0 +1,11 @@
|
||||
# EdgeNetworkTimeoutResponseError
|
||||
|
||||
Infrastructure Timeout - Provider request timed out at edge network
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
|
||||
| `error` | [models.EdgeNetworkTimeoutResponseErrorData](../models/edgenetworktimeoutresponseerrordata.md) | :heavy_check_mark: | Error data for EdgeNetworkTimeoutResponse | {<br/>"code": 524,<br/>"message": "Request timed out. Please try again later."<br/>} |
|
||||
| `user_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
|
||||
@@ -0,0 +1,11 @@
|
||||
# ForbiddenResponseError
|
||||
|
||||
Forbidden - Authentication successful but insufficient permissions
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- |
|
||||
| `error` | [models.ForbiddenResponseErrorData](../models/forbiddenresponseerrordata.md) | :heavy_check_mark: | Error data for ForbiddenResponse | {<br/>"code": 403,<br/>"message": "Only provisioning keys can perform this operation"<br/>} |
|
||||
| `user_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
|
||||
@@ -0,0 +1,11 @@
|
||||
# InternalServerResponseError
|
||||
|
||||
Internal Server Error - Unexpected server error
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
|
||||
| `error` | [models.InternalServerResponseErrorData](../models/internalserverresponseerrordata.md) | :heavy_check_mark: | Error data for InternalServerResponse | {<br/>"code": 500,<br/>"message": "Internal Server Error"<br/>} |
|
||||
| `user_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
|
||||
@@ -0,0 +1,11 @@
|
||||
# NotFoundResponseError
|
||||
|
||||
Not Found - Resource does not exist
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- |
|
||||
| `error` | [models.NotFoundResponseErrorData](../models/notfoundresponseerrordata.md) | :heavy_check_mark: | Error data for NotFoundResponse | {<br/>"code": 404,<br/>"message": "Resource not found"<br/>} |
|
||||
| `user_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
|
||||
@@ -0,0 +1,11 @@
|
||||
# PayloadTooLargeResponseError
|
||||
|
||||
Payload Too Large - Request payload exceeds size limits
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
|
||||
| `error` | [models.PayloadTooLargeResponseErrorData](../models/payloadtoolargeresponseerrordata.md) | :heavy_check_mark: | Error data for PayloadTooLargeResponse | {<br/>"code": 413,<br/>"message": "Request payload too large"<br/>} |
|
||||
| `user_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
|
||||
@@ -0,0 +1,11 @@
|
||||
# PaymentRequiredResponseError
|
||||
|
||||
Payment Required - Insufficient credits or quota to complete request
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ |
|
||||
| `error` | [models.PaymentRequiredResponseErrorData](../models/paymentrequiredresponseerrordata.md) | :heavy_check_mark: | Error data for PaymentRequiredResponse | {<br/>"code": 402,<br/>"message": "Insufficient credits. Add more using https://openrouter.ai/credits"<br/>} |
|
||||
| `user_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
|
||||
@@ -0,0 +1,11 @@
|
||||
# ProviderOverloadedResponseError
|
||||
|
||||
Provider Overloaded - Provider is temporarily overloaded
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
|
||||
| `error` | [models.ProviderOverloadedResponseErrorData](../models/provideroverloadedresponseerrordata.md) | :heavy_check_mark: | Error data for ProviderOverloadedResponse | {<br/>"code": 529,<br/>"message": "Provider returned error"<br/>} |
|
||||
| `user_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
|
||||
@@ -0,0 +1,11 @@
|
||||
# RequestTimeoutResponseError
|
||||
|
||||
Request Timeout - Operation exceeded time limit
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
|
||||
| `error` | [models.RequestTimeoutResponseErrorData](../models/requesttimeoutresponseerrordata.md) | :heavy_check_mark: | Error data for RequestTimeoutResponse | {<br/>"code": 408,<br/>"message": "Operation timed out. Please try again later."<br/>} |
|
||||
| `user_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
|
||||
@@ -0,0 +1,11 @@
|
||||
# ServiceUnavailableResponseError
|
||||
|
||||
Service Unavailable - Service temporarily unavailable
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
|
||||
| `error` | [models.ServiceUnavailableResponseErrorData](../models/serviceunavailableresponseerrordata.md) | :heavy_check_mark: | Error data for ServiceUnavailableResponse | {<br/>"code": 503,<br/>"message": "Service temporarily unavailable"<br/>} |
|
||||
| `user_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
|
||||
@@ -0,0 +1,11 @@
|
||||
# TooManyRequestsResponseError
|
||||
|
||||
Too Many Requests - Rate limit exceeded
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
|
||||
| `error` | [models.TooManyRequestsResponseErrorData](../models/toomanyrequestsresponseerrordata.md) | :heavy_check_mark: | Error data for TooManyRequestsResponse | {<br/>"code": 429,<br/>"message": "Rate limit exceeded"<br/>} |
|
||||
| `user_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
|
||||
@@ -0,0 +1,11 @@
|
||||
# UnauthorizedResponseError
|
||||
|
||||
Unauthorized - Authentication required or invalid credentials
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
|
||||
| `error` | [models.UnauthorizedResponseErrorData](../models/unauthorizedresponseerrordata.md) | :heavy_check_mark: | Error data for UnauthorizedResponse | {<br/>"code": 401,<br/>"message": "Missing Authentication header"<br/>} |
|
||||
| `user_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
|
||||
@@ -0,0 +1,11 @@
|
||||
# UnprocessableEntityResponseError
|
||||
|
||||
Unprocessable Entity - Semantic validation failure
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ |
|
||||
| `error` | [models.UnprocessableEntityResponseErrorData](../models/unprocessableentityresponseerrordata.md) | :heavy_check_mark: | Error data for UnprocessableEntityResponse | {<br/>"code": 422,<br/>"message": "Invalid argument"<br/>} |
|
||||
| `user_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
|
||||
Reference in New Issue
Block a user