Skip to content

fix: replace removed DEFAULT_SOURCE_ID with correct 'memory' source_id#11

Merged
pamelafox merged 1 commit intoAzure-Samples:mainfrom
madebygps:fix/agent-summarization-source-id
Feb 24, 2026
Merged

fix: replace removed DEFAULT_SOURCE_ID with correct 'memory' source_id#11
pamelafox merged 1 commit intoAzure-Samples:mainfrom
madebygps:fix/agent-summarization-source-id

Conversation

@madebygps
Copy link
Copy Markdown
Collaborator

fix: replace removed DEFAULT_SOURCE_ID with correct 'memory' source_id

InMemoryHistoryProvider.DEFAULT_SOURCE_ID was removed in the version of MAF pinned in pyproject.toml (fc9c81b). The auto-injected provider uses source_id='memory', so replace the class attribute references with that string directly.

Affects both the English and Spanish versions of agent_summarization.py.

Purpose

  • Fix a runtime AttributeError crash in agent_summarization.py that occurs on the second user message. The SummarizationMiddleware was reading history from session state using InMemoryHistoryProvider.DEFAULT_SOURCE_ID, which no longer exists in the pinned MAF commit (fc9c81b). At that commit, the auto-injected InMemoryHistoryProvider uses source_id="memory", so the state key is "memory".

Does this introduce a breaking change?

[ ] Yes
[ x] No

Pull Request Type

What kind of change does this Pull Request introduce?

[ x] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Documentation content changes
[ ] Other... Please describe:

InMemoryHistoryProvider.DEFAULT_SOURCE_ID was removed in the version of
MAF pinned in pyproject.toml (fc9c81b). The auto-injected provider uses
source_id='memory', so replace the class attribute references with that
string directly.

Affects both the English and Spanish versions of agent_summarization.py.
@pamelafox pamelafox merged commit dc92a9e into Azure-Samples:main Feb 24, 2026
1 check passed
pamelafox added a commit to pamelafox/python-agentframework-demos that referenced this pull request Feb 24, 2026
…summarization-source-id"

This reverts commit dc92a9e, reversing
changes made to 51bde7b.
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.

2 participants