Docs target current release v0.5.0.v0.6.0 is in development

OpenAI-compatible gateways

opentine includes a LiteLLM convenience wrapper and named wrappers for hosted providers and local runtimes. Install the compatible-adapter extra, then connect to a gateway you operate separately.

Terminal
pip install "opentine[compat]"
gateway.py
1import os
2
3from opentine import Agent
4from opentine.models.compat import LiteLLM
5
6model = LiteLLM(
7    model="team-sonnet",
8    host="http://localhost:4000",
9    api_key=os.environ["LITELLM_API_KEY"],
10)
11run = Agent(model=model).run_sync("Summarize this decision.")

Responsibility boundary

Routing, fallbacks, authentication, deployment names, and provider compatibility belong to the gateway. opentine records only the model and usage data visible through that endpoint.

Billing and capabilities

The LiteLLM wrapper uses provider identity litellmand does not borrow another provider's price. Configure matching rates or a catalog entry for the gateway route; otherwise hosted billing remains explicitly unknown. Tool and thinking support depend on the target model, gateway configuration, and chat template.

For an arbitrary endpoint, use OpenAICompatible with an exact base_url. Named local wrappers default to unmetered unless rates are supplied.