Skip to content

Conversation

OmCheeLin
Copy link
Collaborator

Description

Support Multiple System Messages with Better API. #3141

Checklist

Go over all the following points, and put an x in all the boxes that apply.

  • I have read the CONTRIBUTION guide (required)
  • I have linked this PR to an issue using the Development section on the right sidebar or by adding Fixes #issue-number in the PR description (required)
  • I have checked if any dependencies need to be added or updated in pyproject.toml and uv lock
  • I have updated the tests accordingly (required for a bug fix or a new feature)
  • I have updated the documentation if needed:
  • I have added examples if this is a new feature

If you are unsure about any of these, don't hesitate to ask. We are here to help!

Copy link
Contributor

coderabbitai bot commented Sep 21, 2025

Important

Review skipped

Auto reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch better-api

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Please see the documentation for more information.

Example:

reviews:
  pre_merge_checks:
    custom_checks:
      - name: "Undocumented Breaking Changes"
        mode: "warning"
        instructions: |
          Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Member

@Wendong-Fan Wendong-Fan left a comment

Choose a reason for hiding this comment

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

thanks @OmCheeLin 's contribution! based on previous discussion: #3113 (comment) I think we also need to update ScoreBasedContextCreator to fully support multiple system message setting

Comment on lines 1113 to 1116
self._original_system_message = (
BaseMessage.make_assistant_message(
role_name="Assistant", content=system_message
)
Copy link
Member

Choose a reason for hiding this comment

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

seems here we are making assistant message using make_assistant_message instead of make_system_message

@Wendong-Fan Wendong-Fan added the Waiting for Update PR has been reviewed, need to be updated based on review comment label Sep 21, 2025
@Wendong-Fan Wendong-Fan added this to the Sprint 38 milestone Sep 21, 2025
@OmCheeLin OmCheeLin requested review from Wendong-Fan and removed request for Wendong-Fan September 22, 2025 07:17
@OmCheeLin OmCheeLin removed the Waiting for Update PR has been reviewed, need to be updated based on review comment label Sep 26, 2025
@OmCheeLin OmCheeLin requested review from Saedbhati and Wendong-Fan and removed request for Wendong-Fan September 26, 2025 10:12
@Wendong-Fan Wendong-Fan added the Review Required PR need to be reviewed label Sep 29, 2025
Copy link
Collaborator

@hesamsheikh hesamsheikh left a comment

Choose a reason for hiding this comment

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

Thanks for the PR @OmCheeLin
To make the PR comprehensive, these missing parts also need to be addressed:

  1. adding test cases
  2. the method add_or_update_system_messages doesn't seem to implement the multiple system messages we are looking for. It must be able to create more than one system message, even in the middle of the conversation.

@OmCheeLin OmCheeLin removed the Review Required PR need to be reviewed label Oct 4, 2025
@Wendong-Fan Wendong-Fan added the Waiting for Update PR has been reviewed, need to be updated based on review comment label Oct 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Waiting for Update PR has been reviewed, need to be updated based on review comment

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

[Feature Request] Support Multiple System Messages with Better API

3 participants