mirror of
https://github.com/wassname/openrouter-python-sdk-retry-errors.git
synced 2026-08-01 12:40:23 +08:00
fixes
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
||||
|
||||
from .basesdk import BaseSDK
|
||||
from openrouter import errors, models, utils
|
||||
from openrouter import components, errors, operations, utils
|
||||
from openrouter._hooks import HookContext
|
||||
from openrouter.types import OptionalNullable, UNSET
|
||||
from openrouter.utils import get_security_from_env
|
||||
@@ -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[models.ListProvidersData]:
|
||||
) -> List[operations.ListProvidersData]:
|
||||
r"""List all providers
|
||||
|
||||
:param retries: Override the default retry configuration for this method
|
||||
@@ -67,7 +67,7 @@ class Providers(BaseSDK):
|
||||
operation_id="listProviders",
|
||||
oauth2_scopes=None,
|
||||
security_source=get_security_from_env(
|
||||
self.sdk_configuration.security, models.Security
|
||||
self.sdk_configuration.security, components.Security
|
||||
),
|
||||
),
|
||||
request=req,
|
||||
@@ -77,7 +77,7 @@ class Providers(BaseSDK):
|
||||
|
||||
response_data: Any = None
|
||||
if utils.match_response(http_res, "200", "application/json"):
|
||||
return unmarshal_json_response(models.ListProvidersResponse, http_res)
|
||||
return unmarshal_json_response(operations.ListProvidersResponse, http_res)
|
||||
if utils.match_response(http_res, "500", "application/json"):
|
||||
response_data = unmarshal_json_response(
|
||||
errors.InternalServerResponseErrorData, http_res
|
||||
@@ -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[models.ListProvidersData]:
|
||||
) -> List[operations.ListProvidersData]:
|
||||
r"""List all providers
|
||||
|
||||
:param retries: Override the default retry configuration for this method
|
||||
@@ -151,7 +151,7 @@ class Providers(BaseSDK):
|
||||
operation_id="listProviders",
|
||||
oauth2_scopes=None,
|
||||
security_source=get_security_from_env(
|
||||
self.sdk_configuration.security, models.Security
|
||||
self.sdk_configuration.security, components.Security
|
||||
),
|
||||
),
|
||||
request=req,
|
||||
@@ -161,7 +161,7 @@ class Providers(BaseSDK):
|
||||
|
||||
response_data: Any = None
|
||||
if utils.match_response(http_res, "200", "application/json"):
|
||||
return unmarshal_json_response(models.ListProvidersResponse, http_res)
|
||||
return unmarshal_json_response(operations.ListProvidersResponse, http_res)
|
||||
if utils.match_response(http_res, "500", "application/json"):
|
||||
response_data = unmarshal_json_response(
|
||||
errors.InternalServerResponseErrorData, http_res
|
||||
|
||||
Reference in New Issue
Block a user