Skip to content

Refactor ProcessRequest for Anthropic messages interception #201

@ssncferreira

Description

@ssncferreira

Description

The messages package has the most duplication between its blocking and streaming ProcessRequest implementations.

Tasks:

  • Identify the flow that ProcessRequest follows in both blocking and streaming
  • Extract the tool result content conversion (TextContent, EmbeddedResource, BlobResourceContents handling) into a shared method on interceptionBase
  • Extract tool call handling and recording logic as methods on interceptionBase, following the pattern already established in the responses package
  • Fix bugs found during the refactor
  • Add unit tests for the extracted methods

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions