-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Gap
The Anthropic Messages Batch API (client.messages.batches) is not instrumented. The Messages and AsyncMessages wrapper classes only wrap create() and stream(). Accessing client.messages.batches on a wrapped client falls through via Wrapper.__getattr__ to the original unwrapped resource — batch operations work but produce no spans.
The Batch API allows submitting up to 100,000 message requests for asynchronous processing at 50% cost. It is a GA production API.
What is missing
At minimum:
client.messages.batches.create()— should create a span logging the batch ID, number of requests, model, and other configurationclient.messages.batches.results()— could optionally create spans for individual results when retrieved
Lower priority:
client.messages.batches.retrieve()/list()/cancel()/delete()— administrative operations
Braintrust docs status
not_found — the Anthropic integration page at braintrust.dev/docs/integrations/ai-providers/anthropic does not mention the Batch API.
Upstream sources
- Anthropic Message Batches API: https://docs.anthropic.com/en/docs/build-with-claude/batch-processing
- API reference: https://docs.anthropic.com/en/api/creating-message-batches
Local files inspected
py/src/braintrust/wrappers/anthropic.py:Messagesclass (line 146): only definesstream()andcreate()methodsAsyncMessagesclass (line 57): only definescreate()andstream()methods- Neither class references
batches
py/src/braintrust/wrappers/test_anthropic.py— no batch-related test cases- Grep for
batchesacross the wrappers directory: zero results in anthropic files
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels