Skip to content

Dynamic System prompts not being included on fresh runs with message_history #1646

Open
@strunov

Description

@strunov

Initial Checks

Description

As mentioned in the title, the documentation implies that dynamic prompts are always evaluated even if message_history is present. So far, logging all_messages() and putting a bunch of print statemetns all over the place seems to imply that they don't get included

The LLM model responses also suggest that the content from dynamic system prompts is not being included
(I use Gemini models)

Example Code

Python, Pydantic AI & LLM client version

pydantic-ai 0.1.9
Gemini 2.0

Metadata

Metadata

Assignees

Labels

questionFurther information is requested

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions