mirror of
https://github.com/wassname/openrouter-python-sdk-retry-errors.git
synced 2026-07-30 12:20:57 +08:00
Commits included in this export:
- 6ddaaa6989d725bbe966e45f7aed0c1bd72f9153 - 4779741b6ba710b1299612b82e8544516bd9dd6a - 22083fcc8f58884d8212d6f3314b231c4ddd21cd - a925a620f97196d509e073a163caac053bd82316 - 5c05d8829784601ffd151acef1a6978c266f913d - 6f4fff535fbf4274255c255ae23620b8e00e614f - ef358e96cb01e469b77d44683603a602b0813116 - e6299b4ebfe5c2eed6c598771f0fd99f84555401 - 24d3f0ee1c2aa19a62f7902836034080b9246813 - 68922847c2969b773887310eb7aa9a814e199c5a - 729ee2338c39df22461526153e7f4ba868fd498e - e1074ff86fccf5e48406b7595298873106d3cc5a - 123bbdaf841d299162a82ee2573adfbb70a45b8f - ac457b8a8dad98fdf5ddcae8dd4711361cea3084 - ea825199f4c59dd68fec01cf8d18a582963c9f25 - 4d48e4f6bb936e785787314a965298da6b78fea0 - 718729a573ee98893a4408d5a52ab4686661fe54 - b867adcde6b64f3f2a11c4626254b39098e4b0b4 - 21912c097b4066d109766c6b4492826595cd57c5 - bc1ed85adc976a4634ca8a41b82e4fc2c39a864f - d145c89c941937a312ed1357590d2bfda9a3603d - 12f05b5dee397ead47cfcd545a7a2e3c7ff57524 - dd28f75a19a015809797c7abf3f8758f7c37262e - c96e569781e07ab44172d9c69940ec17bafd81f4 - c9d5a90e3c2b5077a2bdd49773f1a46d1a5a79c7 - 58b08f87116ceab9076de2fdc0a4c74c919b44c4 GitOrigin-RevId: 6ddaaa6989d725bbe966e45f7aed0c1bd72f9153
This commit is contained in:
@@ -17,6 +17,8 @@ class Endpoints(BaseSDK):
|
||||
*,
|
||||
author: str,
|
||||
slug: str,
|
||||
http_referer: Optional[str] = None,
|
||||
x_title: Optional[str] = None,
|
||||
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
||||
server_url: Optional[str] = None,
|
||||
timeout_ms: Optional[int] = None,
|
||||
@@ -26,6 +28,11 @@ class Endpoints(BaseSDK):
|
||||
|
||||
:param author:
|
||||
:param slug:
|
||||
:param http_referer: 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.
|
||||
|
||||
:param x_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
||||
|
||||
:param retries: Override the default retry configuration for this method
|
||||
:param server_url: Override the default server URL for this method
|
||||
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
||||
@@ -42,6 +49,8 @@ class Endpoints(BaseSDK):
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
request = operations.ListEndpointsRequest(
|
||||
http_referer=http_referer,
|
||||
x_title=x_title,
|
||||
author=author,
|
||||
slug=slug,
|
||||
)
|
||||
@@ -58,6 +67,10 @@ class Endpoints(BaseSDK):
|
||||
user_agent_header="user-agent",
|
||||
accept_header_value="application/json",
|
||||
http_headers=http_headers,
|
||||
_globals=operations.ListEndpointsGlobals(
|
||||
http_referer=self.sdk_configuration.globals.http_referer,
|
||||
x_title=self.sdk_configuration.globals.x_title,
|
||||
),
|
||||
security=self.sdk_configuration.security,
|
||||
allow_empty_value=None,
|
||||
timeout_ms=timeout_ms,
|
||||
@@ -117,6 +130,8 @@ class Endpoints(BaseSDK):
|
||||
*,
|
||||
author: str,
|
||||
slug: str,
|
||||
http_referer: Optional[str] = None,
|
||||
x_title: Optional[str] = None,
|
||||
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
||||
server_url: Optional[str] = None,
|
||||
timeout_ms: Optional[int] = None,
|
||||
@@ -126,6 +141,11 @@ class Endpoints(BaseSDK):
|
||||
|
||||
:param author:
|
||||
:param slug:
|
||||
:param http_referer: 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.
|
||||
|
||||
:param x_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
||||
|
||||
:param retries: Override the default retry configuration for this method
|
||||
:param server_url: Override the default server URL for this method
|
||||
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
||||
@@ -142,6 +162,8 @@ class Endpoints(BaseSDK):
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
request = operations.ListEndpointsRequest(
|
||||
http_referer=http_referer,
|
||||
x_title=x_title,
|
||||
author=author,
|
||||
slug=slug,
|
||||
)
|
||||
@@ -158,6 +180,10 @@ class Endpoints(BaseSDK):
|
||||
user_agent_header="user-agent",
|
||||
accept_header_value="application/json",
|
||||
http_headers=http_headers,
|
||||
_globals=operations.ListEndpointsGlobals(
|
||||
http_referer=self.sdk_configuration.globals.http_referer,
|
||||
x_title=self.sdk_configuration.globals.x_title,
|
||||
),
|
||||
security=self.sdk_configuration.security,
|
||||
allow_empty_value=None,
|
||||
timeout_ms=timeout_ms,
|
||||
@@ -215,6 +241,8 @@ class Endpoints(BaseSDK):
|
||||
def list_zdr_endpoints(
|
||||
self,
|
||||
*,
|
||||
http_referer: Optional[str] = None,
|
||||
x_title: Optional[str] = None,
|
||||
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
||||
server_url: Optional[str] = None,
|
||||
timeout_ms: Optional[int] = None,
|
||||
@@ -222,6 +250,11 @@ class Endpoints(BaseSDK):
|
||||
) -> operations.ListEndpointsZdrResponse:
|
||||
r"""Preview the impact of ZDR on the available endpoints
|
||||
|
||||
:param http_referer: 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.
|
||||
|
||||
:param x_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
||||
|
||||
:param retries: Override the default retry configuration for this method
|
||||
:param server_url: Override the default server URL for this method
|
||||
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
||||
@@ -236,18 +269,28 @@ class Endpoints(BaseSDK):
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
request = operations.ListEndpointsZdrRequest(
|
||||
http_referer=http_referer,
|
||||
x_title=x_title,
|
||||
)
|
||||
|
||||
req = self._build_request(
|
||||
method="GET",
|
||||
path="/endpoints/zdr",
|
||||
base_url=base_url,
|
||||
url_variables=url_variables,
|
||||
request=None,
|
||||
request=request,
|
||||
request_body_required=False,
|
||||
request_has_path_params=False,
|
||||
request_has_query_params=True,
|
||||
user_agent_header="user-agent",
|
||||
accept_header_value="application/json",
|
||||
http_headers=http_headers,
|
||||
_globals=operations.ListEndpointsZdrGlobals(
|
||||
http_referer=self.sdk_configuration.globals.http_referer,
|
||||
x_title=self.sdk_configuration.globals.x_title,
|
||||
),
|
||||
security=self.sdk_configuration.security,
|
||||
allow_empty_value=None,
|
||||
timeout_ms=timeout_ms,
|
||||
@@ -302,6 +345,8 @@ class Endpoints(BaseSDK):
|
||||
async def list_zdr_endpoints_async(
|
||||
self,
|
||||
*,
|
||||
http_referer: Optional[str] = None,
|
||||
x_title: Optional[str] = None,
|
||||
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
||||
server_url: Optional[str] = None,
|
||||
timeout_ms: Optional[int] = None,
|
||||
@@ -309,6 +354,11 @@ class Endpoints(BaseSDK):
|
||||
) -> operations.ListEndpointsZdrResponse:
|
||||
r"""Preview the impact of ZDR on the available endpoints
|
||||
|
||||
:param http_referer: 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.
|
||||
|
||||
:param x_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
||||
|
||||
:param retries: Override the default retry configuration for this method
|
||||
:param server_url: Override the default server URL for this method
|
||||
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
||||
@@ -323,18 +373,28 @@ class Endpoints(BaseSDK):
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
request = operations.ListEndpointsZdrRequest(
|
||||
http_referer=http_referer,
|
||||
x_title=x_title,
|
||||
)
|
||||
|
||||
req = self._build_request_async(
|
||||
method="GET",
|
||||
path="/endpoints/zdr",
|
||||
base_url=base_url,
|
||||
url_variables=url_variables,
|
||||
request=None,
|
||||
request=request,
|
||||
request_body_required=False,
|
||||
request_has_path_params=False,
|
||||
request_has_query_params=True,
|
||||
user_agent_header="user-agent",
|
||||
accept_header_value="application/json",
|
||||
http_headers=http_headers,
|
||||
_globals=operations.ListEndpointsZdrGlobals(
|
||||
http_referer=self.sdk_configuration.globals.http_referer,
|
||||
x_title=self.sdk_configuration.globals.x_title,
|
||||
),
|
||||
security=self.sdk_configuration.security,
|
||||
allow_empty_value=None,
|
||||
timeout_ms=timeout_ms,
|
||||
|
||||
Reference in New Issue
Block a user