You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Python: Bug: Python 1.34.0 ChatHistoryTruncationReducer deletes the System Prompt #12612
Describe the bug
When using the ChatHistoryTruncationReducer the reducer reduces the system prompt (both if added to the constructor via system_message or when manually added as first message to the history )
To Reproduce
Steps to reproduce the behavior:
Create a History using the ChatHistoryTruncationReducer, and add a target_count
populate the ChatHistory with more elements than the target_count
call the reduce function
Expected behavior
I expect the System Prompt to be kept, as it is an integral part of the conversation
Screenshots
see first comment.
Platform
Language: Python
Source: pip semantic-kernel 1.34.0
AI model: OpenAI:GPT-4o-mini(2024-12-01-preview)
IDE: VS Code
OS: Windows
Additional context
Nothing, but additional context can be provided if needed.
changed the title [-]Bug: Python 1.34.0 ChatHistoryTruncationReducer deletes the System Prompt[/-][+]Python: Bug: Python 1.34.0 ChatHistoryTruncationReducer deletes the System Prompt[/+]on Jun 27, 2025
Activity
[-]Bug: Python 1.34.0 ChatHistoryTruncationReducer deletes the System Prompt[/-][+]Python: Bug: Python 1.34.0 ChatHistoryTruncationReducer deletes the System Prompt[/+]imperonas commentedon Jun 27, 2025
here is an example
and the output:
github-actions commentedon Sep 29, 2025
This issue is stale because it has been open for 90 days with no activity.
Python: Fix ChatHistoryTruncationReducer deleting system prompt (micr…
Python: Fix ChatHistoryTruncationReducer deleting system prompt (micr…
Python: Fix ChatHistoryTruncationReducer deleting system prompt (#13610)