Skip to content

Conversation

@sydney-runkle
Copy link
Collaborator

@sydney-runkle sydney-runkle commented Nov 20, 2025

  • create_agent's system_prompt allows str | SystemMessage
  • added system_message: SystemMessage on ModelRequest
  • ModelRequest.system_prompt is a function of system_message.text
  • disallow setting system_prompt and system_message

@github-actions github-actions bot added langchain Related to the package `langchain` feature and removed feature labels Nov 20, 2025
@ccurme ccurme requested review from ccurme and mdrxy as code owners November 21, 2025 22:55
@github-actions github-actions bot added integration Related to a provider partner package integration anthropic labels Nov 21, 2025
@codspeed-hq
Copy link

codspeed-hq bot commented Nov 21, 2025

CodSpeed Performance Report

Merging #34055 will not alter performance

Comparing sr/system-prompt-again (c199f15) with master (b0bf4af)1

Summary

✅ 3 untouched
⏩ 31 skipped2

Footnotes

  1. No successful run was found on master (5899f98) during the generation of this report, so b0bf4af was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

  2. 31 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

if request.system_prompt
"""Update the system message to include the todo system prompt."""
new_system_content = (
request.system_message.content + "\n\n" + self.system_prompt
Copy link
Collaborator

Choose a reason for hiding this comment

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

Does this code break potentially?

    content: str | list[str | dict]
    """The contents of the message."""

What happens when content is a list of content blocks with cache control set?

Given that that's the use case we are trying to support, do we have a an "end to end" unit test for that use case (e.g., user starts with a system message that has content blocks with cache control and then they apply prebuilt middleware)

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

Labels

anthropic feature integration Related to a provider partner package integration langchain Related to the package `langchain`

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants