"""tokengrip - Track and optimize your AI spending."""

from tokengrip.client import Tokengrip
from tokengrip.types import TrackUsagePayload, WrapOptions

__all__ = [
    "Tokengrip",
    "wrap_openai",
    "wrap_anthropic",
    "TrackUsagePayload",
    "WrapOptions",
]


def wrap_openai(client, tg, opts=None):  # type: ignore[no-untyped-def]
    """Wrap an OpenAI client to automatically track token usage."""
    from tokengrip.wrappers.openai import wrap_openai as _wrap

    return _wrap(client, tg, opts)


def wrap_anthropic(client, tg, opts=None):  # type: ignore[no-untyped-def]
    """Wrap an Anthropic client to automatically track token usage."""
    from tokengrip.wrappers.anthropic import wrap_anthropic as _wrap

    return _wrap(client, tg, opts)
