BerriAI/litellm · error · ValueError

MAVVRIK_FOCUS_FREQUENCY='{frequency}' is not supported. Only

Error message

MAVVRIK_FOCUS_FREQUENCY='{frequency}' is not supported. Only 'daily' is allowed -- the Mavvrik ingestion protocol stores one file per calendar date (metrics/YYYY-MM-DD). Hourly or interval exports would overwrite each other within the same day.

What it means

MavvrikFocusLogger reads MAVVRIK_FOCUS_FREQUENCY (default 'daily') and rejects anything except 'daily'. Mavvrik's ingestion protocol expects exactly one FOCUS cost-export CSV per calendar date under metrics/YYYY-MM-DD, so hourly or interval frequencies would overwrite the same file within a day — the restriction is a data-integrity guard, not an arbitrary limitation.

Source

Thrown at litellm/integrations/mavvrik_focus/mavvrik_focus_logger.py:89


def _is_empty_metrics_marker(marker: object | None) -> bool:
    if marker is None:
        return True
    if isinstance(marker, (int, float)):
        return marker == 0
    if isinstance(marker, str):
        return not marker.strip()
    return False


class MavvrikFocusLogger(FocusLogger):
    """FOCUS-based export logger that routes to the Mavvrik destination."""

    def __init__(self, **kwargs: Any) -> None:
        frequency: Final = os.getenv("MAVVRIK_FOCUS_FREQUENCY", "daily").lower()
        if frequency != "daily":
            raise ValueError(
                f"MAVVRIK_FOCUS_FREQUENCY='{frequency}' is not supported. "
                "Only 'daily' is allowed -- the Mavvrik ingestion protocol stores one "
                "file per calendar date (metrics/YYYY-MM-DD). Hourly or interval "
                "exports would overwrite each other within the same day."
            )
        super().__init__(
            provider="mavvrik",
            export_format="csv",
            frequency="daily",
            prefix="mavvrik_focus_exports",
            destination_config={
                "api_key": os.getenv("MAVVRIK_API_KEY"),
                "api_endpoint": os.getenv("MAVVRIK_API_ENDPOINT"),
                "connection_id": os.getenv("MAVVRIK_CONNECTION_ID"),
            },
            **kwargs,
        )
        raw: Final = os.getenv("MAVVRIK_FOCUS_MAX_ROWS")

View on GitHub (pinned to 6c2dcb801b)

Solutions

  1. Set MAVVRIK_FOCUS_FREQUENCY=daily (or unset it — daily is the default)
  2. If you set it at all, use exactly 'daily'; case-insensitive but no other value is accepted
  3. For finer-grained cost data, use a different exporter/destination that supports it — Mavvrik's storage format cannot
  4. Contact Mavvrik if the one-file-per-day protocol changes and a new frequency is supported

Example fix

# before
export MAVVRIK_FOCUS_FREQUENCY=hourly
# ValueError: MAVVRIK_FOCUS_FREQUENCY='hourly' is not supported...

# after
export MAVVRIK_FOCUS_FREQUENCY=daily  # or simply unset — daily is the default
Defensive patterns

Strategy: validation

Validate before calling

import os

_FREQUENCY = os.getenv("MAVVRIK_FOCUS_FREQUENCY", "daily").lower()
if _FREQUENCY != "daily":
    raise RuntimeError("MAVVRIK_FOCUS_FREQUENCY must be 'daily' or unset")

Prevention

When it happens

Trigger: Setting MAVVRIK_FOCUS_FREQUENCY=hourly (or weekly, interval, or any value other than daily — the value is lowercased first, so 'DAILY' is fine); copying a generic FOCUS logger config that supports multiple frequencies into the Mavvrik variant.

Common situations: Operators used to LiteLLM's other FOCUS exporters that allow hourly cadence; attempts to increase export granularity for near-real-time cost visibility; leftover experimentation values in env files.

Related errors


AI-assisted analysis of BerriAI/litellm@6c2dcb801b (2026-08-15). Data as JSON: /api/errors/0625562094913d4c. Report an issue: GitHub.