Skip to content

Conversation

@elimoss
Copy link
Contributor

@elimoss elimoss commented Jan 23, 2026

No description provided.

Copilot AI review requested due to automatic review settings January 23, 2026 20:22
@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Jan 23, 2026
@elimoss elimoss requested a review from jamesbraza January 23, 2026 20:23
@dosubot dosubot bot added the enhancement New feature or request label Jan 23, 2026
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds support for marking a Message as a “cache breakpoint” so that serialized content includes cache_control metadata for prompt caching (e.g., Anthropic).

Changes:

  • Introduces a cache_breakpoint flag on Message, excluded from dumps but used during serialization to inject cache_control.
  • Adds Message.set_cache_breakpoint(enabled: bool = True) for fluent enabling/disabling.
  • Adds unit tests for default behavior and serialization outcomes, plus a new live integration-style test.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
src/aviary/message.py Adds cache_breakpoint field, serialization behavior to inject cache_control, and a setter method.
tests/test_messages.py Adds test coverage for cache_breakpoint serialization and behavior, including a new live network test.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Collaborator

@jamesbraza jamesbraza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work! Thanks for doing this

@elimoss elimoss merged commit 3653973 into main Feb 4, 2026
5 checks passed
@elimoss elimoss deleted the cache_breakpoints branch February 4, 2026 19:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants