Merge pull request #15 from hanzoai/release-please--branches--main--changes--next

release: 2.0.0
This commit is contained in:
2025-03-26 23:21:11 -05:00
committed by GitHub
20 changed files with 128 additions and 120 deletions
+1 -1
View File
@@ -1,3 +1,3 @@
{
".": "1.1.0"
".": "2.0.0"
}
+3 -3
View File
@@ -1,4 +1,4 @@
configured_endpoints: 188
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hanzo-industries-inc%2FHanzo-AI-74ec345bb9bd4c1c21bd22ff8ed2cd9b1cba5a5c73bf895113c7386b64199b56.yml
openapi_spec_hash: 526f5064d5a79d0a602c9d311b9f8f6b
config_hash: 20426fef371c3da1e306a85d8f9b9ada
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hanzo-industries-inc%2FHanzo-AI-d52d95e1cfea66db609fe20a4ebf5612dbb3b8f6bd1d444f43953dedf8fe55c5.yml
openapi_spec_hash: cab16da993c22dfa62f6e845990ff29f
config_hash: ba350ab5c18ad5058636cd0062736ace
+8
View File
@@ -1,5 +1,13 @@
# Changelog
## 2.0.0 (2025-03-27)
Full Changelog: [v1.1.0...v2.0.0](https://github.com/hanzoai/python-sdk/compare/v1.1.0...v2.0.0)
### Features
* **api:** api update ([#14](https://github.com/hanzoai/python-sdk/issues/14)) ([bd5f39c](https://github.com/hanzoai/python-sdk/commit/bd5f39c1eb8f8fdf04443ee8b448184b80759785))
## 1.1.0 (2025-03-26)
Full Changelog: [v1.0.0...v1.1.0](https://github.com/hanzoai/python-sdk/compare/v1.0.0...v1.1.0)
+1 -1
View File
@@ -1,6 +1,6 @@
[project]
name = "hanzoai"
version = "1.1.0"
version = "2.0.0"
description = "The official Python library for the Hanzo API"
dynamic = ["readme"]
license = "Apache-2.0"
+1 -1
View File
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
__title__ = "hanzoai"
__version__ = "1.1.0" # x-release-please-version
__version__ = "2.0.0" # x-release-please-version
+10 -10
View File
@@ -50,7 +50,7 @@ class AnthropicResource(SyncAPIResource):
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> object:
"""
[Docs](https://docs.llm.ai/docs/anthropic_completion)
[Docs](https://docs.hanzo.ai/docs/anthropic_completion)
Args:
extra_headers: Send extra headers
@@ -83,7 +83,7 @@ class AnthropicResource(SyncAPIResource):
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> object:
"""
[Docs](https://docs.llm.ai/docs/anthropic_completion)
[Docs](https://docs.hanzo.ai/docs/anthropic_completion)
Args:
extra_headers: Send extra headers
@@ -116,7 +116,7 @@ class AnthropicResource(SyncAPIResource):
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> object:
"""
[Docs](https://docs.llm.ai/docs/anthropic_completion)
[Docs](https://docs.hanzo.ai/docs/anthropic_completion)
Args:
extra_headers: Send extra headers
@@ -149,7 +149,7 @@ class AnthropicResource(SyncAPIResource):
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> object:
"""
[Docs](https://docs.llm.ai/docs/anthropic_completion)
[Docs](https://docs.hanzo.ai/docs/anthropic_completion)
Args:
extra_headers: Send extra headers
@@ -182,7 +182,7 @@ class AnthropicResource(SyncAPIResource):
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> object:
"""
[Docs](https://docs.llm.ai/docs/anthropic_completion)
[Docs](https://docs.hanzo.ai/docs/anthropic_completion)
Args:
extra_headers: Send extra headers
@@ -236,7 +236,7 @@ class AsyncAnthropicResource(AsyncAPIResource):
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> object:
"""
[Docs](https://docs.llm.ai/docs/anthropic_completion)
[Docs](https://docs.hanzo.ai/docs/anthropic_completion)
Args:
extra_headers: Send extra headers
@@ -269,7 +269,7 @@ class AsyncAnthropicResource(AsyncAPIResource):
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> object:
"""
[Docs](https://docs.llm.ai/docs/anthropic_completion)
[Docs](https://docs.hanzo.ai/docs/anthropic_completion)
Args:
extra_headers: Send extra headers
@@ -302,7 +302,7 @@ class AsyncAnthropicResource(AsyncAPIResource):
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> object:
"""
[Docs](https://docs.llm.ai/docs/anthropic_completion)
[Docs](https://docs.hanzo.ai/docs/anthropic_completion)
Args:
extra_headers: Send extra headers
@@ -335,7 +335,7 @@ class AsyncAnthropicResource(AsyncAPIResource):
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> object:
"""
[Docs](https://docs.llm.ai/docs/anthropic_completion)
[Docs](https://docs.hanzo.ai/docs/anthropic_completion)
Args:
extra_headers: Send extra headers
@@ -368,7 +368,7 @@ class AsyncAnthropicResource(AsyncAPIResource):
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> object:
"""
[Docs](https://docs.llm.ai/docs/anthropic_completion)
[Docs](https://docs.hanzo.ai/docs/anthropic_completion)
Args:
extra_headers: Send extra headers
+10 -10
View File
@@ -50,7 +50,7 @@ class BedrockResource(SyncAPIResource):
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> object:
"""
[Docs](https://docs.llm.ai/docs/pass_through/bedrock)
[Docs](https://docs.hanzo.ai/docs/pass_through/bedrock)
Args:
extra_headers: Send extra headers
@@ -83,7 +83,7 @@ class BedrockResource(SyncAPIResource):
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> object:
"""
[Docs](https://docs.llm.ai/docs/pass_through/bedrock)
[Docs](https://docs.hanzo.ai/docs/pass_through/bedrock)
Args:
extra_headers: Send extra headers
@@ -116,7 +116,7 @@ class BedrockResource(SyncAPIResource):
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> object:
"""
[Docs](https://docs.llm.ai/docs/pass_through/bedrock)
[Docs](https://docs.hanzo.ai/docs/pass_through/bedrock)
Args:
extra_headers: Send extra headers
@@ -149,7 +149,7 @@ class BedrockResource(SyncAPIResource):
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> object:
"""
[Docs](https://docs.llm.ai/docs/pass_through/bedrock)
[Docs](https://docs.hanzo.ai/docs/pass_through/bedrock)
Args:
extra_headers: Send extra headers
@@ -182,7 +182,7 @@ class BedrockResource(SyncAPIResource):
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> object:
"""
[Docs](https://docs.llm.ai/docs/pass_through/bedrock)
[Docs](https://docs.hanzo.ai/docs/pass_through/bedrock)
Args:
extra_headers: Send extra headers
@@ -236,7 +236,7 @@ class AsyncBedrockResource(AsyncAPIResource):
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> object:
"""
[Docs](https://docs.llm.ai/docs/pass_through/bedrock)
[Docs](https://docs.hanzo.ai/docs/pass_through/bedrock)
Args:
extra_headers: Send extra headers
@@ -269,7 +269,7 @@ class AsyncBedrockResource(AsyncAPIResource):
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> object:
"""
[Docs](https://docs.llm.ai/docs/pass_through/bedrock)
[Docs](https://docs.hanzo.ai/docs/pass_through/bedrock)
Args:
extra_headers: Send extra headers
@@ -302,7 +302,7 @@ class AsyncBedrockResource(AsyncAPIResource):
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> object:
"""
[Docs](https://docs.llm.ai/docs/pass_through/bedrock)
[Docs](https://docs.hanzo.ai/docs/pass_through/bedrock)
Args:
extra_headers: Send extra headers
@@ -335,7 +335,7 @@ class AsyncBedrockResource(AsyncAPIResource):
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> object:
"""
[Docs](https://docs.llm.ai/docs/pass_through/bedrock)
[Docs](https://docs.hanzo.ai/docs/pass_through/bedrock)
Args:
extra_headers: Send extra headers
@@ -368,7 +368,7 @@ class AsyncBedrockResource(AsyncAPIResource):
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> object:
"""
[Docs](https://docs.llm.ai/docs/pass_through/bedrock)
[Docs](https://docs.hanzo.ai/docs/pass_through/bedrock)
Args:
extra_headers: Send extra headers
+10 -10
View File
@@ -50,7 +50,7 @@ class CohereResource(SyncAPIResource):
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> object:
"""
[Docs](https://docs.llm.ai/docs/pass_through/cohere)
[Docs](https://docs.hanzo.ai/docs/pass_through/cohere)
Args:
extra_headers: Send extra headers
@@ -83,7 +83,7 @@ class CohereResource(SyncAPIResource):
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> object:
"""
[Docs](https://docs.llm.ai/docs/pass_through/cohere)
[Docs](https://docs.hanzo.ai/docs/pass_through/cohere)
Args:
extra_headers: Send extra headers
@@ -116,7 +116,7 @@ class CohereResource(SyncAPIResource):
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> object:
"""
[Docs](https://docs.llm.ai/docs/pass_through/cohere)
[Docs](https://docs.hanzo.ai/docs/pass_through/cohere)
Args:
extra_headers: Send extra headers
@@ -149,7 +149,7 @@ class CohereResource(SyncAPIResource):
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> object:
"""
[Docs](https://docs.llm.ai/docs/pass_through/cohere)
[Docs](https://docs.hanzo.ai/docs/pass_through/cohere)
Args:
extra_headers: Send extra headers
@@ -182,7 +182,7 @@ class CohereResource(SyncAPIResource):
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> object:
"""
[Docs](https://docs.llm.ai/docs/pass_through/cohere)
[Docs](https://docs.hanzo.ai/docs/pass_through/cohere)
Args:
extra_headers: Send extra headers
@@ -236,7 +236,7 @@ class AsyncCohereResource(AsyncAPIResource):
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> object:
"""
[Docs](https://docs.llm.ai/docs/pass_through/cohere)
[Docs](https://docs.hanzo.ai/docs/pass_through/cohere)
Args:
extra_headers: Send extra headers
@@ -269,7 +269,7 @@ class AsyncCohereResource(AsyncAPIResource):
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> object:
"""
[Docs](https://docs.llm.ai/docs/pass_through/cohere)
[Docs](https://docs.hanzo.ai/docs/pass_through/cohere)
Args:
extra_headers: Send extra headers
@@ -302,7 +302,7 @@ class AsyncCohereResource(AsyncAPIResource):
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> object:
"""
[Docs](https://docs.llm.ai/docs/pass_through/cohere)
[Docs](https://docs.hanzo.ai/docs/pass_through/cohere)
Args:
extra_headers: Send extra headers
@@ -335,7 +335,7 @@ class AsyncCohereResource(AsyncAPIResource):
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> object:
"""
[Docs](https://docs.llm.ai/docs/pass_through/cohere)
[Docs](https://docs.hanzo.ai/docs/pass_through/cohere)
Args:
extra_headers: Send extra headers
@@ -368,7 +368,7 @@ class AsyncCohereResource(AsyncAPIResource):
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> object:
"""
[Docs](https://docs.llm.ai/docs/pass_through/cohere)
[Docs](https://docs.hanzo.ai/docs/pass_through/cohere)
Args:
extra_headers: Send extra headers
+10 -10
View File
@@ -50,7 +50,7 @@ class GeminiResource(SyncAPIResource):
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> object:
"""
[Docs](https://docs.llm.ai/docs/pass_through/google_ai_studio)
[Docs](https://docs.hanzo.ai/docs/pass_through/google_ai_studio)
Args:
extra_headers: Send extra headers
@@ -83,7 +83,7 @@ class GeminiResource(SyncAPIResource):
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> object:
"""
[Docs](https://docs.llm.ai/docs/pass_through/google_ai_studio)
[Docs](https://docs.hanzo.ai/docs/pass_through/google_ai_studio)
Args:
extra_headers: Send extra headers
@@ -116,7 +116,7 @@ class GeminiResource(SyncAPIResource):
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> object:
"""
[Docs](https://docs.llm.ai/docs/pass_through/google_ai_studio)
[Docs](https://docs.hanzo.ai/docs/pass_through/google_ai_studio)
Args:
extra_headers: Send extra headers
@@ -149,7 +149,7 @@ class GeminiResource(SyncAPIResource):
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> object:
"""
[Docs](https://docs.llm.ai/docs/pass_through/google_ai_studio)
[Docs](https://docs.hanzo.ai/docs/pass_through/google_ai_studio)
Args:
extra_headers: Send extra headers
@@ -182,7 +182,7 @@ class GeminiResource(SyncAPIResource):
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> object:
"""
[Docs](https://docs.llm.ai/docs/pass_through/google_ai_studio)
[Docs](https://docs.hanzo.ai/docs/pass_through/google_ai_studio)
Args:
extra_headers: Send extra headers
@@ -236,7 +236,7 @@ class AsyncGeminiResource(AsyncAPIResource):
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> object:
"""
[Docs](https://docs.llm.ai/docs/pass_through/google_ai_studio)
[Docs](https://docs.hanzo.ai/docs/pass_through/google_ai_studio)
Args:
extra_headers: Send extra headers
@@ -269,7 +269,7 @@ class AsyncGeminiResource(AsyncAPIResource):
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> object:
"""
[Docs](https://docs.llm.ai/docs/pass_through/google_ai_studio)
[Docs](https://docs.hanzo.ai/docs/pass_through/google_ai_studio)
Args:
extra_headers: Send extra headers
@@ -302,7 +302,7 @@ class AsyncGeminiResource(AsyncAPIResource):
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> object:
"""
[Docs](https://docs.llm.ai/docs/pass_through/google_ai_studio)
[Docs](https://docs.hanzo.ai/docs/pass_through/google_ai_studio)
Args:
extra_headers: Send extra headers
@@ -335,7 +335,7 @@ class AsyncGeminiResource(AsyncAPIResource):
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> object:
"""
[Docs](https://docs.llm.ai/docs/pass_through/google_ai_studio)
[Docs](https://docs.hanzo.ai/docs/pass_through/google_ai_studio)
Args:
extra_headers: Send extra headers
@@ -368,7 +368,7 @@ class AsyncGeminiResource(AsyncAPIResource):
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> object:
"""
[Docs](https://docs.llm.ai/docs/pass_through/google_ai_studio)
[Docs](https://docs.hanzo.ai/docs/pass_through/google_ai_studio)
Args:
extra_headers: Send extra headers
+2 -2
View File
@@ -52,7 +52,7 @@ class GuardrailsResource(SyncAPIResource):
"""
List the guardrails that are available on the proxy server
👉 [Guardrail docs](https://docs.llm.ai/docs/proxy/guardrails/quick_start)
👉 [Guardrail docs](https://docs.hanzo.ai/docs/proxy/guardrails/quick_start)
Example Request:
@@ -127,7 +127,7 @@ class AsyncGuardrailsResource(AsyncAPIResource):
"""
List the guardrails that are available on the proxy server
👉 [Guardrail docs](https://docs.llm.ai/docs/proxy/guardrails/quick_start)
👉 [Guardrail docs](https://docs.hanzo.ai/docs/proxy/guardrails/quick_start)
Example Request:
+2 -2
View File
@@ -60,7 +60,7 @@ class HealthResource(SyncAPIResource):
"""
🚨 USE `/health/liveliness` to health check the proxy 🚨
See more 👉 https://docs.llm.ai/docs/proxy/health
See more 👉 https://docs.hanzo.ai/docs/proxy/health
Check the health of all the endpoints in config.yaml
@@ -237,7 +237,7 @@ class AsyncHealthResource(AsyncAPIResource):
"""
🚨 USE `/health/liveliness` to health check the proxy 🚨
See more 👉 https://docs.llm.ai/docs/proxy/health
See more 👉 https://docs.hanzo.ai/docs/proxy/health
Check the health of all the endpoints in config.yaml
+12 -12
View File
@@ -113,7 +113,7 @@ class KeyResource(SyncAPIResource):
- tags: Optional[List[str]] - Tags for organizing keys (Enterprise only)
- enforced_params: Optional[List[str]] - List of enforced params for the key
(Enterprise only).
[Docs](https://docs.llm.ai/docs/proxy/enterprise#enforce-required-params-for-llm-requests)
[Docs](https://docs.hanzo.ai/docs/proxy/enterprise#enforce-required-params-for-llm-requests)
- spend: Optional[float] - Amount spent by key
- max_budget: Optional[float] - Max budget for key
- model_max_budget: Optional[Dict[str, BudgetConfig]] - Model-specific budgets
@@ -503,7 +503,7 @@ class KeyResource(SyncAPIResource):
"""
Generate an API key based on the provided data.
Docs: https://docs.llm.ai/docs/proxy/virtual_keys
Docs: https://docs.hanzo.ai/docs/proxy/virtual_keys
Parameters:
@@ -521,12 +521,12 @@ class KeyResource(SyncAPIResource):
key is allowed to call all models)
- aliases: Optional[dict] - Any alias mappings, on top of anything in the
config.yaml model list. -
https://docs.llm.ai/docs/proxy/virtual_keys#managing-auth---upgradedowngrade-models
https://docs.hanzo.ai/docs/proxy/virtual_keys#managing-auth---upgradedowngrade-models
- config: Optional[dict] - any key-specific configs, overrides config in
config.yaml
- spend: Optional[int] - Amount spent by key. Default is 0. Will be updated by
proxy whenever key is used.
https://docs.llm.ai/docs/proxy/virtual_keys#managing-auth---tracking-spend
https://docs.hanzo.ai/docs/proxy/virtual_keys#managing-auth---tracking-spend
- send_invite_email: Optional[bool] - Whether to send an invite email to the
user_id, with the generate key
- max_budget: Optional[float] - Specify max budget for a given key.
@@ -552,7 +552,7 @@ class KeyResource(SyncAPIResource):
specific tpm limit.
- allowed_cache_controls: Optional[list] - List of allowed cache control values.
Example - ["no-cache", "no-store"]. See all values -
https://docs.llm.ai/docs/proxy/caching#turn-on--off-caching-per-request
https://docs.hanzo.ai/docs/proxy/caching#turn-on--off-caching-per-request
- blocked: Optional[bool] - Whether the key is blocked.
- rpm_limit: Optional[int] - Specify rpm limit for a given key (Requests per
minute)
@@ -566,7 +566,7 @@ class KeyResource(SyncAPIResource):
[tag-based routing](https://llm.vercel.app/docs/proxy/tag_routing).
- enforced_params: Optional[List[str]] - List of enforced params for the key
(Enterprise only).
[Docs](https://docs.llm.ai/docs/proxy/enterprise#enforce-required-params-for-llm-requests)
[Docs](https://docs.hanzo.ai/docs/proxy/enterprise#enforce-required-params-for-llm-requests)
Examples:
@@ -966,7 +966,7 @@ class AsyncKeyResource(AsyncAPIResource):
- tags: Optional[List[str]] - Tags for organizing keys (Enterprise only)
- enforced_params: Optional[List[str]] - List of enforced params for the key
(Enterprise only).
[Docs](https://docs.llm.ai/docs/proxy/enterprise#enforce-required-params-for-llm-requests)
[Docs](https://docs.hanzo.ai/docs/proxy/enterprise#enforce-required-params-for-llm-requests)
- spend: Optional[float] - Amount spent by key
- max_budget: Optional[float] - Max budget for key
- model_max_budget: Optional[Dict[str, BudgetConfig]] - Model-specific budgets
@@ -1356,7 +1356,7 @@ class AsyncKeyResource(AsyncAPIResource):
"""
Generate an API key based on the provided data.
Docs: https://docs.llm.ai/docs/proxy/virtual_keys
Docs: https://docs.hanzo.ai/docs/proxy/virtual_keys
Parameters:
@@ -1374,12 +1374,12 @@ class AsyncKeyResource(AsyncAPIResource):
key is allowed to call all models)
- aliases: Optional[dict] - Any alias mappings, on top of anything in the
config.yaml model list. -
https://docs.llm.ai/docs/proxy/virtual_keys#managing-auth---upgradedowngrade-models
https://docs.hanzo.ai/docs/proxy/virtual_keys#managing-auth---upgradedowngrade-models
- config: Optional[dict] - any key-specific configs, overrides config in
config.yaml
- spend: Optional[int] - Amount spent by key. Default is 0. Will be updated by
proxy whenever key is used.
https://docs.llm.ai/docs/proxy/virtual_keys#managing-auth---tracking-spend
https://docs.hanzo.ai/docs/proxy/virtual_keys#managing-auth---tracking-spend
- send_invite_email: Optional[bool] - Whether to send an invite email to the
user_id, with the generate key
- max_budget: Optional[float] - Specify max budget for a given key.
@@ -1405,7 +1405,7 @@ class AsyncKeyResource(AsyncAPIResource):
specific tpm limit.
- allowed_cache_controls: Optional[list] - List of allowed cache control values.
Example - ["no-cache", "no-store"]. See all values -
https://docs.llm.ai/docs/proxy/caching#turn-on--off-caching-per-request
https://docs.hanzo.ai/docs/proxy/caching#turn-on--off-caching-per-request
- blocked: Optional[bool] - Whether the key is blocked.
- rpm_limit: Optional[int] - Specify rpm limit for a given key (Requests per
minute)
@@ -1419,7 +1419,7 @@ class AsyncKeyResource(AsyncAPIResource):
[tag-based routing](https://llm.vercel.app/docs/proxy/tag_routing).
- enforced_params: Optional[List[str]] - List of enforced params for the key
(Enterprise only).
[Docs](https://docs.llm.ai/docs/proxy/enterprise#enforce-required-params-for-llm-requests)
[Docs](https://docs.hanzo.ai/docs/proxy/enterprise#enforce-required-params-for-llm-requests)
Examples:
+10 -10
View File
@@ -53,7 +53,7 @@ class LangfuseResource(SyncAPIResource):
Works with Langfuse SDK.
[Docs](https://docs.llm.ai/docs/pass_through/langfuse)
[Docs](https://docs.hanzo.ai/docs/pass_through/langfuse)
Args:
extra_headers: Send extra headers
@@ -89,7 +89,7 @@ class LangfuseResource(SyncAPIResource):
Works with Langfuse SDK.
[Docs](https://docs.llm.ai/docs/pass_through/langfuse)
[Docs](https://docs.hanzo.ai/docs/pass_through/langfuse)
Args:
extra_headers: Send extra headers
@@ -125,7 +125,7 @@ class LangfuseResource(SyncAPIResource):
Works with Langfuse SDK.
[Docs](https://docs.llm.ai/docs/pass_through/langfuse)
[Docs](https://docs.hanzo.ai/docs/pass_through/langfuse)
Args:
extra_headers: Send extra headers
@@ -161,7 +161,7 @@ class LangfuseResource(SyncAPIResource):
Works with Langfuse SDK.
[Docs](https://docs.llm.ai/docs/pass_through/langfuse)
[Docs](https://docs.hanzo.ai/docs/pass_through/langfuse)
Args:
extra_headers: Send extra headers
@@ -197,7 +197,7 @@ class LangfuseResource(SyncAPIResource):
Works with Langfuse SDK.
[Docs](https://docs.llm.ai/docs/pass_through/langfuse)
[Docs](https://docs.hanzo.ai/docs/pass_through/langfuse)
Args:
extra_headers: Send extra headers
@@ -254,7 +254,7 @@ class AsyncLangfuseResource(AsyncAPIResource):
Works with Langfuse SDK.
[Docs](https://docs.llm.ai/docs/pass_through/langfuse)
[Docs](https://docs.hanzo.ai/docs/pass_through/langfuse)
Args:
extra_headers: Send extra headers
@@ -290,7 +290,7 @@ class AsyncLangfuseResource(AsyncAPIResource):
Works with Langfuse SDK.
[Docs](https://docs.llm.ai/docs/pass_through/langfuse)
[Docs](https://docs.hanzo.ai/docs/pass_through/langfuse)
Args:
extra_headers: Send extra headers
@@ -326,7 +326,7 @@ class AsyncLangfuseResource(AsyncAPIResource):
Works with Langfuse SDK.
[Docs](https://docs.llm.ai/docs/pass_through/langfuse)
[Docs](https://docs.hanzo.ai/docs/pass_through/langfuse)
Args:
extra_headers: Send extra headers
@@ -362,7 +362,7 @@ class AsyncLangfuseResource(AsyncAPIResource):
Works with Langfuse SDK.
[Docs](https://docs.llm.ai/docs/pass_through/langfuse)
[Docs](https://docs.hanzo.ai/docs/pass_through/langfuse)
Args:
extra_headers: Send extra headers
@@ -398,7 +398,7 @@ class AsyncLangfuseResource(AsyncAPIResource):
Works with Langfuse SDK.
[Docs](https://docs.llm.ai/docs/pass_through/langfuse)
[Docs](https://docs.hanzo.ai/docs/pass_through/langfuse)
Args:
extra_headers: Send extra headers
+2 -2
View File
@@ -87,7 +87,7 @@ class ModelGroupResource(SyncAPIResource):
```
Learn how to use and set wildcard models
[here](https://docs.llm.ai/docs/wildcard_routing)
[here](https://docs.hanzo.ai/docs/wildcard_routing)
Example Response:
@@ -286,7 +286,7 @@ class AsyncModelGroupResource(AsyncAPIResource):
```
Learn how to use and set wildcard models
[here](https://docs.llm.ai/docs/wildcard_routing)
[here](https://docs.hanzo.ai/docs/wildcard_routing)
Example Response:
@@ -129,7 +129,7 @@ class OrganizationResource(SyncAPIResource):
- organization_id: _Optional[str]_ - The organization id of the team. Default is
None. Create via `/organization/new`.
- model_aliases: Optional[dict] - Model aliases for the team.
[Docs](https://docs.llm.ai/docs/proxy/team_based_routing#create-team-with-model-alias)
[Docs](https://docs.hanzo.ai/docs/proxy/team_based_routing#create-team-with-model-alias)
Case 1: Create new org **without** a budget_id
@@ -572,7 +572,7 @@ class AsyncOrganizationResource(AsyncAPIResource):
- organization_id: _Optional[str]_ - The organization id of the team. Default is
None. Create via `/organization/new`.
- model_aliases: Optional[dict] - Model aliases for the team.
[Docs](https://docs.llm.ai/docs/proxy/team_based_routing#create-team-with-model-alias)
[Docs](https://docs.hanzo.ai/docs/proxy/team_based_routing#create-team-with-model-alias)
Case 1: Create new org **without** a budget_id
+2 -2
View File
@@ -51,7 +51,7 @@ class ProviderResource(SyncAPIResource):
) -> ProviderListBudgetsResponse:
"""
Provider Budget Routing - Get Budget, Spend Details
https://docs.llm.ai/docs/proxy/provider_budget_routing
https://docs.hanzo.ai/docs/proxy/provider_budget_routing
Use this endpoint to check current budget, spend and budget reset time for a
provider
@@ -136,7 +136,7 @@ class AsyncProviderResource(AsyncAPIResource):
) -> ProviderListBudgetsResponse:
"""
Provider Budget Routing - Get Budget, Spend Details
https://docs.llm.ai/docs/proxy/provider_budget_routing
https://docs.hanzo.ai/docs/proxy/provider_budget_routing
Use this endpoint to check current budget, spend and budget reset time for a
provider
+2 -2
View File
@@ -66,7 +66,7 @@ class SpendResource(SyncAPIResource):
Calculate spend **before** making call:
Note: If you see a spend of $0.0 you need to set custom_pricing for your model:
https://docs.llm.ai/docs/proxy/custom_pricing
https://docs.hanzo.ai/docs/proxy/custom_pricing
```
curl --location 'http://localhost:4000/spend/calculate'
@@ -316,7 +316,7 @@ class AsyncSpendResource(AsyncAPIResource):
Calculate spend **before** making call:
Note: If you see a spend of $0.0 you need to set custom_pricing for your model:
https://docs.llm.ai/docs/proxy/custom_pricing
https://docs.hanzo.ai/docs/proxy/custom_pricing
```
curl --location 'http://localhost:4000/spend/calculate'
+14 -14
View File
@@ -119,7 +119,7 @@ class TeamResource(SyncAPIResource):
Apply user permissions to their team.
👉
[Detailed Doc on setting team budgets](https://docs.llm.ai/docs/proxy/team_budgets)
[Detailed Doc on setting team budgets](https://docs.hanzo.ai/docs/proxy/team_budgets)
Parameters:
@@ -138,7 +138,7 @@ class TeamResource(SyncAPIResource):
- max_budget: Optional[float] - The maximum budget allocated to the team - all
keys for this team_id will have at max this max_budget
- budget_duration: Optional[str] - The duration of the budget for the team. Doc
[here](https://docs.llm.ai/docs/proxy/team_budgets)
[here](https://docs.hanzo.ai/docs/proxy/team_budgets)
- models: Optional[list] - A list of models associated with the team - all keys
for this team_id will have at most, these models. If empty, assumes all models
are allowed.
@@ -153,9 +153,9 @@ class TeamResource(SyncAPIResource):
- organization_id: Optional[str] - The organization id of the team. Default is
None. Create via `/organization/new`.
- model_aliases: Optional[dict] - Model aliases for the team.
[Docs](https://docs.llm.ai/docs/proxy/team_based_routing#create-team-with-model-alias)
[Docs](https://docs.hanzo.ai/docs/proxy/team_based_routing#create-team-with-model-alias)
- guardrails: Optional[List[str]] - Guardrails for the team.
[Docs](https://docs.llm.ai/docs/proxy/guardrails) Returns:
[Docs](https://docs.hanzo.ai/docs/proxy/guardrails) Returns:
- team_id: (str) Unique team id - used for tracking spend across multiple keys
for same team id.
@@ -268,7 +268,7 @@ class TeamResource(SyncAPIResource):
- max_budget: Optional[float] - The maximum budget allocated to the team - all
keys for this team_id will have at max this max_budget
- budget_duration: Optional[str] - The duration of the budget for the team. Doc
[here](https://docs.llm.ai/docs/proxy/team_budgets)
[here](https://docs.hanzo.ai/docs/proxy/team_budgets)
- models: Optional[list] - A list of models associated with the team - all keys
for this team_id will have at most, these models. If empty, assumes all models
are allowed.
@@ -281,9 +281,9 @@ class TeamResource(SyncAPIResource):
- organization_id: Optional[str] - The organization id of the team. Default is
None. Create via `/organization/new`.
- model_aliases: Optional[dict] - Model aliases for the team.
[Docs](https://docs.llm.ai/docs/proxy/team_based_routing#create-team-with-model-alias)
[Docs](https://docs.hanzo.ai/docs/proxy/team_based_routing#create-team-with-model-alias)
- guardrails: Optional[List[str]] - Guardrails for the team.
[Docs](https://docs.llm.ai/docs/proxy/guardrails) Example - update team TPM
[Docs](https://docs.hanzo.ai/docs/proxy/guardrails) Example - update team TPM
Limit
```
@@ -877,7 +877,7 @@ class AsyncTeamResource(AsyncAPIResource):
Apply user permissions to their team.
👉
[Detailed Doc on setting team budgets](https://docs.llm.ai/docs/proxy/team_budgets)
[Detailed Doc on setting team budgets](https://docs.hanzo.ai/docs/proxy/team_budgets)
Parameters:
@@ -896,7 +896,7 @@ class AsyncTeamResource(AsyncAPIResource):
- max_budget: Optional[float] - The maximum budget allocated to the team - all
keys for this team_id will have at max this max_budget
- budget_duration: Optional[str] - The duration of the budget for the team. Doc
[here](https://docs.llm.ai/docs/proxy/team_budgets)
[here](https://docs.hanzo.ai/docs/proxy/team_budgets)
- models: Optional[list] - A list of models associated with the team - all keys
for this team_id will have at most, these models. If empty, assumes all models
are allowed.
@@ -911,9 +911,9 @@ class AsyncTeamResource(AsyncAPIResource):
- organization_id: Optional[str] - The organization id of the team. Default is
None. Create via `/organization/new`.
- model_aliases: Optional[dict] - Model aliases for the team.
[Docs](https://docs.llm.ai/docs/proxy/team_based_routing#create-team-with-model-alias)
[Docs](https://docs.hanzo.ai/docs/proxy/team_based_routing#create-team-with-model-alias)
- guardrails: Optional[List[str]] - Guardrails for the team.
[Docs](https://docs.llm.ai/docs/proxy/guardrails) Returns:
[Docs](https://docs.hanzo.ai/docs/proxy/guardrails) Returns:
- team_id: (str) Unique team id - used for tracking spend across multiple keys
for same team id.
@@ -1026,7 +1026,7 @@ class AsyncTeamResource(AsyncAPIResource):
- max_budget: Optional[float] - The maximum budget allocated to the team - all
keys for this team_id will have at max this max_budget
- budget_duration: Optional[str] - The duration of the budget for the team. Doc
[here](https://docs.llm.ai/docs/proxy/team_budgets)
[here](https://docs.hanzo.ai/docs/proxy/team_budgets)
- models: Optional[list] - A list of models associated with the team - all keys
for this team_id will have at most, these models. If empty, assumes all models
are allowed.
@@ -1039,9 +1039,9 @@ class AsyncTeamResource(AsyncAPIResource):
- organization_id: Optional[str] - The organization id of the team. Default is
None. Create via `/organization/new`.
- model_aliases: Optional[dict] - Model aliases for the team.
[Docs](https://docs.llm.ai/docs/proxy/team_based_routing#create-team-with-model-alias)
[Docs](https://docs.hanzo.ai/docs/proxy/team_based_routing#create-team-with-model-alias)
- guardrails: Optional[List[str]] - Guardrails for the team.
[Docs](https://docs.llm.ai/docs/proxy/guardrails) Example - update team TPM
[Docs](https://docs.hanzo.ai/docs/proxy/guardrails) Example - update team TPM
Limit
```
+16 -16
View File
@@ -131,7 +131,7 @@ class UserResource(SyncAPIResource):
- config: Optional[dict] - [DEPRECATED PARAM] User-specific config.
- allowed_cache_controls: Optional[list] - List of allowed cache control values.
Example - ["no-cache", "no-store"]. See all values -
https://docs.llm.ai/docs/proxy/caching#turn-on--off-caching-per-request-
https://docs.hanzo.ai/docs/proxy/caching#turn-on--off-caching-per-request-
- blocked: Optional[bool] - [Not Implemented Yet] Whether the user is blocked.
- guardrails: Optional[List[str]] - [Not Implemented Yet] List of active
guardrails for the user
@@ -145,11 +145,11 @@ class UserResource(SyncAPIResource):
- soft_budget: Optional[float] - Get alerts when user crosses given budget,
doesn't block requests.
- model_max_budget: Optional[dict] - Model-specific max budget for user.
[Docs](https://docs.llm.ai/docs/proxy/users#add-model-specific-budgets-to-keys)
[Docs](https://docs.hanzo.ai/docs/proxy/users#add-model-specific-budgets-to-keys)
- model_rpm_limit: Optional[float] - Model-specific rpm limit for user.
[Docs](https://docs.llm.ai/docs/proxy/users#add-model-specific-limits-to-keys)
[Docs](https://docs.hanzo.ai/docs/proxy/users#add-model-specific-limits-to-keys)
- model_tpm_limit: Optional[float] - Model-specific tpm limit for user.
[Docs](https://docs.llm.ai/docs/proxy/users#add-model-specific-limits-to-keys)
[Docs](https://docs.hanzo.ai/docs/proxy/users#add-model-specific-limits-to-keys)
- spend: Optional[float] - Amount spent by user. Default is 0. Will be updated
by proxy whenever user is used. You can set duration as seconds ("30s"),
minutes ("30m"), hours ("30h"), days ("30d"), months ("1mo").
@@ -295,7 +295,7 @@ class UserResource(SyncAPIResource):
Optional[dict] - [DEPRECATED PARAM] User-specific config. -
allowed_cache_controls: Optional[list] - List of allowed cache control values.
Example - ["no-cache", "no-store"]. See all values -
https://docs.llm.ai/docs/proxy/caching#turn-on--off-caching-per-request- -
https://docs.hanzo.ai/docs/proxy/caching#turn-on--off-caching-per-request- -
blocked: Optional[bool] - [Not Implemented Yet] Whether the user is blocked. -
guardrails: Optional[List[str]] - [Not Implemented Yet] List of active
guardrails for the user - permissions: Optional[dict] - [Not Implemented Yet]
@@ -307,11 +307,11 @@ class UserResource(SyncAPIResource):
soft_budget: Optional[float] - Get alerts when user crosses given budget,
doesn't block requests. - model_max_budget: Optional[dict] - Model-specific max
budget for user.
[Docs](https://docs.llm.ai/docs/proxy/users#add-model-specific-budgets-to-keys) -
[Docs](https://docs.hanzo.ai/docs/proxy/users#add-model-specific-budgets-to-keys) -
model_rpm_limit: Optional[float] - Model-specific rpm limit for user.
[Docs](https://docs.llm.ai/docs/proxy/users#add-model-specific-limits-to-keys) -
[Docs](https://docs.hanzo.ai/docs/proxy/users#add-model-specific-limits-to-keys) -
model_tpm_limit: Optional[float] - Model-specific tpm limit for user.
[Docs](https://docs.llm.ai/docs/proxy/users#add-model-specific-limits-to-keys) -
[Docs](https://docs.hanzo.ai/docs/proxy/users#add-model-specific-limits-to-keys) -
spend: Optional[float] - Amount spent by user. Default is 0. Will be updated by
proxy whenever user is used. You can set duration as seconds ("30s"), minutes
("30m"), hours ("30h"), days ("30d"), months ("1mo"). - team_id: Optional[str] -
@@ -628,7 +628,7 @@ class AsyncUserResource(AsyncAPIResource):
- config: Optional[dict] - [DEPRECATED PARAM] User-specific config.
- allowed_cache_controls: Optional[list] - List of allowed cache control values.
Example - ["no-cache", "no-store"]. See all values -
https://docs.llm.ai/docs/proxy/caching#turn-on--off-caching-per-request-
https://docs.hanzo.ai/docs/proxy/caching#turn-on--off-caching-per-request-
- blocked: Optional[bool] - [Not Implemented Yet] Whether the user is blocked.
- guardrails: Optional[List[str]] - [Not Implemented Yet] List of active
guardrails for the user
@@ -642,11 +642,11 @@ class AsyncUserResource(AsyncAPIResource):
- soft_budget: Optional[float] - Get alerts when user crosses given budget,
doesn't block requests.
- model_max_budget: Optional[dict] - Model-specific max budget for user.
[Docs](https://docs.llm.ai/docs/proxy/users#add-model-specific-budgets-to-keys)
[Docs](https://docs.hanzo.ai/docs/proxy/users#add-model-specific-budgets-to-keys)
- model_rpm_limit: Optional[float] - Model-specific rpm limit for user.
[Docs](https://docs.llm.ai/docs/proxy/users#add-model-specific-limits-to-keys)
[Docs](https://docs.hanzo.ai/docs/proxy/users#add-model-specific-limits-to-keys)
- model_tpm_limit: Optional[float] - Model-specific tpm limit for user.
[Docs](https://docs.llm.ai/docs/proxy/users#add-model-specific-limits-to-keys)
[Docs](https://docs.hanzo.ai/docs/proxy/users#add-model-specific-limits-to-keys)
- spend: Optional[float] - Amount spent by user. Default is 0. Will be updated
by proxy whenever user is used. You can set duration as seconds ("30s"),
minutes ("30m"), hours ("30h"), days ("30d"), months ("1mo").
@@ -792,7 +792,7 @@ class AsyncUserResource(AsyncAPIResource):
Optional[dict] - [DEPRECATED PARAM] User-specific config. -
allowed_cache_controls: Optional[list] - List of allowed cache control values.
Example - ["no-cache", "no-store"]. See all values -
https://docs.llm.ai/docs/proxy/caching#turn-on--off-caching-per-request- -
https://docs.hanzo.ai/docs/proxy/caching#turn-on--off-caching-per-request- -
blocked: Optional[bool] - [Not Implemented Yet] Whether the user is blocked. -
guardrails: Optional[List[str]] - [Not Implemented Yet] List of active
guardrails for the user - permissions: Optional[dict] - [Not Implemented Yet]
@@ -804,11 +804,11 @@ class AsyncUserResource(AsyncAPIResource):
soft_budget: Optional[float] - Get alerts when user crosses given budget,
doesn't block requests. - model_max_budget: Optional[dict] - Model-specific max
budget for user.
[Docs](https://docs.llm.ai/docs/proxy/users#add-model-specific-budgets-to-keys) -
[Docs](https://docs.hanzo.ai/docs/proxy/users#add-model-specific-budgets-to-keys) -
model_rpm_limit: Optional[float] - Model-specific rpm limit for user.
[Docs](https://docs.llm.ai/docs/proxy/users#add-model-specific-limits-to-keys) -
[Docs](https://docs.hanzo.ai/docs/proxy/users#add-model-specific-limits-to-keys) -
model_tpm_limit: Optional[float] - Model-specific tpm limit for user.
[Docs](https://docs.llm.ai/docs/proxy/users#add-model-specific-limits-to-keys) -
[Docs](https://docs.hanzo.ai/docs/proxy/users#add-model-specific-limits-to-keys) -
spend: Optional[float] - Amount spent by user. Default is 0. Will be updated by
proxy whenever user is used. You can set duration as seconds ("30s"), minutes
("30m"), hours ("30h"), days ("30d"), months ("1mo"). - team_id: Optional[str] -
+10 -10
View File
@@ -52,7 +52,7 @@ class VertexAIResource(SyncAPIResource):
"""
Call LLM proxy via Vertex AI SDK.
[Docs](https://docs.llm.ai/docs/pass_through/vertex_ai)
[Docs](https://docs.hanzo.ai/docs/pass_through/vertex_ai)
Args:
extra_headers: Send extra headers
@@ -87,7 +87,7 @@ class VertexAIResource(SyncAPIResource):
"""
Call LLM proxy via Vertex AI SDK.
[Docs](https://docs.llm.ai/docs/pass_through/vertex_ai)
[Docs](https://docs.hanzo.ai/docs/pass_through/vertex_ai)
Args:
extra_headers: Send extra headers
@@ -122,7 +122,7 @@ class VertexAIResource(SyncAPIResource):
"""
Call LLM proxy via Vertex AI SDK.
[Docs](https://docs.llm.ai/docs/pass_through/vertex_ai)
[Docs](https://docs.hanzo.ai/docs/pass_through/vertex_ai)
Args:
extra_headers: Send extra headers
@@ -157,7 +157,7 @@ class VertexAIResource(SyncAPIResource):
"""
Call LLM proxy via Vertex AI SDK.
[Docs](https://docs.llm.ai/docs/pass_through/vertex_ai)
[Docs](https://docs.hanzo.ai/docs/pass_through/vertex_ai)
Args:
extra_headers: Send extra headers
@@ -192,7 +192,7 @@ class VertexAIResource(SyncAPIResource):
"""
Call LLM proxy via Vertex AI SDK.
[Docs](https://docs.llm.ai/docs/pass_through/vertex_ai)
[Docs](https://docs.hanzo.ai/docs/pass_through/vertex_ai)
Args:
extra_headers: Send extra headers
@@ -248,7 +248,7 @@ class AsyncVertexAIResource(AsyncAPIResource):
"""
Call LLM proxy via Vertex AI SDK.
[Docs](https://docs.llm.ai/docs/pass_through/vertex_ai)
[Docs](https://docs.hanzo.ai/docs/pass_through/vertex_ai)
Args:
extra_headers: Send extra headers
@@ -283,7 +283,7 @@ class AsyncVertexAIResource(AsyncAPIResource):
"""
Call LLM proxy via Vertex AI SDK.
[Docs](https://docs.llm.ai/docs/pass_through/vertex_ai)
[Docs](https://docs.hanzo.ai/docs/pass_through/vertex_ai)
Args:
extra_headers: Send extra headers
@@ -318,7 +318,7 @@ class AsyncVertexAIResource(AsyncAPIResource):
"""
Call LLM proxy via Vertex AI SDK.
[Docs](https://docs.llm.ai/docs/pass_through/vertex_ai)
[Docs](https://docs.hanzo.ai/docs/pass_through/vertex_ai)
Args:
extra_headers: Send extra headers
@@ -353,7 +353,7 @@ class AsyncVertexAIResource(AsyncAPIResource):
"""
Call LLM proxy via Vertex AI SDK.
[Docs](https://docs.llm.ai/docs/pass_through/vertex_ai)
[Docs](https://docs.hanzo.ai/docs/pass_through/vertex_ai)
Args:
extra_headers: Send extra headers
@@ -388,7 +388,7 @@ class AsyncVertexAIResource(AsyncAPIResource):
"""
Call LLM proxy via Vertex AI SDK.
[Docs](https://docs.llm.ai/docs/pass_through/vertex_ai)
[Docs](https://docs.hanzo.ai/docs/pass_through/vertex_ai)
Args:
extra_headers: Send extra headers