piagent_
← /news
Sep 8, 2026community

pi runtime dependency refresh fixes Google GenAI tool-call overflow and mermaid class assignments

mitsuhiko merged pull request #9341 into the pi coding agent on September 8, 2026. Its title reads like housekeeping — a runtime dependency update — but the summary carries two user-visible fixes alongside the version bumps: handling Google GenAI’s new TOO_MANY_TOOL_CALLS finish reason, and rendering mermaid diagrams that use class assignments.

The bulk is exactly what the title says: minimatch 10.2.6, undici 8.10.2, typebox 1.3.27, semver 7.8.5, ignore 7.0.8, esbuild 0.28.2, and chalk 6.0.0, plus @anthropic-ai/sdk 0.124.0 and @aws-sdk/client-bedrock-runtime 3.1127.0 on the provider side. The diff, openai, and highlight.js versions are deliberately retained. The root lockfile, the coding-agent shrinkwrap, and the installer lock are regenerated, preserving the workspace-nested proxy dependency versions in the generated locks. The packaging script also adds kerberos to its optional-native-module allowlist for proxy authentication, with the caller reporting an install hint when it is absent.

The more consequential rider is the @google/genai jump from 1.52.0 to 2.21.0 — a major-version upgrade whose types now include a TOO_MANY_TOOL_CALLS finish reason. The mapStopReason mapper in packages/ai is an exhaustive switch whose default branch throws on unknown values, so the new reason needs an explicit case: it now lands in the error group next to MALFORMED_FUNCTION_CALL and UNEXPECTED_TOOL_CALL instead of falling through to that throw.

The second fix bumps grok-mermaid from 0.2.2 to 0.2.3 and rewrites the mermaid tests around it. A diagram line carrying a class assignment, like A[Foo]:::highlight --> B[Bar], used to be rejected with a “dropped, expected a link” warning, which pushed the whole diagram back to the fenced code block under a “Mermaid diagram not rendered” notice. With 0.2.3 the class-assigned node renders like any other; the code-block fallback now triggers only on genuinely invalid lines, and the regression tests use an A[Foo] invalid example to pin that behavior.

None of it has shipped in a release yet — the batch sits on main heading for the release after v0.85.1, and the #9341 diff on GitHub carries the full dependency manifest alongside both fixes.

source: https://github.com/earendil-works/pi/pull/9341