You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
Added
replay_thinking provider setting, for Claude behind LiteLLM. The OpenAI and OpenAI-compatible clients now keep the signatures LiteLLM streams in delta.thinking_blocks (and redacted thinking), so saved replies hold signed Thinking and RedactedThinking blocks as the Anthropic client's do. With replay_thinking = true on a provider (ProviderConfig::with_replay_thinking, AgentConfig::with_replay_thinking, OpenAiClient::with_replay_thinking, OpenAiCompatibleClient::with_replay_thinking in code), the replies of the current tool loop send that thinking back as thinking_blocks. Anthropic needs this to keep extended thinking on through tool calls, and LiteLLM's modify_params otherwise turns thinking off for those requests. Off by default. Unsigned thinking and older turns' thinking are never sent. See replay_thinking in docs/configuration.md.
Error::from_response(response) builds the Error::HttpError for a non-2xx reqwest::Response: its status, body and Retry-After. Custom LlmClients can use it so their errors get the same retry handling as the built-in clients.
HTTP errors are structured over ACP. A provider's HTTP error used to reach ACP clients as the string "HTTP 429: {...}". It's now an internal_error whose data is { "kind": "http_error", "status", "retry_after_secs", "body" }, with body parsed if it's JSON, so a client that knows its provider's error format can read it (see docs/api.md).
Changed
Breaking: Error::HttpError has a retry_after: Option<Duration> field, the response's Retry-After header. Code that builds the variant needs to set it (or use Error::from_response), and patterns need .. or the field. Error::retry_after() returns it.
Retry-After is honoured. On a 429 or 5xx, the LLM and embedding clients wait the provider's Retry-After instead of their own backoff. A Retry-After over 10 seconds isn't retried, and the error is returned at once. A limit that lifts in hours used to be retried three times over about 7 s before the user saw it.
HTTP 529 is retried. Anthropic answers 529 (overloaded_error) when it's temporarily overloaded. The request failed at once; it's now retried like a 503.