WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Conversation

@lgrammel
Copy link
Collaborator

@lgrammel lgrammel commented Dec 6, 2025

Background

For fine grained cache control (Anthropic), system prompts need to be split into multiple system messages (see #10914 ).

Summary

  • allow SystemModelMessage[] in system property on Prompt (breaking change on tool call repair functions)
  • allow SystemModelMessage[] in agent instructions

Manual Verification

  • run examples/ai-core/src/agent/anthropic-cache-instruction.ts twice and check request

Future Work

  • introduce type, e.g. Instruction, that is an alias for string | SystemModelMessage | SystemModelMessage[]

Related Issues

Resolves #10914
Builds on #10635
Relates to #10329

@lgrammel lgrammel changed the title Lg/il9 ty sf3 feat(ai): support SystemModelMessage[] in system and instructions properties Dec 6, 2025
@lgrammel lgrammel marked this pull request as ready for review December 6, 2025 13:11
@lgrammel lgrammel merged commit 9ba4324 into main Dec 6, 2025
18 checks passed
@lgrammel lgrammel deleted the lg/IL9TYSf3 branch December 6, 2025 13:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow passing messages array in ToolLoopAgent

3 participants