Skip to content

Releases

v0.8.6 — stand-in signatures stay behind the fold

Choose a tag to compare

@veildawn veildawn released this 22 Oct 05:50

Fixed

  • Gemini/Messages folds: a thinking block that only carries the fold's stand-in signature — the marker the response fold writes onto a rebuilt thought so Messages clients keep it as thinking across a replay — is now folded as an unsigned block (a bare thought part) instead of being sent to the target as a thoughtSignature. The target validates what it is handed and answers INVALID_ARGUMENT, which a gateway surfaces as a rejected model request: a Messages client behind a gateway lost the second request of every multi-turn tool loop once a rebuilt thought was in history.
  • The same stand-in on a replayed tool_use call folds to the target's skip marker, the value a missing signature already gets.
  • The streamed request fold drops a stand-in signature delta instead of emitting it as a thoughtSignature part.

A client that never replays a block is unaffected: real signatures still ride through untouched, in either spelling.

Full history: CHANGELOG.md.

v0.8.5 — latest

Choose a tag to compare

@veildawn veildawn released this 21 Oct 10:50

Latest release. Covers the v0.8.x line: terminal error frames, plus five fold fixes on the gemini/Responses path.

Fixed

  • Fold developer-role messages into system instructions (gemini/Responses).
  • Keep a $ref-bearing tool result wrapped as text.
  • Anchor the tool-result data URL at the scheme.
  • Read the thought signature in either spelling.
  • Stamp the skip marker on every replayed call, in either spelling.

Full history: CHANGELOG.md.

v0.8.0 — terminal error frames

Choose a tag to compare

@veildawn veildawn released this 21 Oct 10:50

Added

  • WriteTerminalError mints a dialect's terminal error frame, so a host that aborts a delivery mid-stream can end it in the client's own wire instead of a connection that simply goes quiet. Gemini gets an error-object data frame with no sentinel, Messages and Responses a named event: error frame, Chat the payload plus [DONE].

v0.7.0 — the images dialect

Choose a tag to compare

@veildawn veildawn released this 21 Oct 10:50

Added

  • The images dialect: the image-generation wire (prompt/n/size requests, edits with image[], data[] of b64_json responses).
  • The images ↔ gemini fold pair, on request and response bodies. Image generation does not stream, so the pair has no SSE fold.

v0.6.0 — the gemini dialect

Choose a tag to compare

@veildawn veildawn released this 14 Oct 06:36

What's new

A fourth public dialect joins chat, messages and responses: gemini (the generateContent wire). It converts to and from all three existing dialects on every surface — request bodies, response bodies and SSE streams — as direct one-hop folds, while the semantics stay pinned to LiteLLM v1.100.1 (whose own path between these dialects is a two-hop composition through chat).

Highlights

  • Three new leaf packages: geminichat, geminimessages, geminiresponses — request/response/stream folds each, self-contained like their siblings.
  • Stream terminal semantics for the sentinel-less wire: a finishReason-bearing frame closes the turn; StreamResult stays honest for hosts that bill on it.
  • Boundary updated deliberately: four dialects in the closure, gemini off the vendor denylist (it is a dialect name now), exported-surface allowlist and README contract moved with it.
  • Tool arguments preserve the source string's key order into the target's args; signed thinking blocks fold as flagged thought parts on response bodies and keep the writer's unflagged replay spelling on request bodies — each side mirrors its own reference.
  • Reverse stream fold recovers done-only text and response-level thought_signatures.

Verification

  • Reference parity: 317 executed-reference cases + 148 derived/roundtrip cases (six parity test files), goldens regenerated through the composed adapters.
  • Live endpoint testing on gemini-3.6-flash, gemini-3.8-flash and gemma-4-26b-a4b-it: image recognition, forced tool calls, JSON-structured output, streamed tool calls and reverse round-trips on every dialect — all green.
  • go build / go vet / gofmt / full go test clean.

Full Changelog: v0.5.1...v0.6.0

v0.5.0 — litellm v1.100.1 full parity alignment

Choose a tag to compare

@veildawn veildawn released this 13 Oct 09:35

Audited all 246 implementation functions across the three public dialects against the litellm v1.100.1 reference — both its source and a live install of the reference itself. 309 confirmed divergences, 251 fixed, 61 kept as deliberate divergences (pinned tests carrying rationale, or the README contract: no vendor knowledge, offline, no clock).

Behavior changes worth noting

Requests Anthropic used to reject — last-assistant trailing whitespace rstripped, consecutive same-role turns merged, sanitized tool-name collisions deduplicated (_2 suffixes), tool_use ids sanitized to ^[a-zA-Z0-9_-]+$, unsigned inline thinking blocks dropped, empty assistant text rewritten to the placeholder.

Content no longer silently lost — tool cache_control lifted onto the fold, file_id attachments folded instead of dropped, web_search_options mapped to hosted web_search tools, repairable truncated tool arguments repaired, legacy function_call turns converted.

Data errors fixed — / inlined for Anthropic output schemas, integer enums keep their type (json.Number type-check bug), streaming thinking signatures kept per block instead of cross-block mismatched, server_tool_use blocks indexed correctly.

Verification

go test ./..., go vet ./... and gofmt are clean. Every fix carries a regression case in the new litellm_parity_<area>_test.go files; stale assertions that pinned non-litellm behavior were updated with the reference cited.