haive.core.models.metadata¶
Model metadata utilities for LLM configurations.
This module provides utilities for downloading, caching, and accessing model metadata from LiteLLM’s model_prices_and_context_window.json.
Classes¶
A class to store and provide model metadata. |
Functions¶
|
Get metadata for a specific model with improved matching. |
Module Contents¶
- class haive.core.models.metadata.ModelMetadata[source]¶
A class to store and provide model metadata.
This class encapsulates metadata about a language model, including its pricing, context window limits, and provider information.
- haive.core.models.metadata.get_model_metadata(model_name, provider=None, force_refresh=False)[source]¶
Get metadata for a specific model with improved matching.
This function tries to find the most relevant model metadata based on the model name and provider, with multiple fallback strategies.
- Parameters:
- Returns:
Model metadata dictionary or empty dict if not found
- Return type: