1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
//! Provider adapters module
//!
//! Contains implementations of the Model trait for Ollama, the
//! OpenAI-compatible long tail, Anthropic Claude, and Google Gemini.
//!
//! Each owns its wire format and nothing else: [`driver`] holds the read
//! loop they all used to carry a copy of.
/// The stream-accumulation rules (caps, bounds, usage, error bodies) every
/// adapter calls instead of carrying its own copy.
pub
/// One test suite driven over recorded response bodies, one per provider.
/// In-crate rather than under `tests/` so it can reach the protocol
/// structs, which are wire-format detail and not public API.
/// Capability discovery by rejection: send optimistically, learn from a 400.
/// A scripted loopback HTTP provider for adapter tests.
/// The native tools end to end: declared, translated, replayed, refused.
/// Anthropic's own text-editor and bash tools, mapped onto Mermaid's.
/// Anthropic's server-side compaction, end to end: asked for, replayed,
/// and learned when refused.
/// Every adapter, end to end, against a model the catalog has never seen.
/// A model's token limits as reported by its provider's models endpoint.
/// `None` means the provider didn't expose that limit — never a guess.