Smith::LLM::OpenRouter
Inherits Smith::LLM::AnthropicCaching < Smith::LLM::Provider < Reference < Object
Constants
OpenRouter model ids for Anthropic models all carry this prefix, and it is the whole capability test — no metadata call, no model table.
Constructors
Instance methods
Prompt caching, and only reachable on an anthropic/ route. On by
default like the direct Anthropic provider: on any other route the
markers are a verified no-op — OpenRouter answers 200 and ignores them —
so leaving it on costs nothing.
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.