Sends a chat completion request
Chat parameters
The chat completion response
Streams a chat completion response
Chat parameters
Async iterable of chat chunks
Generates embeddings for the given input
The embedding vectors
Calculates the cost of a chat completion based on token usage. Returns 0 if no pricing information is available for the model.
The model used
Token usage information
Cost in USD, or 0 if pricing not configured
Anthropic provider implementation for Stratix AI Agents.
Requires explicit model configuration - no defaults provided. Supports Claude 3 models (Opus, Sonnet, Haiku) with tool use and streaming. Note: Anthropic does not support embeddings.
Example: Using predefined model constants
Example: Custom models with updated pricing
Example: Without pricing (calculateCost returns 0)
Example: Streaming