diff --git a/src/otari/_client/models/embedding_usage.py b/src/otari/_client/models/embedding_usage.py index f90711b3..66b42e80 100644 --- a/src/otari/_client/models/embedding_usage.py +++ b/src/otari/_client/models/embedding_usage.py @@ -29,7 +29,7 @@ class EmbeddingUsage(BaseModel): What an embeddings request was metered at, and what it cost. """ # noqa: E501 cost_usd: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="What the request cost, as a six-decimal USD string; absent when it was not priced") - pricing_source: Optional[StrictStr] = Field(default=None, description="Which rate priced the request; absent when it was not priced") + pricing_source: Optional[StrictStr] = Field(default=None, description="Which rate priced the request: `organization`, `deployment` or `defaults` on a standalone gateway, and the control plane's own name for it on a hybrid one; absent when it was not priced") prompt_tokens: StrictInt total_tokens: StrictInt __properties: ClassVar[List[str]] = ["cost_usd", "pricing_source", "prompt_tokens", "total_tokens"] @@ -47,16 +47,6 @@ def cost_usd_validate_regular_expression(cls, value): raise ValueError(r"must validate the regular expression /^-?\d+\.\d{6}$/") return value - @field_validator('pricing_source') - def pricing_source_validate_enum(cls, value): - """Validates the enum""" - if value is None: - return value - - if value not in set(['organization', 'deployment', 'defaults']): - raise ValueError("must be one of enum values ('organization', 'deployment', 'defaults')") - return value - model_config = ConfigDict( validate_by_name=True, validate_by_alias=True, diff --git a/src/otari/_client/models/rerank_usage.py b/src/otari/_client/models/rerank_usage.py index e15a934e..3a9c6d9d 100644 --- a/src/otari/_client/models/rerank_usage.py +++ b/src/otari/_client/models/rerank_usage.py @@ -29,7 +29,7 @@ class RerankUsage(BaseModel): What a rerank request was metered at, and what it cost. """ # noqa: E501 cost_usd: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="What the request cost, as a six-decimal USD string; absent when it was not priced") - pricing_source: Optional[StrictStr] = Field(default=None, description="Which rate priced the request; absent when it was not priced") + pricing_source: Optional[StrictStr] = Field(default=None, description="Which rate priced the request: `organization`, `deployment` or `defaults` on a standalone gateway, and the control plane's own name for it on a hybrid one; absent when it was not priced") search_units: Optional[StrictInt] = Field(default=None, description="Filter to a single failure status code (e.g. 429 for provider rate limits, 402 for missing-pricing rejections). Only error rows carry one, so this filter also restricts to status='error' unless 'status' is given explicitly") total_tokens: Optional[StrictInt] = Field(default=None, description="Filter to a single failure status code (e.g. 429 for provider rate limits, 402 for missing-pricing rejections). Only error rows carry one, so this filter also restricts to status='error' unless 'status' is given explicitly") __properties: ClassVar[List[str]] = ["cost_usd", "pricing_source", "search_units", "total_tokens"] @@ -47,16 +47,6 @@ def cost_usd_validate_regular_expression(cls, value): raise ValueError(r"must validate the regular expression /^-?\d+\.\d{6}$/") return value - @field_validator('pricing_source') - def pricing_source_validate_enum(cls, value): - """Validates the enum""" - if value is None: - return value - - if value not in set(['organization', 'deployment', 'defaults']): - raise ValueError("must be one of enum values ('organization', 'deployment', 'defaults')") - return value - model_config = ConfigDict( validate_by_name=True, validate_by_alias=True,