Repository navigation
Conversation
Twiink
temporarily deployed
to
github-app-auth
November 22, 2026 05:28 — with
GitHub Actions
Inactive
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues block the change preventing constructor overrides from mutating shared configuration data.
No open issues 🎉
What changed in this PR
This PR prevents constructor overrides in Python prompt execution settings from modifying shared extension_data, so reusing a configuration does not leak overrides into later instances.
Changes:
- Shallow-copy
extension_databefore merging keyword arguments, preserving per-instance override precedence. - Add a regression test verifying both instances’ provider settings and the unchanged caller dictionary.
| File | Description |
|---|---|
python/tests/unit/connectors/ai/test_prompt_execution_settings.py |
Tests shared dictionary preservation and independent temperature settings. |
python/semantic_kernel/connectors/ai/prompt_execution_settings.py |
Copies extension data before applying constructor overrides. |
Review effort: Balanced
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation and Context
Reusing a configuration dictionary across agents can silently change a later agent's generation parameters:
Description
Copy
extension_databefore merging keyword overrides. This preserves the caller's mapping and keeps the existing per-instance override precedence. The regression checks the public provider settings dictionaries for both instances.Related #14752 addresses a different mapping in
FunctionChoiceBehavior.from_dict; its diff does not coverPromptExecutionSettings.__init__merging extension data.Contribution Checklist
git diff --checkpassed on the changed files.Validation used Python 3.13.16 and the current source checkout. Provider calls in the existing unit suite use its transport fixtures; no paid model requests were made.
AI assistance: OpenAI Codex prepared, reviewed, and validated this change under the account owner's authorization.