Skip to content

feat(schema): preserve Claude redacted thinking - #1186

Open
amckinley wants to merge 1 commit into
cloudwego:mainfrom
amckinley:fix/claude-redacted-thinking
Open

feat(schema): preserve Claude redacted thinking#1186
amckinley wants to merge 1 commit into
cloudwego:mainfrom
amckinley:fix/claude-redacted-thinking

Conversation

@amckinley

Copy link
Copy Markdown

Summary

  • add a typed Claude reasoning extension for opaque redacted thinking blocks
  • preserve the extension through AgenticMessage JSON round trips
  • preserve it when streaming chunks are concatenated

Why

Anthropic requires redacted thinking blocks to be passed back unchanged on subsequent turns. The AgenticMessage schema currently has no lossless representation for that opaque payload, so Claude adapters have to discard it or misuse a visible reasoning field.

A follow-up eino-ext change uses this field in the agentic Claude adapter for response conversion and request replay.

Testing

  • go test ./schema/...
  • adversarial cross-model review: no findings

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants