client: regenerate from hanzo-inc/cloud@86dcaea809 (8.5.749)

Co-authored-by: Hanzo Dev <[email protected]>
This commit is contained in:
2026-10-16 01:48:59 +00:00
co-authored by Hanzo Dev
parent 45338077fd
commit 1f662442f4
14 changed files with 984 additions and 12 deletions
+6
View File
@@ -278,6 +278,7 @@ pkg/hanzoai/cloud/models/ai_model_providers.py
pkg/hanzoai/cloud/models/ai_models.py
pkg/hanzoai/cloud/models/ai_panel_judge.py
pkg/hanzoai/cloud/models/ai_paused.py
pkg/hanzoai/cloud/models/ai_per_million.py
pkg/hanzoai/cloud/models/ai_price.py
pkg/hanzoai/cloud/models/ai_provider_usage.py
pkg/hanzoai/cloud/models/ai_provider_usage_model_spend.py
@@ -2476,6 +2477,8 @@ pkg/hanzoai/cloud/models/pref_prefs_view.py
pkg/hanzoai/cloud/models/pricing_card.py
pkg/hanzoai/cloud/models/pricing_component.py
pkg/hanzoai/cloud/models/pricing_enablement_board.py
pkg/hanzoai/cloud/models/pricing_enso_out.py
pkg/hanzoai/cloud/models/pricing_price.py
pkg/hanzoai/cloud/models/pricing_pricing_health.py
pkg/hanzoai/cloud/models/pricing_pricing_model_list.py
pkg/hanzoai/cloud/models/pricing_pricing_plan_list.py
@@ -2484,7 +2487,10 @@ pkg/hanzoai/cloud/models/pricing_pricing_provider_list.py
pkg/hanzoai/cloud/models/pricing_pricing_region_list.py
pkg/hanzoai/cloud/models/pricing_pricing_tier_list.py
pkg/hanzoai/cloud/models/pricing_pricing_tool_list.py
pkg/hanzoai/cloud/models/pricing_quote.py
pkg/hanzoai/cloud/models/pricing_rate.py
pkg/hanzoai/cloud/models/pricing_rate_arm.py
pkg/hanzoai/cloud/models/pricing_rate_window.py
pkg/hanzoai/cloud/models/pricing_speed.py
pkg/hanzoai/cloud/models/pricing_user_enablement_item.py
pkg/hanzoai/cloud/models/principal_agent_brief.py
+2 -2
View File
@@ -1,4 +1,4 @@
ref=f8d9d2abcf6348c49ad4401b160b565eb484f12c
sha256=5d049a5c9b656205235ba4299dc969fd55ad816461939b7e6d70b7641fb9dd6e
ref=86dcaea8092b3597a6325b7abd6df0b820978160
sha256=8886c3c7b7f8e5feee00b09a36241a3a283fc43a24ccdb1264dc44606115f901
repo=hanzo-inc/cloud
path=openapi.yaml
+12
View File
@@ -300,6 +300,7 @@ __all__ = [
"AiModels",
"AiPanelJudge",
"AiPaused",
"AiPerMillion",
"AiPrice",
"AiProviderUsage",
"AiProviderUsageModelSpend",
@@ -2498,6 +2499,8 @@ __all__ = [
"PricingCard",
"PricingComponent",
"PricingEnablementBoard",
"PricingEnsoOut",
"PricingPrice",
"PricingPricingHealth",
"PricingPricingModelList",
"PricingPricingPlanList",
@@ -2506,7 +2509,10 @@ __all__ = [
"PricingPricingRegionList",
"PricingPricingTierList",
"PricingPricingToolList",
"PricingQuote",
"PricingRate",
"PricingRateArm",
"PricingRateWindow",
"PricingSpeed",
"PricingUserEnablementItem",
"PrincipalAgentBrief",
@@ -3465,6 +3471,7 @@ from hanzoai.cloud.models.ai_model_providers import AiModelProviders as AiModelP
from hanzoai.cloud.models.ai_models import AiModels as AiModels
from hanzoai.cloud.models.ai_panel_judge import AiPanelJudge as AiPanelJudge
from hanzoai.cloud.models.ai_paused import AiPaused as AiPaused
from hanzoai.cloud.models.ai_per_million import AiPerMillion as AiPerMillion
from hanzoai.cloud.models.ai_price import AiPrice as AiPrice
from hanzoai.cloud.models.ai_provider_usage import AiProviderUsage as AiProviderUsage
from hanzoai.cloud.models.ai_provider_usage_model_spend import AiProviderUsageModelSpend as AiProviderUsageModelSpend
@@ -5663,6 +5670,8 @@ from hanzoai.cloud.models.pref_prefs_view import PrefPrefsView as PrefPrefsView
from hanzoai.cloud.models.pricing_card import PricingCard as PricingCard
from hanzoai.cloud.models.pricing_component import PricingComponent as PricingComponent
from hanzoai.cloud.models.pricing_enablement_board import PricingEnablementBoard as PricingEnablementBoard
from hanzoai.cloud.models.pricing_enso_out import PricingEnsoOut as PricingEnsoOut
from hanzoai.cloud.models.pricing_price import PricingPrice as PricingPrice
from hanzoai.cloud.models.pricing_pricing_health import PricingPricingHealth as PricingPricingHealth
from hanzoai.cloud.models.pricing_pricing_model_list import PricingPricingModelList as PricingPricingModelList
from hanzoai.cloud.models.pricing_pricing_plan_list import PricingPricingPlanList as PricingPricingPlanList
@@ -5671,7 +5680,10 @@ from hanzoai.cloud.models.pricing_pricing_provider_list import PricingPricingPro
from hanzoai.cloud.models.pricing_pricing_region_list import PricingPricingRegionList as PricingPricingRegionList
from hanzoai.cloud.models.pricing_pricing_tier_list import PricingPricingTierList as PricingPricingTierList
from hanzoai.cloud.models.pricing_pricing_tool_list import PricingPricingToolList as PricingPricingToolList
from hanzoai.cloud.models.pricing_quote import PricingQuote as PricingQuote
from hanzoai.cloud.models.pricing_rate import PricingRate as PricingRate
from hanzoai.cloud.models.pricing_rate_arm import PricingRateArm as PricingRateArm
from hanzoai.cloud.models.pricing_rate_window import PricingRateWindow as PricingRateWindow
from hanzoai.cloud.models.pricing_speed import PricingSpeed as PricingSpeed
from hanzoai.cloud.models.pricing_user_enablement_item import PricingUserEnablementItem as PricingUserEnablementItem
from hanzoai.cloud.models.principal_agent_brief import PrincipalAgentBrief as PrincipalAgentBrief
+321 -5
View File
@@ -16,11 +16,12 @@ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
from typing import Any, Dict, List, Optional, Tuple, Union
from typing_extensions import Annotated
from pydantic import Field, StrictStr
from typing import Any, Dict
from pydantic import Field, StrictBool, StrictStr
from typing import Any, Dict, Optional
from typing_extensions import Annotated
from hanzoai.cloud.models.pricing_card import PricingCard
from hanzoai.cloud.models.pricing_enablement_board import PricingEnablementBoard
from hanzoai.cloud.models.pricing_enso_out import PricingEnsoOut
from hanzoai.cloud.models.pricing_pricing_health import PricingPricingHealth
from hanzoai.cloud.models.pricing_pricing_model_list import PricingPricingModelList
from hanzoai.cloud.models.pricing_pricing_plan_list import PricingPricingPlanList
@@ -2765,6 +2766,321 @@ class PricingApi:
@validate_call
def get_pricing_enso(
self,
preset: Annotated[Optional[StrictStr], Field(description="Preset is the Enso model to quote (\"enso-flash\"); empty quotes every one.")] = None,
reasoning: Annotated[Optional[StrictStr], Field(description="Reasoning is the depth to quote it at: none, low, medium, high, max, or default (what a request that names none gets). Empty quotes every depth together.")] = None,
arms: Annotated[Optional[StrictStr], Field(description="Arms quotes a set of models composed into a blend instead, comma-separated ids (the arms of a /v1/benchmark/presets blend): from its cheapest, up to its dearest, nothing typical.")] = None,
byok: Annotated[Optional[StrictBool], Field(description="BYOK quotes the platform's fee on a call the org's own provider key pays for.")] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> PricingEnsoOut:
"""Quotes what Enso costs.
Quotes what Enso costs. A call bills what its arms cost us — each provider's price, and OpenRouter's fee where OpenRouter's credit bought it — and the platform's fee on top, so a model has three prices: from (its cheapest arm), typical (what its calls cost over the last day, or its last calls when the day held few) and upTo (its dearest arm, a long prompt's price included), in dollars a million tokens. Preset and reasoning narrow the answer to one model at one depth; arms quotes a blend of models instead. A SuperAdmin's answer names each model's arms.
:param preset: Preset is the Enso model to quote (\"enso-flash\"); empty quotes every one.
:type preset: str
:param reasoning: Reasoning is the depth to quote it at: none, low, medium, high, max, or default (what a request that names none gets). Empty quotes every depth together.
:type reasoning: str
:param arms: Arms quotes a set of models composed into a blend instead, comma-separated ids (the arms of a /v1/benchmark/presets blend): from its cheapest, up to its dearest, nothing typical.
:type arms: str
:param byok: BYOK quotes the platform's fee on a call the org's own provider key pays for.
:type byok: bool
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._get_pricing_enso_serialize(
preset=preset,
reasoning=reasoning,
arms=arms,
byok=byok,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "PricingEnsoOut",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
response_data.read()
return self.api_client.response_deserialize(
response_data=response_data,
response_types_map=_response_types_map,
).data
@validate_call
def get_pricing_enso_with_http_info(
self,
preset: Annotated[Optional[StrictStr], Field(description="Preset is the Enso model to quote (\"enso-flash\"); empty quotes every one.")] = None,
reasoning: Annotated[Optional[StrictStr], Field(description="Reasoning is the depth to quote it at: none, low, medium, high, max, or default (what a request that names none gets). Empty quotes every depth together.")] = None,
arms: Annotated[Optional[StrictStr], Field(description="Arms quotes a set of models composed into a blend instead, comma-separated ids (the arms of a /v1/benchmark/presets blend): from its cheapest, up to its dearest, nothing typical.")] = None,
byok: Annotated[Optional[StrictBool], Field(description="BYOK quotes the platform's fee on a call the org's own provider key pays for.")] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> ApiResponse[PricingEnsoOut]:
"""Quotes what Enso costs.
Quotes what Enso costs. A call bills what its arms cost us — each provider's price, and OpenRouter's fee where OpenRouter's credit bought it — and the platform's fee on top, so a model has three prices: from (its cheapest arm), typical (what its calls cost over the last day, or its last calls when the day held few) and upTo (its dearest arm, a long prompt's price included), in dollars a million tokens. Preset and reasoning narrow the answer to one model at one depth; arms quotes a blend of models instead. A SuperAdmin's answer names each model's arms.
:param preset: Preset is the Enso model to quote (\"enso-flash\"); empty quotes every one.
:type preset: str
:param reasoning: Reasoning is the depth to quote it at: none, low, medium, high, max, or default (what a request that names none gets). Empty quotes every depth together.
:type reasoning: str
:param arms: Arms quotes a set of models composed into a blend instead, comma-separated ids (the arms of a /v1/benchmark/presets blend): from its cheapest, up to its dearest, nothing typical.
:type arms: str
:param byok: BYOK quotes the platform's fee on a call the org's own provider key pays for.
:type byok: bool
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._get_pricing_enso_serialize(
preset=preset,
reasoning=reasoning,
arms=arms,
byok=byok,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "PricingEnsoOut",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
response_data.read()
return self.api_client.response_deserialize(
response_data=response_data,
response_types_map=_response_types_map,
)
@validate_call
def get_pricing_enso_without_preload_content(
self,
preset: Annotated[Optional[StrictStr], Field(description="Preset is the Enso model to quote (\"enso-flash\"); empty quotes every one.")] = None,
reasoning: Annotated[Optional[StrictStr], Field(description="Reasoning is the depth to quote it at: none, low, medium, high, max, or default (what a request that names none gets). Empty quotes every depth together.")] = None,
arms: Annotated[Optional[StrictStr], Field(description="Arms quotes a set of models composed into a blend instead, comma-separated ids (the arms of a /v1/benchmark/presets blend): from its cheapest, up to its dearest, nothing typical.")] = None,
byok: Annotated[Optional[StrictBool], Field(description="BYOK quotes the platform's fee on a call the org's own provider key pays for.")] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
"""Quotes what Enso costs.
Quotes what Enso costs. A call bills what its arms cost us — each provider's price, and OpenRouter's fee where OpenRouter's credit bought it — and the platform's fee on top, so a model has three prices: from (its cheapest arm), typical (what its calls cost over the last day, or its last calls when the day held few) and upTo (its dearest arm, a long prompt's price included), in dollars a million tokens. Preset and reasoning narrow the answer to one model at one depth; arms quotes a blend of models instead. A SuperAdmin's answer names each model's arms.
:param preset: Preset is the Enso model to quote (\"enso-flash\"); empty quotes every one.
:type preset: str
:param reasoning: Reasoning is the depth to quote it at: none, low, medium, high, max, or default (what a request that names none gets). Empty quotes every depth together.
:type reasoning: str
:param arms: Arms quotes a set of models composed into a blend instead, comma-separated ids (the arms of a /v1/benchmark/presets blend): from its cheapest, up to its dearest, nothing typical.
:type arms: str
:param byok: BYOK quotes the platform's fee on a call the org's own provider key pays for.
:type byok: bool
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._get_pricing_enso_serialize(
preset=preset,
reasoning=reasoning,
arms=arms,
byok=byok,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "PricingEnsoOut",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
return response_data.response
def _get_pricing_enso_serialize(
self,
preset,
reasoning,
arms,
byok,
_request_auth,
_content_type,
_headers,
_host_index,
) -> RequestSerialized:
_host = None
_collection_formats: Dict[str, str] = {
}
_path_params: Dict[str, str] = {}
_query_params: List[Tuple[str, str]] = []
_header_params: Dict[str, Optional[str]] = _headers or {}
_form_params: List[Tuple[str, str]] = []
_files: Dict[
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
] = {}
_body_params: Optional[bytes] = None
# process the path parameters
# process the query parameters
if preset is not None:
_query_params.append(('preset', preset))
if reasoning is not None:
_query_params.append(('reasoning', reasoning))
if arms is not None:
_query_params.append(('arms', arms))
if byok is not None:
_query_params.append(('byok', byok))
# process the header parameters
# process the form parameters
# process the body parameter
# set the HTTP header `Accept`
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
'application/json',
'application/problem+json'
]
)
# authentication setting
_auth_settings: List[str] = [
'bearer'
]
return self.api_client.param_serialize(
method='GET',
resource_path='/v1/pricing/enso',
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
body=_body_params,
post_params=_form_params,
files=_files,
auth_settings=_auth_settings,
collection_formats=_collection_formats,
_host=_host,
_request_auth=_request_auth
)
@validate_call
def get_pricing_featured(
self,
@@ -5762,7 +6078,7 @@ class PricingApi:
) -> Dict[str, object]:
"""Returns the catalog's headline statistics — model counts by family and the provider directory.
Returns the catalog's headline statistics — model counts by family and the provider directory. The provider sub-object is filtered to what the caller's org may see, so a disabled provider's name never leaks; the aggregate counts are the catalog's own, over everything it holds.
Returns the catalog's headline statistics — model counts by family and the provider directory. The provider sub-object is filtered to what the caller's org may see, so a disabled provider's name never leaks; the aggregate counts are the catalog's own, over everything it holds. A SuperAdmin's summary adds `enso`: the day's Enso answers, the arms that failed first, the share OpenRouter's credit bought (fallbacks), the fee collected and every loss, by route.
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
@@ -5825,7 +6141,7 @@ class PricingApi:
) -> ApiResponse[Dict[str, object]]:
"""Returns the catalog's headline statistics — model counts by family and the provider directory.
Returns the catalog's headline statistics — model counts by family and the provider directory. The provider sub-object is filtered to what the caller's org may see, so a disabled provider's name never leaks; the aggregate counts are the catalog's own, over everything it holds.
Returns the catalog's headline statistics — model counts by family and the provider directory. The provider sub-object is filtered to what the caller's org may see, so a disabled provider's name never leaks; the aggregate counts are the catalog's own, over everything it holds. A SuperAdmin's summary adds `enso`: the day's Enso answers, the arms that failed first, the share OpenRouter's credit bought (fallbacks), the fee collected and every loss, by route.
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
@@ -5888,7 +6204,7 @@ class PricingApi:
) -> RESTResponseType:
"""Returns the catalog's headline statistics — model counts by family and the provider directory.
Returns the catalog's headline statistics — model counts by family and the provider directory. The provider sub-object is filtered to what the caller's org may see, so a disabled provider's name never leaks; the aggregate counts are the catalog's own, over everything it holds.
Returns the catalog's headline statistics — model counts by family and the provider directory. The provider sub-object is filtered to what the caller's org may see, so a disabled provider's name never leaks; the aggregate counts are the catalog's own, over everything it holds. A SuperAdmin's summary adds `enso`: the day's Enso answers, the arms that failed first, the share OpenRouter's credit bought (fallbacks), the fee collected and every loss, by route.
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
+6
View File
@@ -162,6 +162,7 @@ from hanzoai.cloud.models.ai_model_providers import AiModelProviders
from hanzoai.cloud.models.ai_models import AiModels
from hanzoai.cloud.models.ai_panel_judge import AiPanelJudge
from hanzoai.cloud.models.ai_paused import AiPaused
from hanzoai.cloud.models.ai_per_million import AiPerMillion
from hanzoai.cloud.models.ai_price import AiPrice
from hanzoai.cloud.models.ai_provider_usage import AiProviderUsage
from hanzoai.cloud.models.ai_provider_usage_model_spend import AiProviderUsageModelSpend
@@ -2360,6 +2361,8 @@ from hanzoai.cloud.models.pref_prefs_view import PrefPrefsView
from hanzoai.cloud.models.pricing_card import PricingCard
from hanzoai.cloud.models.pricing_component import PricingComponent
from hanzoai.cloud.models.pricing_enablement_board import PricingEnablementBoard
from hanzoai.cloud.models.pricing_enso_out import PricingEnsoOut
from hanzoai.cloud.models.pricing_price import PricingPrice
from hanzoai.cloud.models.pricing_pricing_health import PricingPricingHealth
from hanzoai.cloud.models.pricing_pricing_model_list import PricingPricingModelList
from hanzoai.cloud.models.pricing_pricing_plan_list import PricingPricingPlanList
@@ -2368,7 +2371,10 @@ from hanzoai.cloud.models.pricing_pricing_provider_list import PricingPricingPro
from hanzoai.cloud.models.pricing_pricing_region_list import PricingPricingRegionList
from hanzoai.cloud.models.pricing_pricing_tier_list import PricingPricingTierList
from hanzoai.cloud.models.pricing_pricing_tool_list import PricingPricingToolList
from hanzoai.cloud.models.pricing_quote import PricingQuote
from hanzoai.cloud.models.pricing_rate import PricingRate
from hanzoai.cloud.models.pricing_rate_arm import PricingRateArm
from hanzoai.cloud.models.pricing_rate_window import PricingRateWindow
from hanzoai.cloud.models.pricing_speed import PricingSpeed
from hanzoai.cloud.models.pricing_user_enablement_item import PricingUserEnablementItem
from hanzoai.cloud.models.principal_agent_brief import PrincipalAgentBrief
@@ -17,8 +17,10 @@ import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, StrictBool, StrictFloat, StrictInt, StrictStr
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr
from typing import Any, ClassVar, Dict, List, Optional, Union
from hanzoai.cloud.models.ai_per_million import AiPerMillion
from hanzoai.cloud.models.ai_window import AiWindow
from typing import Optional, Set
from typing_extensions import Self
@@ -27,13 +29,17 @@ class AiModelPricingInfo(BaseModel):
AiModelPricingInfo
""" # noqa: E501
completion: Optional[StrictStr] = None
fee: Optional[StrictStr] = None
var_from: Optional[AiPerMillion] = Field(default=None, alias="from")
input_per_million: Optional[Union[StrictFloat, StrictInt]] = None
output_per_million: Optional[Union[StrictFloat, StrictInt]] = None
overrides: Optional[List[Dict[str, Any]]] = None
prompt: Optional[StrictStr] = None
rates: Optional[Dict[str, StrictStr]] = None
up_to: Optional[AiPerMillion] = None
variable: Optional[StrictBool] = None
__properties: ClassVar[List[str]] = ["completion", "input_per_million", "output_per_million", "overrides", "prompt", "rates", "variable"]
window: Optional[AiWindow] = None
__properties: ClassVar[List[str]] = ["completion", "fee", "from", "input_per_million", "output_per_million", "overrides", "prompt", "rates", "up_to", "variable", "window"]
model_config = ConfigDict(
populate_by_name=True,
@@ -74,6 +80,15 @@ class AiModelPricingInfo(BaseModel):
exclude=excluded_fields,
exclude_none=True,
)
# override the default output from pydantic by calling `to_dict()` of var_from
if self.var_from:
_dict['from'] = self.var_from.to_dict()
# override the default output from pydantic by calling `to_dict()` of up_to
if self.up_to:
_dict['up_to'] = self.up_to.to_dict()
# override the default output from pydantic by calling `to_dict()` of window
if self.window:
_dict['window'] = self.window.to_dict()
return _dict
@classmethod
@@ -87,12 +102,16 @@ class AiModelPricingInfo(BaseModel):
_obj = cls.model_validate({
"completion": obj.get("completion"),
"fee": obj.get("fee"),
"from": AiPerMillion.from_dict(obj["from"]) if obj.get("from") is not None else None,
"input_per_million": obj.get("input_per_million"),
"output_per_million": obj.get("output_per_million"),
"overrides": obj.get("overrides"),
"prompt": obj.get("prompt"),
"rates": obj.get("rates"),
"variable": obj.get("variable")
"up_to": AiPerMillion.from_dict(obj["up_to"]) if obj.get("up_to") is not None else None,
"variable": obj.get("variable"),
"window": AiWindow.from_dict(obj["window"]) if obj.get("window") is not None else None
})
return _obj
@@ -0,0 +1,93 @@
# coding: utf-8
"""
Hanzo Cloud API
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
The version of the OpenAPI document: v1
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt
from typing import Any, ClassVar, Dict, List, Optional, Union
from typing import Optional, Set
from typing_extensions import Self
class AiPerMillion(BaseModel):
"""
AiPerMillion
""" # noqa: E501
cache_read_per_million: Optional[Union[StrictFloat, StrictInt]] = None
cache_write_per_million: Optional[Union[StrictFloat, StrictInt]] = None
input_per_million: Optional[Union[StrictFloat, StrictInt]] = None
output_per_million: Optional[Union[StrictFloat, StrictInt]] = None
__properties: ClassVar[List[str]] = ["cache_read_per_million", "cache_write_per_million", "input_per_million", "output_per_million"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of AiPerMillion from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of AiPerMillion from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"cache_read_per_million": obj.get("cache_read_per_million"),
"cache_write_per_million": obj.get("cache_write_per_million"),
"input_per_million": obj.get("input_per_million"),
"output_per_million": obj.get("output_per_million")
})
return _obj
@@ -0,0 +1,103 @@
# coding: utf-8
"""
Hanzo Cloud API
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
The version of the OpenAPI document: v1
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from hanzoai.cloud.models.pricing_quote import PricingQuote
from typing import Optional, Set
from typing_extensions import Self
class PricingEnsoOut(BaseModel):
"""
PricingEnsoOut
""" # noqa: E501
computed: Optional[StrictStr] = Field(default=None, description="Computed is when the prices were computed, RFC 3339.")
fee: Optional[StrictStr] = Field(default=None, description="Fee is the platform's fee every price carries, percent: the margin, and the only one.")
free: Optional[List[StrictStr]] = Field(default=None, description="Free names the Enso models served at no charge.")
measured: Optional[StrictStr] = Field(default=None, description="Measured is when the calls typical was measured over were read, RFC 3339.")
quotes: Optional[List[PricingQuote]] = Field(default=None, description="Quotes is each model at each depth asked: from, typical and upTo in dollars a million tokens, and the window typical was measured over.")
__properties: ClassVar[List[str]] = ["computed", "fee", "free", "measured", "quotes"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of PricingEnsoOut from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
# override the default output from pydantic by calling `to_dict()` of each item in quotes (list)
_items = []
if self.quotes:
for _item_quotes in self.quotes:
if _item_quotes:
_items.append(_item_quotes.to_dict())
_dict['quotes'] = _items
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of PricingEnsoOut from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"computed": obj.get("computed"),
"fee": obj.get("fee"),
"free": obj.get("free"),
"measured": obj.get("measured"),
"quotes": [PricingQuote.from_dict(_item) for _item in obj["quotes"]] if obj.get("quotes") is not None else None
})
return _obj
+93
View File
@@ -0,0 +1,93 @@
# coding: utf-8
"""
Hanzo Cloud API
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
The version of the OpenAPI document: v1
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
class PricingPrice(BaseModel):
"""
PricingPrice
""" # noqa: E501
cache_read: Optional[StrictStr] = Field(default=None, description="CacheRead is a prompt token read from the provider's cache, dollars a million; \"\" where the price states none.", alias="cacheRead")
cache_write: Optional[StrictStr] = Field(default=None, description="CacheWrite is a prompt token written to the provider's cache, dollars a million; \"\" where the price states none.", alias="cacheWrite")
input: Optional[StrictStr] = Field(default=None, description="Input is a fresh prompt token's price, dollars a million.")
output: Optional[StrictStr] = Field(default=None, description="Output is a completion token's price, dollars a million.")
__properties: ClassVar[List[str]] = ["cacheRead", "cacheWrite", "input", "output"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of PricingPrice from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of PricingPrice from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"cacheRead": obj.get("cacheRead"),
"cacheWrite": obj.get("cacheWrite"),
"input": obj.get("input"),
"output": obj.get("output")
})
return _obj
+125
View File
@@ -0,0 +1,125 @@
# coding: utf-8
"""
Hanzo Cloud API
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
The version of the OpenAPI document: v1
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from hanzoai.cloud.models.pricing_price import PricingPrice
from hanzoai.cloud.models.pricing_rate_arm import PricingRateArm
from hanzoai.cloud.models.pricing_rate_window import PricingRateWindow
from typing import Optional, Set
from typing_extensions import Self
class PricingQuote(BaseModel):
"""
PricingQuote
""" # noqa: E501
arms: Optional[List[PricingRateArm]] = Field(default=None, description="Arms are the model's routes, set for a SuperAdmin alone.")
byok: Optional[StrictBool] = Field(default=None, description="BYOK says the prices carry the fee of a call on the org's own key.")
fee: Optional[StrictStr] = Field(default=None, description="Fee is the platform's fee each price carries, percent.")
var_from: Optional[PricingPrice] = Field(default=None, description="From is the least a token bills: the model's cheapest arm, class by class.", alias="from")
model: Optional[StrictStr] = Field(default=None, description="Model is the model quoted, or a blend's models joined by commas.")
reasoning: Optional[StrictStr] = Field(default=None, description="Reasoning is the depth quoted: none, low, medium, high, max or default; \"\" for every depth together.")
typical: Optional[PricingPrice] = Field(default=None, description="Typical is what a token of the model's calls billed, measured over Window; nil when no call was measured.")
up_to: Optional[PricingPrice] = Field(default=None, description="UpTo is the most a token bills: the model's dearest arm, a long prompt's price included.", alias="upTo")
window: Optional[PricingRateWindow] = Field(default=None, description="Window is the calls Typical was measured over.")
__properties: ClassVar[List[str]] = ["arms", "byok", "fee", "from", "model", "reasoning", "typical", "upTo", "window"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of PricingQuote from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
# override the default output from pydantic by calling `to_dict()` of each item in arms (list)
_items = []
if self.arms:
for _item_arms in self.arms:
if _item_arms:
_items.append(_item_arms.to_dict())
_dict['arms'] = _items
# override the default output from pydantic by calling `to_dict()` of var_from
if self.var_from:
_dict['from'] = self.var_from.to_dict()
# override the default output from pydantic by calling `to_dict()` of typical
if self.typical:
_dict['typical'] = self.typical.to_dict()
# override the default output from pydantic by calling `to_dict()` of up_to
if self.up_to:
_dict['upTo'] = self.up_to.to_dict()
# override the default output from pydantic by calling `to_dict()` of window
if self.window:
_dict['window'] = self.window.to_dict()
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of PricingQuote from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"arms": [PricingRateArm.from_dict(_item) for _item in obj["arms"]] if obj.get("arms") is not None else None,
"byok": obj.get("byok"),
"fee": obj.get("fee"),
"from": PricingPrice.from_dict(obj["from"]) if obj.get("from") is not None else None,
"model": obj.get("model"),
"reasoning": obj.get("reasoning"),
"typical": PricingPrice.from_dict(obj["typical"]) if obj.get("typical") is not None else None,
"upTo": PricingPrice.from_dict(obj["upTo"]) if obj.get("upTo") is not None else None,
"window": PricingRateWindow.from_dict(obj["window"]) if obj.get("window") is not None else None
})
return _obj
@@ -0,0 +1,106 @@
# coding: utf-8
"""
Hanzo Cloud API
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
The version of the OpenAPI document: v1
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from hanzoai.cloud.models.pricing_price import PricingPrice
from typing import Optional, Set
from typing_extensions import Self
class PricingRateArm(BaseModel):
"""
PricingRateArm
""" # noqa: E501
above: Optional[StrictInt] = Field(default=None, description="Above is the prompt length Long applies past, tokens.")
fee: Optional[StrictStr] = Field(default=None, description="Fee is a reseller's fee on the provider's price, percent: part of the cost.")
kind: Optional[StrictStr] = Field(default=None, description="Kind is how the provider is reached: direct (its own API, on a key Hanzo or the org holds), family (a Hanzo family service), do (DigitalOcean's inference) or openrouter (the fallback), asked in that order.")
list: Optional[PricingPrice] = Field(default=None, description="List is the provider's own price.")
long: Optional[PricingPrice] = Field(default=None, description="Long is the provider's price for a prompt past Above tokens, where it charges one.")
provider: Optional[StrictStr] = Field(default=None, description="Provider is the account the arm runs on, as the family's catalog names it.")
upstream: Optional[StrictStr] = Field(default=None, description="Upstream is the model the arm runs.")
__properties: ClassVar[List[str]] = ["above", "fee", "kind", "list", "long", "provider", "upstream"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of PricingRateArm from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
# override the default output from pydantic by calling `to_dict()` of list
if self.list:
_dict['list'] = self.list.to_dict()
# override the default output from pydantic by calling `to_dict()` of long
if self.long:
_dict['long'] = self.long.to_dict()
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of PricingRateArm from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"above": obj.get("above"),
"fee": obj.get("fee"),
"kind": obj.get("kind"),
"list": PricingPrice.from_dict(obj["list"]) if obj.get("list") is not None else None,
"long": PricingPrice.from_dict(obj["long"]) if obj.get("long") is not None else None,
"provider": obj.get("provider"),
"upstream": obj.get("upstream")
})
return _obj
@@ -0,0 +1,93 @@
# coding: utf-8
"""
Hanzo Cloud API
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
The version of the OpenAPI document: v1
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
class PricingRateWindow(BaseModel):
"""
PricingRateWindow
""" # noqa: E501
basis: Optional[StrictStr] = Field(default=None, description="Basis is \"24h\" (every call of the last day), \"last\" (the model's last calls, the day having held too few) or \"\" (none measured).")
requests: Optional[StrictInt] = Field(default=None, description="Requests is how many calls were measured.")
since: Optional[StrictInt] = Field(default=None, description="Since is when the first call measured was made, unix seconds.")
until: Optional[StrictInt] = Field(default=None, description="Until is when the last was, unix seconds.")
__properties: ClassVar[List[str]] = ["basis", "requests", "since", "until"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of PricingRateWindow from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of PricingRateWindow from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"basis": obj.get("basis"),
"requests": obj.get("requests"),
"since": obj.get("since"),
"until": obj.get("until")
})
return _obj
+1 -1
View File
@@ -1,6 +1,6 @@
[project]
name = "hanzoai"
version = "8.5.742"
version = "8.5.749"
description = "The official Python library for the Hanzo API"
dynamic = ["readme"]
license = "Apache-2.0"
Generated
+1 -1
View File
@@ -2252,7 +2252,7 @@ wheels = [
[[package]]
name = "hanzoai"
version = "8.5.733"
version = "8.5.742"
source = { editable = "." }
dependencies = [
{ name = "pydantic" },