Skip to content

Commit a7349a2

Browse files
authored
Merge pull request #720 from code-yeongyu/docs/release-2026.8.5-changelog
docs(changelog): audit v2026.8.5 release notes
2 parents 28fd075 + 62ab8cd commit a7349a2

3 files changed

Lines changed: 53 additions & 29 deletions

File tree

packages/ai/CHANGELOG.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,19 @@
1010

1111
### Fixed
1212

13-
- Kept tool parameter schemas rooted in an object type. A root `anyOf`/`oneOf`/`allOf` previously had its `type` hoisted into the branches and deleted, so OpenAI-compatible gateways rejected the request with `tools.function.parameters.type is required and must be "object"`, and the Moonshot root-union merge dropped the root's own properties entirely ([#718](https://github.com/code-yeongyu/senpi/pull/718)).
14-
- Sent the real parameters of root-union tool schemas to Anthropic. `convertTools` read top-level `properties` only, so plugin and MCP tools defined as a root union reached the model with no parameters at all ([#718](https://github.com/code-yeongyu/senpi/pull/718)).
15-
- Stopped retrying provider request-shape rejections. Gateways wrap these deterministic failures in 5xx envelopes, so they were classified transient and the identical invalid payload was replayed on the same model before fallback inherited it ([#718](https://github.com/code-yeongyu/senpi/pull/718)).
13+
- Fixed OpenAI-compatible Chat Completions tool schemas whose object-shaped root used `anyOf`, `oneOf`, or `allOf`:
14+
root object typing is no longer hoisted away, and object-shaped root `anyOf`/`oneOf` schemas now retain root
15+
properties and required names while merging branch properties. The same object-root normalization is used for
16+
Moonshot, while scalar and mixed root unions are left unchanged rather than being mislabeled as objects
17+
([#718](https://github.com/code-yeongyu/senpi/pull/718)).
18+
- Fixed Anthropic tool conversion advertising object-shaped root `anyOf`/`oneOf` schemas as parameterless tools.
19+
The adapter now resolves those schemas into top-level properties and required names before constructing
20+
`input_schema`, while leaving ordinary object schemas unchanged
21+
([#718](https://github.com/code-yeongyu/senpi/pull/718)).
22+
- Stopped same-model retries for recognized malformed `tools.`/`functions.` schema errors, including
23+
gateway-wrapped 5xx responses and `invalid tool schema` messages. These matches are classified non-retryable before
24+
generic server-error rules; unrelated transient 5xx failures remain retryable
25+
([#718](https://github.com/code-yeongyu/senpi/pull/718)).
1626

1727
### Removed
1828

packages/ai/src/changes.md

Lines changed: 24 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -4,32 +4,30 @@
44

55
### What changed and why
66

7-
- `utils/tool-schema-compat.ts` no longer hoists a ROOT schema's `type` into its combiner
8-
branches. A tool's root `parameters` must stay an object schema: OpenAI-compatible gateways
9-
reject a typeless root with `tools.function.parameters.type is required and must be "object"`,
10-
which is exactly how an Apitopia/Kimi turn died on 2026-08-04. `normalizeNode` now takes an
11-
`isRoot` flag so branch-level hoisting (still correct below the root) is unchanged, and
12-
`ensureRootObjectSchema` guarantees the emitted root is always `{"type":"object", ...}`.
13-
- `mergeRootObjectUnion` now merges the root's OWN `properties`/`required` with the branches'
14-
instead of replacing them. It previously returned `{"properties":{},"type":"object"}` for a root
15-
union that declared its properties at the root — silently sending a tool with zero parameters.
16-
Untyped constraint-only branches (`{ required: [...] }` over root properties) are accepted, and
17-
`required` keeps root entries plus only the names every branch shares.
18-
- Both flavors share one root guarantee: `normalizeToolParametersForMoonshot` is now the OpenAI
19-
normalization plus annotation stripping, rather than a second, divergent root-merge path.
20-
- `api/anthropic-messages.ts` resolves a tool's root parameters through the shared
21-
`resolveRootObjectSchema` before building `input_schema`. `convertTools` reads top-level
22-
`properties`/`required` only, so a tool whose parameters are a root union arrived as
23-
`{"properties":{},"required":[]}` — Claude was told the tool takes no arguments. senpi's own
24-
`monitorSchema` was flattened in July to dodge this, but plugin and MCP tools ship root unions
25-
and cannot be flattened by us, so the conversion itself has to handle them.
26-
- `utils/retry.ts` classifies provider request-shape rejections as NON-retryable, and
27-
`NON_RETRYABLE_PROVIDER_LIMIT_ERROR_PATTERN` is renamed `NON_RETRYABLE_PROVIDER_ERROR_PATTERN`
28-
because it no longer covers only limits. Gateways wrap these deterministic rejections in 5xx
29-
envelopes (`500 server_error: Invalid request: tools.function.parameters...`), so matching on
30-
status text alone classified a permanent failure as transient: the identical payload was replayed
31-
on the identical model until the turn died. The patterns are anchored on the
32-
`tools.`/`functions.` request path so unrelated prose mentioning tools stays retryable.
7+
- `utils/tool-schema-compat.ts` no longer hoists a ROOT schema's `type` into its combiner branches.
8+
OpenAI-compatible gateways reject a covered object-shaped root when normalization removes its required
9+
`type: "object"`, which is exactly how an Apitopia/Kimi turn died on 2026-08-04. `normalizeNode` now takes an
10+
`isRoot` flag so branch-level hoisting (still correct below the root) is unchanged. Plain and object-shaped roots
11+
receive or retain object typing, while scalar and mixed root unions remain unchanged instead of being mislabeled.
12+
Root `allOf` is protected from root type hoisting but is not flattened into a synthetic object.
13+
- `mergeRootObjectUnion` merges object-shaped root `anyOf`/`oneOf` schemas without replacing the root's own
14+
`properties`/`required`. It previously returned `{"properties":{},"type":"object"}` for a root union that declared
15+
its properties at the root — silently sending a tool with zero parameters. Untyped constraint-only branches
16+
(`{ required: [...] }` over root properties) are accepted, and `required` keeps root entries plus only the names
17+
every branch shares.
18+
- `normalizeToolParametersForMoonshot` now reuses the same object-root normalization before annotation stripping,
19+
rather than maintaining a second, divergent root-merge path.
20+
- `api/anthropic-messages.ts` resolves object-shaped root `anyOf`/`oneOf` parameters through the shared
21+
`resolveRootObjectSchema` before building `input_schema`. `convertTools` reads top-level `properties`/`required`
22+
only, so covered root unions previously arrived as `{"properties":{},"required":[]}`. The conversion now merges
23+
their properties and required names while leaving ordinary object schemas unchanged; non-object unions and root
24+
`allOf` remain outside this resolver's flattening boundary.
25+
- `utils/retry.ts` classifies five recognized malformed tool/function schema message forms as NON-retryable, and
26+
`NON_RETRYABLE_PROVIDER_LIMIT_ERROR_PATTERN` is renamed `NON_RETRYABLE_PROVIDER_ERROR_PATTERN` because it no
27+
longer covers only limits. Gateways can wrap these deterministic rejections in retryable-looking 5xx envelopes,
28+
so generic status matching replayed an equivalent invalid request on the same model. Four matchers target
29+
`tools.`/`functions.` request paths; `invalid tool schema` is intentionally broader. Eligible configured
30+
fallbacks rebuild their own provider-specific request rather than inheriting guaranteed identical bytes.
3331

3432
### Why this cannot be expressed externally
3533

packages/coding-agent/CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,26 @@
1212

1313
### Fixed
1414

15+
- Brought GitHub binary installs up to parity with npm for paused terminal monitors: after the wake budget suppresses
16+
noisy line updates, the same monitor's terminal completion, timeout, or kill summary now clears the notifier pause
17+
and prior rate limit, resets the monitor-only wake streak, and wakes the session automatically without
18+
`monitor({ action: "rearm" })` or another wake-budget charge. Intermediate events remain suppressed until rearm,
19+
and the pause notice now makes that distinction explicit ([#717](https://github.com/code-yeongyu/senpi/pull/717)).
1520
- Fixed provider transport-timeout retries remaining indefinitely Working when both
1621
ordinary stream guards were disabled; retry continuations now abort only their
1722
captured Agent run at the configured retry cap, settle the session, and leave
1823
later prompts/takeovers untouched ([#719](https://github.com/code-yeongyu/senpi/pull/719)).
24+
- Fixed OpenAI-compatible tool calls failing when an object-shaped root combiner lost its required
25+
`type: "object"`, and fixed Moonshot normalization dropping root-declared properties while merging
26+
object-shaped root `anyOf`/`oneOf` schemas. Scalar and mixed root unions remain unchanged instead of being
27+
mislabeled as objects ([#718](https://github.com/code-yeongyu/senpi/pull/718)).
28+
- Fixed Anthropic receiving object-shaped root `anyOf`/`oneOf` tools with an empty parameter map. Senpi now merges
29+
their properties and computes top-level required names before constructing Anthropic `input_schema`, while
30+
preserving ordinary object schemas ([#718](https://github.com/code-yeongyu/senpi/pull/718)).
31+
- Stopped retrying recognized malformed tool/function schema errors on the same model when gateways wrap them in
32+
retryable-looking 5xx responses. With auto-retry enabled and a configured candidate, eligible error-only turns
33+
switch immediately to that fallback; without a candidate they settle after the first call, while generic
34+
transient server errors remain retryable ([#718](https://github.com/code-yeongyu/senpi/pull/718)).
1935

2036
### Removed
2137

0 commit comments

Comments
 (0)