Smith::LLM::Anthropic
Inherits Smith::LLM::AnthropicCaching < Smith::LLM::Provider < Reference < Object
Constants
Constructors
Instance methods
Caching needs a minimum prefix length (1024 tokens on Sonnet/Opus, 2048 on Haiku); below that the 1.25x write surcharge buys nothing, hence the switch.
Streaming entry point. The default does no streaming at all — it runs complete() and hands the text over in one piece.
That default is what makes deltas universal: callers always see them,
whether or not the provider streams, so neither the agent loop nor the
renderers need a special case. Providers override this; when streaming
is switched off they call super.
The one provider that takes a PDF as a document block and reads it itself, pages and all.
A tool_result's content may be an array of blocks, images among them —
which is what lets read_file hand back a screenshot.