Anthropic adapter
Terminal
pip install "opentine[anthropic]"
export ANTHROPIC_API_KEY="..."anthropic_agent.py
1from opentine import Agent
2from opentine.models.anthropic import Anthropic
3
4model = Anthropic(
5 model="claude-sonnet-5",
6 api_key=None,
7 service_tier=None,
8 inference_geo=None,
9)
10run = Agent(model=model).run_sync("Summarize this decision.")
Adapter behavior
- Uses
anthropic.AsyncAnthropicand the Messages API with SDK retries disabled. - Converts tools and preserves continuation state.
- Normalizes input, output, cache-read, cache-write, and thinking usage.
- Uses effective-dated catalog cards or explicit
rates=, including service tier and reported inference geography.
Model rules determine thinking and adaptive-sampling request behavior. They are not a promise that every Claude identifier has identical capabilities. The constructor default is claude-sonnet-5.