Skip to content

ccproxy.plugins.pricing.exceptions

ccproxy.plugins.pricing.exceptions

Pricing service exceptions.

PricingError

Bases: Exception

Base exception for pricing-related errors.

PricingDataNotLoadedError

PricingDataNotLoadedError(
    message="Pricing data not loaded yet - cost calculation unavailable",
)

Bases: PricingError

Raised when pricing data has not been loaded yet.

Source code in ccproxy/plugins/pricing/exceptions.py
def __init__(
    self,
    message: str = "Pricing data not loaded yet - cost calculation unavailable",
):
    self.message = message
    super().__init__(self.message)

ModelPricingNotFoundError

ModelPricingNotFoundError(model, message=None)

Bases: PricingError

Raised when pricing for a specific model is not found.

Source code in ccproxy/plugins/pricing/exceptions.py
def __init__(self, model: str, message: str | None = None):
    self.model = model
    self.message = message or f"No pricing data available for model '{model}'"
    super().__init__(self.message)

PricingServiceDisabledError

PricingServiceDisabledError(
    message="Pricing service is disabled",
)

Bases: PricingError

Raised when pricing service is disabled.

Source code in ccproxy/plugins/pricing/exceptions.py
def __init__(self, message: str = "Pricing service is disabled"):
    self.message = message
    super().__init__(self.message)