fix(client): explain missing Gemini thought signatures - #6081
Conversation
A compatible gateway can reject unsigned Gemini tool-call history with a raw missing-thought_signature 400 even though it is allowed through the official-route preflight guard. Explain the route and new-session recovery at the shared HTTP error boundary so streaming and non-streaming callers both receive useful guidance while gateways managing signatures still work. Keep provider details bounded, preserve quota/HTML handling, and avoid duplicating guidance when the error is formatted again. Add mocked transport and error-boundary regressions and record the report in the changelog. Reported by @Hmbown in Hmbown#6048. Verified with 409 related tests passing. Removing the production change fails three recovery regressions, including the mocked HTTP 400 path. Co-authored-by: Hunter Bown <101357273+Hmbown@users.noreply.github.com> Signed-off-by: Nightt <87569709+nightt5879@users.noreply.github.com>
Address Devin's review of PR Hmbown#6081 by removing the branch's changelog entry and generated website mirror. CONTRIBUTING.md reserves those updates for the merge session on main; all changelog surfaces now match upstream. Keep the issue Hmbown#6048 report credit under Unreleased in CONTRIBUTORS.md so the published v0.9.13 contributor list stays in exact website parity. This also corrects the version-drift and public-copy CI failures. Verified the 12 changelog/public-copy tests, release version and changelog sync checks, formatting, and whitespace checks. The implementation and its 409 passing targeted Rust tests are unchanged. Signed-off-by: Nightt <87569709+nightt5879@users.noreply.github.com>
|
Thanks for the fix and the transport-level regression coverage. I harvested this into the local 0.9.13 release lane as The focused run passed all 71 selected tests, including your new transport and sanitization tests. The root npm and web gates also passed. The complete final-head sweep, live terminal verification, and hosted CI still need to finish before publication; this is not yet a released fix. |
Adapt the contributor patch onto the existing release fix, retaining one bounded, idempotent recovery hint. Exercise working and rejecting gateways through streaming and non-streaming HTTP transport; preserve quota, HTML, and Google preflight boundaries. Harvested from PR #6081 by @nightt5879 Validation: 71 focused TUI library tests passed, including gateway transport and error sanitization. npm test passed (66 wrapper, 9 SDK, 446 web); npm run check:web passed with two existing image warnings. Final candidate sweep follows. Co-authored-by: nightt5879 <87569709+nightt5879@users.noreply.github.com> Co-authored-by: Hmbown <101357273+Hmbown@users.noreply.github.com>
|
Thanks @nightt5879 — your contribution landed in
Closing this PR now that the code is on If you want to land more work and would prefer your future PRs merge cleanly without a harvest step, the |
Summary
Fixes #6048.
When a compatible gateway rejects a Gemini tool-call replay with
Function call is missing a thought_signature in functionCall parts, Codewhale now explains how to recover: select the built-ingoogleprovider with its default endpoint, or a gateway that preserves signatures, then start a new session.The existing shared HTTP error formatter applies this guidance to streaming and non-streaming requests only after an explicit missing-signature 400. It retains bounded provider details, preserves quota and HTML handling, and remains safe to format twice. Gateways that manage signatures themselves continue to accept unsigned history.
Thanks to @Hmbown for identifying the missing recovery guidance and the gateway compatibility constraint.
Testing
cargo check -p codewhale-tui --lib --locked— passed.cargo fmt --all -- --check,git diff --check, provider registry and dead-code budget checks — passed.cargo test -p codewhale-tui --lib --all-features --locked -- thought_signature llm_client:: client::chat:: client::tests:: client::responses:: client::anthropic:: --test-threads=1— 409 passed, 0 failed.child_env.rs,mcp.rs, andlib.rs; all three files match main. Three-platform CI tests are pending.The full Linux web CI suite passed all 446 tests. The broader local web suite reached 393 passing tests, with unrelated Windows CRLF/POSIX-path failures. Local Rust tests run with the repository's isolated-home wrapper. Network cases run serially with ambient proxy variables removed from the test subprocess; the unrelated MCP network cases passed under that configuration.
Checklist