mirror of
https://github.com/wassname/openrouter-python-sdk-retry-errors.git
synced 2026-07-30 12:20:57 +08:00
ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.658.1
This commit is contained in:
@@ -3,10 +3,10 @@
|
||||
import importlib.metadata
|
||||
|
||||
__title__: str = "openrouter"
|
||||
__version__: str = "0.0.15"
|
||||
__version__: str = "0.0.16"
|
||||
__openapi_doc_version__: str = "1.0.0"
|
||||
__gen_version__: str = "2.753.6"
|
||||
__user_agent__: str = "speakeasy-sdk/python 0.0.15 2.753.6 1.0.0 openrouter"
|
||||
__gen_version__: str = "2.755.6"
|
||||
__user_agent__: str = "speakeasy-sdk/python 0.0.16 2.755.6 1.0.0 openrouter"
|
||||
|
||||
try:
|
||||
if __package__ is not None:
|
||||
|
||||
@@ -6,7 +6,7 @@ from openrouter._hooks import HookContext
|
||||
from openrouter.types import OptionalNullable, UNSET
|
||||
from openrouter.utils import get_security_from_env
|
||||
from openrouter.utils.unmarshal_json_response import unmarshal_json_response
|
||||
from typing import Any, List, Mapping, Optional
|
||||
from typing import Any, Mapping, Optional
|
||||
|
||||
|
||||
class Analytics(BaseSDK):
|
||||
@@ -20,7 +20,7 @@ class Analytics(BaseSDK):
|
||||
server_url: Optional[str] = None,
|
||||
timeout_ms: Optional[int] = None,
|
||||
http_headers: Optional[Mapping[str, str]] = None,
|
||||
) -> List[components.ActivityItem]:
|
||||
) -> operations.GetUserActivityResponse:
|
||||
r"""Get user activity grouped by endpoint
|
||||
|
||||
Returns user activity data grouped by endpoint for the last 30 (completed) UTC days
|
||||
@@ -128,7 +128,7 @@ class Analytics(BaseSDK):
|
||||
server_url: Optional[str] = None,
|
||||
timeout_ms: Optional[int] = None,
|
||||
http_headers: Optional[Mapping[str, str]] = None,
|
||||
) -> List[components.ActivityItem]:
|
||||
) -> operations.GetUserActivityResponse:
|
||||
r"""Get user activity grouped by endpoint
|
||||
|
||||
Returns user activity data grouped by endpoint for the last 30 (completed) UTC days
|
||||
|
||||
+11
-11
@@ -7,7 +7,7 @@ from openrouter._hooks import HookContext
|
||||
from openrouter.types import OptionalNullable, UNSET
|
||||
from openrouter.utils import get_security_from_env
|
||||
from openrouter.utils.unmarshal_json_response import unmarshal_json_response
|
||||
from typing import Any, List, Mapping, Optional
|
||||
from typing import Any, Mapping, Optional
|
||||
|
||||
|
||||
class APIKeys(BaseSDK):
|
||||
@@ -22,7 +22,7 @@ class APIKeys(BaseSDK):
|
||||
server_url: Optional[str] = None,
|
||||
timeout_ms: Optional[int] = None,
|
||||
http_headers: Optional[Mapping[str, str]] = None,
|
||||
) -> List[operations.ListData]:
|
||||
) -> operations.ListResponse:
|
||||
r"""List API keys
|
||||
|
||||
:param include_disabled: Whether to include disabled API keys in the response
|
||||
@@ -126,7 +126,7 @@ class APIKeys(BaseSDK):
|
||||
server_url: Optional[str] = None,
|
||||
timeout_ms: Optional[int] = None,
|
||||
http_headers: Optional[Mapping[str, str]] = None,
|
||||
) -> List[operations.ListData]:
|
||||
) -> operations.ListResponse:
|
||||
r"""List API keys
|
||||
|
||||
:param include_disabled: Whether to include disabled API keys in the response
|
||||
@@ -233,7 +233,7 @@ class APIKeys(BaseSDK):
|
||||
server_url: Optional[str] = None,
|
||||
timeout_ms: Optional[int] = None,
|
||||
http_headers: Optional[Mapping[str, str]] = None,
|
||||
) -> operations.CreateKeysData:
|
||||
) -> operations.CreateKeysResponse:
|
||||
r"""Create a new API key
|
||||
|
||||
:param name: Name for the new API key
|
||||
@@ -354,7 +354,7 @@ class APIKeys(BaseSDK):
|
||||
server_url: Optional[str] = None,
|
||||
timeout_ms: Optional[int] = None,
|
||||
http_headers: Optional[Mapping[str, str]] = None,
|
||||
) -> operations.CreateKeysData:
|
||||
) -> operations.CreateKeysResponse:
|
||||
r"""Create a new API key
|
||||
|
||||
:param name: Name for the new API key
|
||||
@@ -476,7 +476,7 @@ class APIKeys(BaseSDK):
|
||||
server_url: Optional[str] = None,
|
||||
timeout_ms: Optional[int] = None,
|
||||
http_headers: Optional[Mapping[str, str]] = None,
|
||||
) -> operations.UpdateKeysData:
|
||||
) -> operations.UpdateKeysResponse:
|
||||
r"""Update an API key
|
||||
|
||||
:param hash: The hash identifier of the API key to update
|
||||
@@ -607,7 +607,7 @@ class APIKeys(BaseSDK):
|
||||
server_url: Optional[str] = None,
|
||||
timeout_ms: Optional[int] = None,
|
||||
http_headers: Optional[Mapping[str, str]] = None,
|
||||
) -> operations.UpdateKeysData:
|
||||
) -> operations.UpdateKeysResponse:
|
||||
r"""Update an API key
|
||||
|
||||
:param hash: The hash identifier of the API key to update
|
||||
@@ -945,7 +945,7 @@ class APIKeys(BaseSDK):
|
||||
server_url: Optional[str] = None,
|
||||
timeout_ms: Optional[int] = None,
|
||||
http_headers: Optional[Mapping[str, str]] = None,
|
||||
) -> operations.GetKeyData:
|
||||
) -> operations.GetKeyResponse:
|
||||
r"""Get a single API key
|
||||
|
||||
:param hash: The hash identifier of the API key to retrieve
|
||||
@@ -1051,7 +1051,7 @@ class APIKeys(BaseSDK):
|
||||
server_url: Optional[str] = None,
|
||||
timeout_ms: Optional[int] = None,
|
||||
http_headers: Optional[Mapping[str, str]] = None,
|
||||
) -> operations.GetKeyData:
|
||||
) -> operations.GetKeyResponse:
|
||||
r"""Get a single API key
|
||||
|
||||
:param hash: The hash identifier of the API key to retrieve
|
||||
@@ -1156,7 +1156,7 @@ class APIKeys(BaseSDK):
|
||||
server_url: Optional[str] = None,
|
||||
timeout_ms: Optional[int] = None,
|
||||
http_headers: Optional[Mapping[str, str]] = None,
|
||||
) -> operations.GetCurrentKeyData:
|
||||
) -> operations.GetCurrentKeyResponse:
|
||||
r"""Get current API key
|
||||
|
||||
Get information on the API key associated with the current authentication session
|
||||
@@ -1247,7 +1247,7 @@ class APIKeys(BaseSDK):
|
||||
server_url: Optional[str] = None,
|
||||
timeout_ms: Optional[int] = None,
|
||||
http_headers: Optional[Mapping[str, str]] = None,
|
||||
) -> operations.GetCurrentKeyData:
|
||||
) -> operations.GetCurrentKeyResponse:
|
||||
r"""Get current API key
|
||||
|
||||
Get information on the API key associated with the current authentication session
|
||||
|
||||
@@ -218,7 +218,7 @@ class Credits(BaseSDK):
|
||||
server_url: Optional[str] = None,
|
||||
timeout_ms: Optional[int] = None,
|
||||
http_headers: Optional[Mapping[str, str]] = None,
|
||||
) -> operations.CreateCoinbaseChargeData:
|
||||
) -> operations.CreateCoinbaseChargeResponse:
|
||||
r"""Create a Coinbase charge for crypto payment
|
||||
|
||||
Create a Coinbase charge for crypto payment
|
||||
@@ -342,7 +342,7 @@ class Credits(BaseSDK):
|
||||
server_url: Optional[str] = None,
|
||||
timeout_ms: Optional[int] = None,
|
||||
http_headers: Optional[Mapping[str, str]] = None,
|
||||
) -> operations.CreateCoinbaseChargeData:
|
||||
) -> operations.CreateCoinbaseChargeResponse:
|
||||
r"""Create a Coinbase charge for crypto payment
|
||||
|
||||
Create a Coinbase charge for crypto payment
|
||||
|
||||
@@ -7,7 +7,7 @@ from openrouter._hooks import HookContext
|
||||
from openrouter.types import OptionalNullable, UNSET
|
||||
from openrouter.utils import get_security_from_env
|
||||
from openrouter.utils.unmarshal_json_response import unmarshal_json_response
|
||||
from typing import Any, List, Mapping, Optional, Union
|
||||
from typing import Any, Mapping, Optional, Union
|
||||
|
||||
|
||||
class GenerateAcceptEnum(str, Enum):
|
||||
@@ -391,7 +391,7 @@ class Embeddings(BaseSDK):
|
||||
server_url: Optional[str] = None,
|
||||
timeout_ms: Optional[int] = None,
|
||||
http_headers: Optional[Mapping[str, str]] = None,
|
||||
) -> List[components.Model]:
|
||||
) -> components.ModelsListResponse:
|
||||
r"""List all embeddings models
|
||||
|
||||
Returns a list of all available embeddings models and their properties
|
||||
@@ -482,7 +482,7 @@ class Embeddings(BaseSDK):
|
||||
server_url: Optional[str] = None,
|
||||
timeout_ms: Optional[int] = None,
|
||||
http_headers: Optional[Mapping[str, str]] = None,
|
||||
) -> List[components.Model]:
|
||||
) -> components.ModelsListResponse:
|
||||
r"""List all embeddings models
|
||||
|
||||
Returns a list of all available embeddings models and their properties
|
||||
|
||||
@@ -6,7 +6,7 @@ from openrouter._hooks import HookContext
|
||||
from openrouter.types import OptionalNullable, UNSET
|
||||
from openrouter.utils import get_security_from_env
|
||||
from openrouter.utils.unmarshal_json_response import unmarshal_json_response
|
||||
from typing import Any, List, Mapping, Optional
|
||||
from typing import Any, Mapping, Optional
|
||||
|
||||
|
||||
class Endpoints(BaseSDK):
|
||||
@@ -21,7 +21,7 @@ class Endpoints(BaseSDK):
|
||||
server_url: Optional[str] = None,
|
||||
timeout_ms: Optional[int] = None,
|
||||
http_headers: Optional[Mapping[str, str]] = None,
|
||||
) -> components.ListEndpointsResponse:
|
||||
) -> operations.ListEndpointsResponse:
|
||||
r"""List all endpoints for a model
|
||||
|
||||
:param author:
|
||||
@@ -120,7 +120,7 @@ class Endpoints(BaseSDK):
|
||||
server_url: Optional[str] = None,
|
||||
timeout_ms: Optional[int] = None,
|
||||
http_headers: Optional[Mapping[str, str]] = None,
|
||||
) -> components.ListEndpointsResponse:
|
||||
) -> operations.ListEndpointsResponse:
|
||||
r"""List all endpoints for a model
|
||||
|
||||
:param author:
|
||||
@@ -217,7 +217,7 @@ class Endpoints(BaseSDK):
|
||||
server_url: Optional[str] = None,
|
||||
timeout_ms: Optional[int] = None,
|
||||
http_headers: Optional[Mapping[str, str]] = None,
|
||||
) -> List[components.PublicEndpoint]:
|
||||
) -> operations.ListEndpointsZdrResponse:
|
||||
r"""Preview the impact of ZDR on the available endpoints
|
||||
|
||||
:param retries: Override the default retry configuration for this method
|
||||
@@ -303,7 +303,7 @@ class Endpoints(BaseSDK):
|
||||
server_url: Optional[str] = None,
|
||||
timeout_ms: Optional[int] = None,
|
||||
http_headers: Optional[Mapping[str, str]] = None,
|
||||
) -> List[components.PublicEndpoint]:
|
||||
) -> operations.ListEndpointsZdrResponse:
|
||||
r"""Preview the impact of ZDR on the available endpoints
|
||||
|
||||
:param retries: Override the default retry configuration for this method
|
||||
|
||||
@@ -20,7 +20,7 @@ class Generations(BaseSDK):
|
||||
server_url: Optional[str] = None,
|
||||
timeout_ms: Optional[int] = None,
|
||||
http_headers: Optional[Mapping[str, str]] = None,
|
||||
) -> operations.GetGenerationData:
|
||||
) -> operations.GetGenerationResponse:
|
||||
r"""Get request & usage metadata for a generation
|
||||
|
||||
:param id:
|
||||
@@ -157,7 +157,7 @@ class Generations(BaseSDK):
|
||||
server_url: Optional[str] = None,
|
||||
timeout_ms: Optional[int] = None,
|
||||
http_headers: Optional[Mapping[str, str]] = None,
|
||||
) -> operations.GetGenerationData:
|
||||
) -> operations.GetGenerationResponse:
|
||||
r"""Get request & usage metadata for a generation
|
||||
|
||||
:param id:
|
||||
|
||||
@@ -6,7 +6,7 @@ from openrouter._hooks import HookContext
|
||||
from openrouter.types import OptionalNullable, UNSET
|
||||
from openrouter.utils import get_security_from_env
|
||||
from openrouter.utils.unmarshal_json_response import unmarshal_json_response
|
||||
from typing import Any, List, Mapping, Optional, Union
|
||||
from typing import Any, Mapping, Optional, Union
|
||||
|
||||
|
||||
class Models(BaseSDK):
|
||||
@@ -19,7 +19,7 @@ class Models(BaseSDK):
|
||||
server_url: Optional[str] = None,
|
||||
timeout_ms: Optional[int] = None,
|
||||
http_headers: Optional[Mapping[str, str]] = None,
|
||||
) -> components.ModelsCountResponseData:
|
||||
) -> components.ModelsCountResponse:
|
||||
r"""Get total count of available models
|
||||
|
||||
:param retries: Override the default retry configuration for this method
|
||||
@@ -103,7 +103,7 @@ class Models(BaseSDK):
|
||||
server_url: Optional[str] = None,
|
||||
timeout_ms: Optional[int] = None,
|
||||
http_headers: Optional[Mapping[str, str]] = None,
|
||||
) -> components.ModelsCountResponseData:
|
||||
) -> components.ModelsCountResponse:
|
||||
r"""Get total count of available models
|
||||
|
||||
:param retries: Override the default retry configuration for this method
|
||||
@@ -189,7 +189,7 @@ class Models(BaseSDK):
|
||||
server_url: Optional[str] = None,
|
||||
timeout_ms: Optional[int] = None,
|
||||
http_headers: Optional[Mapping[str, str]] = None,
|
||||
) -> List[components.Model]:
|
||||
) -> components.ModelsListResponse:
|
||||
r"""List all models and their properties
|
||||
|
||||
:param category:
|
||||
@@ -288,7 +288,7 @@ class Models(BaseSDK):
|
||||
server_url: Optional[str] = None,
|
||||
timeout_ms: Optional[int] = None,
|
||||
http_headers: Optional[Mapping[str, str]] = None,
|
||||
) -> List[components.Model]:
|
||||
) -> components.ModelsListResponse:
|
||||
r"""List all models and their properties
|
||||
|
||||
:param category:
|
||||
@@ -389,7 +389,7 @@ class Models(BaseSDK):
|
||||
server_url: Optional[str] = None,
|
||||
timeout_ms: Optional[int] = None,
|
||||
http_headers: Optional[Mapping[str, str]] = None,
|
||||
) -> List[components.Model]:
|
||||
) -> components.ModelsListResponse:
|
||||
r"""List models filtered by user provider preferences
|
||||
|
||||
:param security:
|
||||
@@ -483,7 +483,7 @@ class Models(BaseSDK):
|
||||
server_url: Optional[str] = None,
|
||||
timeout_ms: Optional[int] = None,
|
||||
http_headers: Optional[Mapping[str, str]] = None,
|
||||
) -> List[components.Model]:
|
||||
) -> components.ModelsListResponse:
|
||||
r"""List models filtered by user provider preferences
|
||||
|
||||
:param security:
|
||||
|
||||
@@ -267,7 +267,7 @@ class OAuth(BaseSDK):
|
||||
server_url: Optional[str] = None,
|
||||
timeout_ms: Optional[int] = None,
|
||||
http_headers: Optional[Mapping[str, str]] = None,
|
||||
) -> operations.CreateAuthKeysCodeData:
|
||||
) -> operations.CreateAuthKeysCodeResponse:
|
||||
r"""Create authorization code
|
||||
|
||||
Create an authorization code for the PKCE flow to generate a user-controlled API key
|
||||
@@ -389,7 +389,7 @@ class OAuth(BaseSDK):
|
||||
server_url: Optional[str] = None,
|
||||
timeout_ms: Optional[int] = None,
|
||||
http_headers: Optional[Mapping[str, str]] = None,
|
||||
) -> operations.CreateAuthKeysCodeData:
|
||||
) -> operations.CreateAuthKeysCodeResponse:
|
||||
r"""Create authorization code
|
||||
|
||||
Create an authorization code for the PKCE flow to generate a user-controlled API key
|
||||
|
||||
@@ -25,7 +25,7 @@ class Parameters(BaseSDK):
|
||||
server_url: Optional[str] = None,
|
||||
timeout_ms: Optional[int] = None,
|
||||
http_headers: Optional[Mapping[str, str]] = None,
|
||||
) -> operations.GetParametersData:
|
||||
) -> operations.GetParametersResponse:
|
||||
r"""Get a model's supported parameters and data about which are most popular
|
||||
|
||||
:param security:
|
||||
@@ -136,7 +136,7 @@ class Parameters(BaseSDK):
|
||||
server_url: Optional[str] = None,
|
||||
timeout_ms: Optional[int] = None,
|
||||
http_headers: Optional[Mapping[str, str]] = None,
|
||||
) -> operations.GetParametersData:
|
||||
) -> operations.GetParametersResponse:
|
||||
r"""Get a model's supported parameters and data about which are most popular
|
||||
|
||||
:param security:
|
||||
|
||||
@@ -6,7 +6,7 @@ from openrouter._hooks import HookContext
|
||||
from openrouter.types import OptionalNullable, UNSET
|
||||
from openrouter.utils import get_security_from_env
|
||||
from openrouter.utils.unmarshal_json_response import unmarshal_json_response
|
||||
from typing import Any, List, Mapping, Optional
|
||||
from typing import Any, Mapping, Optional
|
||||
|
||||
|
||||
class Providers(BaseSDK):
|
||||
@@ -19,7 +19,7 @@ class Providers(BaseSDK):
|
||||
server_url: Optional[str] = None,
|
||||
timeout_ms: Optional[int] = None,
|
||||
http_headers: Optional[Mapping[str, str]] = None,
|
||||
) -> List[operations.ListProvidersData]:
|
||||
) -> operations.ListProvidersResponse:
|
||||
r"""List all providers
|
||||
|
||||
:param retries: Override the default retry configuration for this method
|
||||
@@ -103,7 +103,7 @@ class Providers(BaseSDK):
|
||||
server_url: Optional[str] = None,
|
||||
timeout_ms: Optional[int] = None,
|
||||
http_headers: Optional[Mapping[str, str]] = None,
|
||||
) -> List[operations.ListProvidersData]:
|
||||
) -> operations.ListProvidersResponse:
|
||||
r"""List all providers
|
||||
|
||||
:param retries: Override the default retry configuration for this method
|
||||
|
||||
@@ -1,12 +1,26 @@
|
||||
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
||||
|
||||
from typing import Any, Optional
|
||||
from typing import Any, Optional, Type, TypeVar, overload
|
||||
|
||||
import httpx
|
||||
|
||||
from .serializers import unmarshal_json
|
||||
from openrouter import errors
|
||||
|
||||
T = TypeVar("T")
|
||||
|
||||
|
||||
@overload
|
||||
def unmarshal_json_response(
|
||||
typ: Type[T], http_res: httpx.Response, body: Optional[str] = None
|
||||
) -> T: ...
|
||||
|
||||
|
||||
@overload
|
||||
def unmarshal_json_response(
|
||||
typ: Any, http_res: httpx.Response, body: Optional[str] = None
|
||||
) -> Any: ...
|
||||
|
||||
|
||||
def unmarshal_json_response(
|
||||
typ: Any, http_res: httpx.Response, body: Optional[str] = None
|
||||
|
||||
Reference in New Issue
Block a user