From 0e550c3e4e5c03e2c5bba91acc66558e3def42ef Mon Sep 17 00:00:00 2001 From: zhanghanduo Date: Thu, 1 Oct 2026 21:03:26 +0800 Subject: [PATCH] chore(release): prepare 0.12.3 --- CHANGELOG.md | 11 +++++++++++ changes/a4-anthropic-omit-sampling.fix.md | 1 - changes/anthropic-fold-transient-addendum.fix.md | 1 - changes/anthropic-merge-tool-results.fix.md | 1 - changes/responses-failed-error-routing.fix.md | 1 - changes/runaway-reminder-transient.fix.md | 1 - changes/summary-log-error-body.fix.md | 1 - pyproject.toml | 2 +- uv.lock | 2 +- 9 files changed, 13 insertions(+), 8 deletions(-) delete mode 100644 changes/a4-anthropic-omit-sampling.fix.md delete mode 100644 changes/anthropic-fold-transient-addendum.fix.md delete mode 100644 changes/anthropic-merge-tool-results.fix.md delete mode 100644 changes/responses-failed-error-routing.fix.md delete mode 100644 changes/runaway-reminder-transient.fix.md delete mode 100644 changes/summary-log-error-body.fix.md diff --git a/CHANGELOG.md b/CHANGELOG.md index f0df44c..0d9482d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,17 @@ the GitHub Release body, so a release with no entry here fails. Versioning follows [docs/versioning.md](docs/versioning.md). +## [0.12.3] - 2026-10-01 + +### Fixed + +- Anthropic clients omit sampling parameters from requests in both thinking and non-thinking modes, avoiding `TypeError` with Anthropic Python SDK v1 and HTTP 400 responses from newer models. Constructor, `chat`, and `stream` temperature arguments remain accepted for compatibility but are no longer sent; thinking and effort settings are unchanged. +- Anthropic requests fold the trailing per-call runtime addendum into the preceding user message instead of sending a second consecutive user message; translating gateways (llm-hub before deepseek-flash) intermittently rejected the split form. The prompt-cache breakpoint stays on the last persistent block. +- The Anthropic client now sends the tool results of one turn's parallel tool calls in a single user message, as Anthropic documents, instead of one user message per result. Translating gateways (llm-hub in front of a non-Claude model such as deepseek-flash) rejected the split form with a 400. +- Failed Responses results now raise instead of returning their partial output, so tool calls from a response the server reported as `failed` are never executed. The raised `LLMError` keeps the provider error code and message with an equivalent HTTP status: rate limits use 429, server errors use 500, vector-store timeouts use 504, and other known SDK codes use 400. Unknown or missing codes retain the existing generic retry behavior, while existing text-based fallback and transient-network rules still take precedence. Streaming `response.failed` events now raise the same error instead of being ignored. +- The runaway-retry reminder is now marked per-call (`transient`) in every recovery path, including early-stopped streams and retries after expanded-context overflow, like the runtime addendum it follows. Unmarked, it ended the Anthropic fold of that addendum and a retried request went out as three consecutive user messages. Cache breakpoints stay on persistent content and reminders never accumulate in history. +- Summary LLM failures now log the provider HTTP response body, making rejected requests easier to diagnose. + ## [0.12.2] - 2026-09-27 ### Fixed diff --git a/changes/a4-anthropic-omit-sampling.fix.md b/changes/a4-anthropic-omit-sampling.fix.md deleted file mode 100644 index 670fdda..0000000 --- a/changes/a4-anthropic-omit-sampling.fix.md +++ /dev/null @@ -1 +0,0 @@ -Anthropic clients omit sampling parameters from requests in both thinking and non-thinking modes, avoiding `TypeError` with Anthropic Python SDK v1 and HTTP 400 responses from newer models. Constructor, `chat`, and `stream` temperature arguments remain accepted for compatibility but are no longer sent; thinking and effort settings are unchanged. diff --git a/changes/anthropic-fold-transient-addendum.fix.md b/changes/anthropic-fold-transient-addendum.fix.md deleted file mode 100644 index f6bdde7..0000000 --- a/changes/anthropic-fold-transient-addendum.fix.md +++ /dev/null @@ -1 +0,0 @@ -Anthropic requests fold the trailing per-call runtime addendum into the preceding user message instead of sending a second consecutive user message; translating gateways (llm-hub before deepseek-flash) intermittently rejected the split form. The prompt-cache breakpoint stays on the last persistent block. diff --git a/changes/anthropic-merge-tool-results.fix.md b/changes/anthropic-merge-tool-results.fix.md deleted file mode 100644 index b34710f..0000000 --- a/changes/anthropic-merge-tool-results.fix.md +++ /dev/null @@ -1 +0,0 @@ -The Anthropic client now sends the tool results of one turn's parallel tool calls in a single user message, as Anthropic documents, instead of one user message per result. Translating gateways (llm-hub in front of a non-Claude model such as deepseek-flash) rejected the split form with a 400. diff --git a/changes/responses-failed-error-routing.fix.md b/changes/responses-failed-error-routing.fix.md deleted file mode 100644 index 0b5c62f..0000000 --- a/changes/responses-failed-error-routing.fix.md +++ /dev/null @@ -1 +0,0 @@ -Failed Responses results now raise instead of returning their partial output, so tool calls from a response the server reported as `failed` are never executed. The raised `LLMError` keeps the provider error code and message with an equivalent HTTP status: rate limits use 429, server errors use 500, vector-store timeouts use 504, and other known SDK codes use 400. Unknown or missing codes retain the existing generic retry behavior, while existing text-based fallback and transient-network rules still take precedence. Streaming `response.failed` events now raise the same error instead of being ignored. diff --git a/changes/runaway-reminder-transient.fix.md b/changes/runaway-reminder-transient.fix.md deleted file mode 100644 index f772f79..0000000 --- a/changes/runaway-reminder-transient.fix.md +++ /dev/null @@ -1 +0,0 @@ -The runaway-retry reminder is now marked per-call (`transient`) in every recovery path, including early-stopped streams and retries after expanded-context overflow, like the runtime addendum it follows. Unmarked, it ended the Anthropic fold of that addendum and a retried request went out as three consecutive user messages. Cache breakpoints stay on persistent content and reminders never accumulate in history. diff --git a/changes/summary-log-error-body.fix.md b/changes/summary-log-error-body.fix.md deleted file mode 100644 index 5bc4ab9..0000000 --- a/changes/summary-log-error-body.fix.md +++ /dev/null @@ -1 +0,0 @@ -Summary LLM failures now log the provider HTTP response body, making rejected requests easier to diagnose. diff --git a/pyproject.toml b/pyproject.toml index ec5e747..d4519ab 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "apodex-agent-core" -version = "0.12.2" +version = "0.12.3" description = "Shared, product-neutral runtime primitives for Apodex agents" readme = "README.md" license = "Apache-2.0" diff --git a/uv.lock b/uv.lock index 32d87f8..dd0800b 100644 --- a/uv.lock +++ b/uv.lock @@ -50,7 +50,7 @@ wheels = [ [[package]] name = "apodex-agent-core" -version = "0.12.2" +version = "0.12.3" source = { editable = "." } dependencies = [ { name = "anthropic", extra = ["bedrock"] },