Framework integrationsProviders
Anthropic SDK
Observe raw Anthropic API calls in Radicas via the OpenInference instrumentor — single LLM spans, no agent tree.
Status: experimental — implemented, not fixture-verified; no registry card yet. This is a
telemetry source, not an agent framework: each messages.create call becomes one LLM span
(no agent/tool tree) — enough for cost estimation and reconciliation.
Install
pip install "radicas[anthropic]" # = radicas + openinference-instrumentation-anthropicUse
import radicas
radicas.init(service="my-service", feature="summarize")
# instrument="auto" detects anthropic and activates
# AnthropicInstrumentor().instrument() — or: radicas.init(instrument=["anthropic-sdk"])
# (alias: "anthropic")
import anthropic
client = anthropic.Anthropic()
message = client.messages.create(model="claude-sonnet-4-5", max_tokens=512, messages=[...])
radicas.shutdown()What it emits
- Scope name:
openinference.instrumentation.anthropic— expected, pending fixture. - Namespace:
llm.*/openinference.*— shim required. - Coverage: expected, pending fixture. Cache tokens matter here: the Anthropic API
reports exclusive counters (
input_tokensexcluding cache reads/writes), which must be normalized to the canonical subset semantics (cache_readwithininput_tokens,cache_creationadditive) — see the telemetry reference. That normalization is specified for the adapter layer and will be encoded in this source's registry card when the fixture lands.
Shim behavior
- Client-side adapter: intended, pending card — until then spans pass through unmapped.
- Server-side OTTL: pending the same card.
Known limitations
- Not fixture-verified end-to-end.
- Single-span source: no
invoke_agentroot, so the default feature (stamped only oninvoke_agent*roots) will not appear on these spans. A scopedwith radicas.feature(...)block DOES stamp every span inside it — use it to tag raw calls. - The Traceloop route (
opentelemetry-instrumentation-anthropic,gen_ai.*+llm.*, lighter shim — but content on span attributes instead of the events channel) is the documented alternative; the deep-dive will pick the official route.
Verify it works
SELECT model, input_tokens, output_tokens, estimated_cost_usd
FROM otel.llm_call ORDER BY ts DESC LIMIT 5;Bench recipe: providers/anthropic-sdk/python in radicas-integrations.