Skip to content

Update: fix Anthropic payload roundtrip#12

Merged
SI-RUI-ZHANG merged 4 commits intomainfrom
middleware-payload-normalization-new
Mar 11, 2026
Merged

Update: fix Anthropic payload roundtrip#12
SI-RUI-ZHANG merged 4 commits intomainfrom
middleware-payload-normalization-new

Conversation

@SI-RUI-ZHANG
Copy link
Copy Markdown
Contributor

原问题
Anthropic basic response payloads could normalize successfully but fail during denormalization. The response path only knew how to write back into request-style carriers (system or messages[i].content) and rejected top-level assistant content blocks.

本次修复
Added top-level Anthropic response content support in the payload codec and added a regression test to lock the roundtrip behavior for the basic assistant response fixture.

Changed files
modeio_middleware/core/payload_codec.py
tests/unit/test_payload_codec.py

Reviewer: @SI-RUI-ZHANG

@SI-RUI-ZHANG SI-RUI-ZHANG force-pushed the middleware-payload-normalization-new branch from 321f039 to 4994009 Compare March 11, 2026 07:30
@SI-RUI-ZHANG SI-RUI-ZHANG merged commit 31c66dc into main Mar 11, 2026
4 checks passed
@SI-RUI-ZHANG SI-RUI-ZHANG deleted the middleware-payload-normalization-new branch March 11, 2026 07:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant