fix: post-merge review fixes for v0.2.10 - #402
Merged
Merged
Conversation
… items, full usage details - output now carries only model-produced items, so the envelope parses with the official openai SDK types (function_call_output is input vocabulary — the real API never returns it in output) - the full process transcript moves to the new items field; round-trip appends items instead of output (same bytes, so the provider prompt-cache prefix contract is unchanged) - usage aggregates token details across turns (cached_tokens, cache_write_tokens, reasoning_tokens) on both OpenAI surfaces — cache hits are now observable instead of discarded - streaming stops synthesizing the nonstandard tool-output event; every stream event now validates against the official event union, tool results arrive in the terminal envelope's items - tests: two conformance tests pin the contract (non-stream model_validate + per-event stream validation); round-trip prefix tests append items Verified: 267 tests green; live A/B against the real OpenAI API — field-identical to the official hand-rolled flow, round-trip accepted with zero repeat tool calls.
pyproject raised the floor in f58cca1 (0.84-0.107 execute a refusal turn's tool_use blocks); the three user-facing strings still pointed hand-installers at the broken range.
…ertising tool surfaces as_openai_tools / as_anthropic_tools cloud docstrings advertised the image tool without mentioning that the in-process bridge replaces base64 payloads with text placeholder stubs (mcp_bridge call_tool).
litellm's stable channel (every release satisfying our >=1.84.0 floor) and both agent extras require 3.10; on 3.9 pip resolution fails on the hard deps (verified in a clean venv — zero packages install). A clean 3.10 venv with all three extras runs the full suite green. CI already tests 3.10/3.13 only. The >=3.7 claim was inherited from the two-dep 0.2.8 client and was already unsatisfiable then (openai>=1.70 needs 3.8). Closes recurring review finding #10.
53 comment lines removed: rationale that belongs in commit messages, descriptions restating what adjacent code or function names already show, and cloud-implementation provenance notes. Section headers and constraint comments (protocol invariants, safety guards) kept.
rejojer
force-pushed
the
fix/post-merge-review
branch
from
August 13, 2026 06:56
5860c7c to
9485de6
Compare
This was referenced Aug 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
responses()envelope: officialoutput(model items only) +items(full transcript for round-trip), verified against real OpenAI API>=3.10(litellm stable channel requires it; verified in clean venv)anthropic>=0.84.0hint strings updated to0.108.0as_openai_tools/as_anthropic_toolsdocstringsTest plan
Response.model_validatepasses on non-stream envelopeResponseStreamEventunion