"""Model configuration loader."""

from __future__ import annotations

import logging

from stdlib.llm.routing import set_runtime_model_config

logger = logging.getLogger(__name__)


def apply_model_config(
    default_profile: str | None = None,
    routing: dict[str, str] | None = None,
) -> None:
    """Apply model configuration to the runtime routing.

    This connects albus.yaml model routing to the actual model resolution
    chain so that ``get_model_for_capability()`` respects workspace config.
    """
    if default_profile:
        logger.info("Model profile: %s", default_profile)
    if routing:
        set_runtime_model_config(routing=routing)
        logger.info("Model routing applied: %s", routing)
