Repository navigation
Conversation
## Summary - Adds `Molto.messages(..., citation_policy="auto")` for conditional citation buffering on translated Responses routes. It buffers text when normalized tools or history signal possible citations; otherwise text streams immediately and unexpected citations are dropped. `"buffer"` always buffers each text part, `"drop"` remains the default, and opaque transport extensions do not select automatic buffering. Native Messages and Chat upstream behavior remain unchanged. - Preserves point citations without splitting text at zero-length ranges. When no original excerpt exists, the containing block supplies the fallback `cited_text`. Existing offset validation, blank-text rejection, provider metadata, and SDK-compatible text deltas remain intact. - Extends terminal-reason coverage with normal completion and refusal, and adds coverage for automatic buffering, history, transport overrides, point citations, and SDK text iteration. - Merges `amer-hosted-web-search`, retaining its Anthropic continuation metadata, provider-specific missing/empty/placeholder ciphertext rejection, and recorded continuation coverage. No cassette contents differ from that branch. Removal of output-only missing reasoning-signature checks is tracked independently in [PR #90](#90). ## Verification - `.venv/bin/python -m pytest`: 2,293 passed in 35.78 seconds on Python 3.12.9 after separating the reasoning-output work. Tests used offline replay only. - Focused citation and terminal-reason tests: 154 passed, 267 deselected. Earlier outdated point-citation expectations were corrected before the passing full suite. - `uv run --extra lint ruff check --output-format github --config pyproject.toml .`: passed. - `uv run --extra lint ruff format --diff --config pyproject.toml .`: passed. - `npx prettier@3.8 --check .`: passed. - `git diff 4235d01 HEAD --exit-code`: passed; the final tree exactly matches the verified hosted-search-only merge. Cassettes remain unchanged relative to `amer-hosted-web-search`. - The offline replay workflow targets PRs against `main`, so PR #89 relies on the local suite above while its base remains `amer-hosted-web-search`.
Coverage Report (Python 3.12) •
|
||||||||||||||||||||||||||||||||||||||||||||||||||
Coverage Report (Python 3.13) •
|
||||||||||||||||||||||||||||||||||||||||||||||||||
|
hi @jiahuei, I tested follow-up requests using real unsigned DeepSeek reasoning through Messages → Chat and Responses → Chat with the summary capability profile. When I sent the first response back as conversation history, Molto rejected both requests before reaching DeepSeek. With the raw profile, both already worked. After removing the two adapter checks and the Responses request-builder check, both summary-profile follow-ups succeeded. Live OpenAI tests with synthesized unsigned history also accepted normal follow-ups and tool-loop requests. Anthropic behaved differently: it rejected missing or empty signatures, so keeping its upstream check matches what I observed. Would it make sense to allow unsigned summaries during request normalization and leave signature validation to each upstream request builder, keeping the Anthropic check and Chat’s rejection of signed state? The replay tests in |
Automated review (Claude)Reviewed the diff relaxing output-side reasoning-signature checks in the Anthropic/OpenAI adapters and upstream clients, plus the lazy-PyYAML fix. The core design holds up: relaxing signature requirements only on the output/projection side while keeping request/history-replay strict was traced end-to-end, and no crash or wrong-output path was found from the removed checks themselves. Three smaller findings:
🤖 Generated with Claude Code |
Summary
70ad86c, preserving hosted web search and its remapped Messages block indices alongside unsigned reasoning output.Verification
.venv/bin/python -m pytest --cov=python/molto --cov-report=term-missing --cov-report=xml:coverage.xml --junitxml=junit/pytest.xml: 2,316 passed in 88.68 seconds on Python 3.12.9, using offline replay only.uv run --extra lint ruff check --output-format github --config pyproject.toml .: passed; the resolved Python files also passed the focused check.uv run --extra lint ruff format --diff --config pyproject.toml .: passed; the resolved Python files also passed the focused check.npx prettier@3.8 --check .: passed; resolved documentation also passed its focused check.git diff --checkandgit diff --cached --check: passed before committing.git diff --quiet -- tests/cassettesandgit diff --cached origin/main --quiet -- tests/cassettes: passed before committing; cassette files match main, with no new recordings.