Anthropic
The Anthropic provider lives in crates/lime-provider-anthropic/ and uses
the Messages API with adaptive thinking and tiered prompt caching.
Authentication
lime login --provider anthropic --with-api-keyOr via environment:
export ANTHROPIC_API_KEY="sk-ant-…"Built-in catalog
Max output is the default response cap; Upper is the larger retry /
extended-thinking cap that the runtime can switch up to when the turn
needs the headroom.
| Slug | Display | Context | Max output | Upper | Capabilities |
|---|---|---|---|---|---|
claude-opus-4-7 | Claude Opus 4.7 | 1M | 32 K | 128 K | Vision, parallel tools, adaptive thinking, param_preset: verbosity_only |
claude-sonnet-4-6 | Claude Sonnet 4.6 | 1M | 16 K | 64 K | Vision, parallel tools, extended thinking, param_preset: reasoning_and_verbosity |
claude-haiku-4-5 | Claude Haiku 4.5 | 200 K | 16 K | 64 K | Vision, parallel tools, extended thinking, param_preset: reasoning_and_verbosity |
claude-opus-4-6 | Claude Opus 4.6 (legacy) | 1M | 32 K | 128 K | Vision, parallel tools, extended thinking |
claude-sonnet-4-5 | Claude Sonnet 4.5 (legacy) | 200 K | 16 K | 64 K | Vision, parallel tools, extended thinking |
claude-opus-4-5 | Claude Opus 4.5 (legacy) | 200 K | 32 K | 64 K | Vision, parallel tools, extended thinking |
claude-opus-4-1 | Claude Opus 4.1 (legacy) | 200 K | 32 K | 32 K | Vision, parallel tools, extended thinking |
Aliases
| Alias | Resolves to |
|---|---|
opus | claude-opus-4-7 |
sonnet | claude-sonnet-4-5 |
haiku | claude-haiku-4-5-20251001 |
What’s special
- Tiered prompt caching. Long, stable prefixes get a 1-hour cache TTL; rolling tail content gets a 5-minute TTL. Intermediate cache breakpoints are inserted automatically for long turns so each cache hit is as large as possible.
- Adaptive thinking. On models that support extended thinking, the
provider chooses between adaptive (auto-budget) and explicit
thinking-effort modes per turn based on
--reasoning-effortand the remaining output budget. - Pause-turn handling. The provider treats
pause_turnandcontext_windowstop reasons as recoverable: the runtime continues the turn rather than aborting. 429+ retry-after. Anthropic’s rate-limit signals are honored precisely; Lime backs off for the exact duration the API requests.
Common usage
lime --model claude-opus-4-7lime --model claude-sonnet-4-6 --reasoning-effort xhighlime --model claude-haiku-4-5 --verbosity lowNotes on pricing
Lime’s telemetry crate (lime-telemetry) tracks per-turn input, cached
input, output, and reasoning tokens, including separate buckets for
1-hour cache hits and 5-minute cache hits. /status shows the current
session totals; /config env shows how the provider was authenticated.