"""Provider adapter registry.

This module provides functions for instantiating and retrieving provider adapters.
"""

from __future__ import annotations

from typing import TYPE_CHECKING

if TYPE_CHECKING:
    from ..providers.interfaces import ProviderAdapter


def default_adapters() -> dict[str, "ProviderAdapter"]:
    """Instantiate the default provider adapters used by the gateway.

    Returns:
        A dictionary mapping provider names to their adapter instances.
        Keys: "openai", "anthropic", "google", "azure_openai", "takumi"
    """
    # Import here to avoid circular dependencies and allow lazy loading
    from ..providers.adapters import (
        AnthropicAdapter,
        AzureOpenAIAdapter,
        GoogleAdapter,
        OpenAIAdapter,
        TakumiAdapter,
    )

    return {
        "openai": OpenAIAdapter(),
        "anthropic": AnthropicAdapter(),
        "google": GoogleAdapter(),
        "azure_openai": AzureOpenAIAdapter(),
        "takumi": TakumiAdapter(),
    }


__all__ = ["default_adapters"]
