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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
//! 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
/// Anthropic's computer toolset, mapped onto Mermaid's `computer` tool.
/// 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.
/// Gemini end to end: thought signatures and the computer use tool.
/// Gemini's computer use tool, mapped onto Mermaid's `computer` tool.
/// 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.
/// OpenAI's `computer` tool, mapped onto Mermaid's `computer` tool.
/// OpenAI's requests on the Responses API: kept reasoning, its own
/// `apply_patch` tool, server-side compaction.
/// OpenAI on Responses end to end: kept reasoning, `apply_patch` translated
/// and replayed, refusals learned.
/// The Responses wire format the Meta and OpenAI adapters share.
pub
/// Anthropic's server-side compaction, end to end: asked for, replayed,
/// and learned when refused.
/// Tool-returned images for providers whose tool messages are text only.
/// 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.