mirror of
https://github.com/block/buzz.git
synced 2026-08-18 06:50:31 +02:00
Adds `Provider::Fireworks` (`BUZZ_AGENT_PROVIDER=fireworks`) calling api.fireworks.ai directly rather than through OpenRouter, plus `FIREWORKS_SERVICE_TIER` for its serving tier. This is deliberately a new variant rather than an OPENAI_COMPAT_BASE_URL override, because the wire contract differs in two ways that break the shared OpenAI route (both measured against the live API): 1. Fireworks rejects unknown fields with 400 "Extra inputs are not permitted" instead of ignoring them. `openai_body` replays every unmodelled tool-call key through `ToolCall::provider_extra` -- which exists so Gemini gets its `thoughtSignature` back -- and Fireworks' own tool-call responses carry `index` and `name`. Without the strip, turn two of any tool-using session 400s on a key Fireworks itself sent us, after the trial has already paid for container setup. 2. Its reasoning enum is low|medium|high|xhigh|max|none|adaptive. The OpenAI route's per-model normalization clamps `max` to `xhigh` for anything but gpt-5.6, which would silently downgrade a max-effort benchmark cell into a condition nobody asked for. `service_tier` is the motive for the route. On OpenRouter the field is silently discarded: a deliberately invalid value is accepted without error and priced identically. Fireworks validates against auto|default|flex|priority and 400s otherwise, so `priority` actually selects a queue -- which matters because the OpenRouter path's 429s all reported `upstream_provider_shared_pool` for the Fireworks upstream, capacity our own key cannot influence. The value is validated at config parse time so a typo fails at startup rather than on the first live call. Renames `post_openrouter`/`openrouter_summary_body` to `post_chat_completions`/`chat_summary_body`; both were already generic bearer-auth chat-completions helpers and are now shared with this route. Verified end-to-end by driving the binary over ACP stdio against live Fireworks with buzz-dev-mcp: 2 tool calls, 3 LLM requests, end_turn, zero 400s. Also adds the endpoint config and a leaderboard manifest for the cell, and picks up a stale desktop lockfile entry for buzz-agent's existing `dirs` dependency that any desktop build regenerates. Signed-off-by: Atish Patel <atish@squareup.com> Co-authored-by: Claude Code <noreply@anthropic.com>