Skip to content

fix(orchestrator): pass MAX_MESSAGE_PAIRS_PER_AGENT in streaming path#443

Open
guoyangzhen wants to merge 1 commit into2FastLabs:mainfrom
guoyangzhen:fix/streaming-max-message-pairs
Open

fix(orchestrator): pass MAX_MESSAGE_PAIRS_PER_AGENT in streaming path#443
guoyangzhen wants to merge 1 commit into2FastLabs:mainfrom
guoyangzhen:fix/streaming-max-message-pairs

Conversation

@guoyangzhen
Copy link
Copy Markdown

Problem

Streaming responses do not respect MAX_MESSAGE_PAIRS_PER_AGENT configuration (#365). The processStreamInBackground method calls saveConversationExchange without the maxHistorySize parameter, causing unbounded conversation history growth.

Fix

Added the missing this.config.MAX_MESSAGE_PAIRS_PER_AGENT parameter to the saveConversationExchange call in the streaming code path.

Non-streaming path already passed this parameter correctly.

Changes

  • typescript/src/orchestrator.ts: 1-line addition

Closes #365

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Streaming responses don't respect MAX_MESSAGE_PAIRS_PER_AGENT configuration

1 participant