Normalize Anthropic's `system` field (top-level on /v1/messages and /v1/messages/count_tokens) into a leading `{role:"system", content:...}` entry on `messages`. Accepts either a flat string or an array of typed blocks (`[{type:"text", text:"..."}]`), and strips any `x-anthropic-billing-header:`-prefixed block injected by Claude Code so it never reaches the model or the token counter. Side-effect
| 689 | std::string speculative_mode; |
| 690 | if (pflash_enabled) speculative_mode = "pflash"; |
| 691 | else if (config.speculative_enabled) speculative_mode = "dflash"; |
| 692 | else speculative_mode = "off"; |
| 693 | |
| 694 | // Spec §4.2: the five-tier vocabulary (low | medium | high | x-high | max) |
| 695 | // all activate the phase-1 envelope. Advertise the full set when the |
| 696 | // arch supports reasoning so clients can negotiate the higher tiers. |
| 697 | json reasoning_efforts = json::array(); |
| 698 | if (reasoning_supported) { |
| 699 | reasoning_efforts.push_back("low"); |
| 700 | reasoning_efforts.push_back("medium"); |
| 701 | reasoning_efforts.push_back("high"); |
| 702 | reasoning_efforts.push_back("x-high"); |
no test coverage detected