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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# Embedded provider table (arch §4.2). Parsed through the SAME
# `toml::from_str::<PartialConfig>` path as a user config file — the lowest-
# precedence operand of the resolution fold, never a bootstrap special case
# (config §3.5). A unit test parses this file so a malformed edit fails the
# build, not a user run.
# The transport SILENCE budget in whole seconds (config §4.3, architecture §13.15).
# The single home for this number — `bz` reads it off the resolved config and, via
# `timeouts()`, fans it onto ureq's connect + response-header + inter-chunk-idle
# budgets, so the bin holds no magic constant. It abandons an upstream that makes no
# progress (sends no bytes) for this long — applied per phase — WITHOUT capping total
# stream length, so a long-but-live generation is never cut (it is NOT a wall-clock
# total). Override in your config file / env / flag; delete this line to unbound it.
= 120
[[]]
= "anthropic"
= "https://api.anthropic.com"
= "anthropic_messages"
= "api_key"
= { = "x-api-key", = "raw" }
= [["anthropic-version", "2023-06-01"]]
= { = 4096 } # Anthropic requires max_tokens; the row's sane default, overridable via config/flag (config §4.1)
= ["claude-"] # owns the claude- family, so `bz -m claude-… "q"` routes here with no --provider (arch §4.3)
= { = "api_key_env", = "ANTHROPIC_API_KEY" } # vendor-conventional key alias as a ROW-SCOPED, store-miss source — below BRAZEN_API_KEY/--api-key, can't leak cross-vendor or shadow a stored cred (auth §5.5)
[[]]
= "openai"
= "https://api.openai.com/v1"
= "openai_chat"
= "bearer"
= { = "Authorization", = "bearer" }
= ["gpt-", "chatgpt-", "o1", "o3", "o4"] # the OpenAI families; openai-responses (same models, other protocol) ships none, so it stays explicit (arch §4.3)
# Mistral speaks the OpenAI chat dialect verbatim — the severability proof: one
# row, ZERO Rust (providers §2). Reuses the OpenAiChat protocol + bearer auth.
[[]]
= "mistral"
= "https://api.mistral.ai/v1"
= "openai_chat"
= "bearer"
= { = "Authorization", = "bearer" }
= ["mistral-", "ministral-", "magistral-", "codestral-", "pixtral-"]
[[]]
= "openai-responses"
= "https://api.openai.com/v1"
= "openai_responses"
= "bearer"
= { = "Authorization", = "bearer" }
# No model_prefixes: openai-responses serves the SAME OpenAI model ids as `openai`
# over a different protocol. Claiming them would make every gpt-… ambiguous (78),
# so this alternate-protocol row stays opt-in via explicit --provider (arch §4.3).
# Google authenticates with a custom header NAME carrying the raw key — pure row
# DATA read by the shared ApiKeyAuth, no new Auth impl (providers §4.1).
[[]]
= "google"
= "https://generativelanguage.googleapis.com"
= "google_generative_ai"
= "api_key"
= { = "x-goog-api-key", = "raw" }
= ["gemini-"]
# Local Ollama needs no auth: `auth = "none"` reads no credential and writes no
# header, so a keyless row carries no `api_header` (providers §5.1).
[[]]
= "ollama"
= "http://localhost:11434"
= "ollama_chat"
= "none"
# The installed Claude Code CLI as a pure model pass-through (claude-code spec): an
# EXEC-transport row — `exec` substitutes for base_url, `claude` carries its own
# OAuth so auth = "none". The five listed canonical fields have no wire slot on the
# CLI (spec §4.1), so they strip pre-encode. No model_prefixes: `anthropic` owns
# `claude-`; this alternate-transport row stays opt-in via explicit --provider,
# like openai-responses (arch §4.3.1).
[[]]
= "claude-code"
= "claude_code"
= "none"
= "claude"
= ["max_tokens", "temperature", "top_p", "stop", "output"]