Skip to content

feat: Plug and play system message tool frameworks #6874

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

RomneyDa
Copy link
Collaborator

@RomneyDa RomneyDa commented Jul 29, 2025

Description

More than half of the system message tools code can be plug and play with other ways to write/parse system message tools, such as the XML approach in the original PR.

Some models might do best with the XML or other approaches, or we might want to experiment with them. This PR pulls the tool codeblock format approach (```tool) into a plug and play SystemMessageToolsFramework, to allow easy other approaches later.


Summary by cubic

Refactored the system message tools code to use a plug-and-play framework, making it easy to swap or add new tool codeblock formats like XML in the future.

  • Refactors
    • Moved the tool codeblock logic into a SystemMessageToolsFramework interface and a default implementation.
    • Updated all tool definitions and system message generation to use the new framework.
    • Removed hardcoded codeblock logic and centralized tool parsing, formatting, and detection.
    • Updated tests and Redux logic to support the new framework structure.

@RomneyDa RomneyDa requested a review from a team as a code owner July 29, 2025 22:25
@RomneyDa RomneyDa requested review from Patrick-Erichsen and removed request for a team July 29, 2025 22:25
@Patrick-Erichsen
Copy link
Collaborator

Would it be better for @sestinj to review this? Think he might have more context from the original PR

@dosubot dosubot bot added the size:XL This PR changes 500-999 lines, ignoring generated files. label Jul 29, 2025
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

cubic analysis

1 issue found across 30 files • Review in cubic

React with 👍 or 👎 to teach cubic. You can also tag @cubic-dev-ai to give feedback, ask questions, or re-run the review.

@Patrick-Erichsen Patrick-Erichsen requested review from sestinj and removed request for Patrick-Erichsen July 30, 2025 17:23
@sestinj
Copy link
Contributor

sestinj commented Aug 1, 2025

This seems fine at first glance though isn't completely necessary. Should be careful, probably test it well if we are going to merge it at all, and definitely do not expose this as an option quite yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:XL This PR changes 500-999 lines, ignoring generated files.
Projects
Status: Todo
Development

Successfully merging this pull request may close these issues.

3 participants