Repository navigation
Python: validate non-optional union settings - #8926
Merged
Eduard van Valkenburg (eavanvalkenburg) merged 1 commit intoOct 1, 2026
Merged
Eduard van Valkenburg (eavanvalkenburg) merged 1 commit into
Eduard van Valkenburg (eavanvalkenburg) merged 1 commit into
Conversation
Naveen Chatlapalli (1aifanatic)
deployed
to
github-app-auth
October 1, 2026 03:33 — with
GitHub Actions
Active
Naveen Chatlapalli (1aifanatic)
deployed
to
github-app-auth
October 1, 2026 03:33 — with
GitHub Actions
Active
Copilot started reviewing on behalf of
Naveen Chatlapalli (1aifanatic)
October 1, 2026 03:33
View session
Naveen Chatlapalli (1aifanatic)
marked this pull request as ready for review
October 1, 2026 03:33
Naveen Chatlapalli (1aifanatic)
requested review from
SergeyMenshykh,
Tao Chen (TaoChenOSU),
Eduard van Valkenburg (eavanvalkenburg),
Giles Odigwe (giles17),
Jose Alvarez (jpalvarezl),
Evan Mattson (moonbox3),
Roger Barreto (rogerbarreto),
sophia-ramsey and
westey (westey-m)
as code owners
October 1, 2026 03:33
Naveen Chatlapalli (1aifanatic)
deployed
to
github-app-auth
October 1, 2026 03:33 — with
GitHub Actions
Active
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The implementation correctly reuses existing union coercion behavior and includes focused regression coverage.
Review effort: Balanced
Findings: None
What changed in this PR
Fixes settings coercion for non-optional unions so invalid values fail during startup.
Changes:
- Applies per-arm coercion to all union types.
- Adds environment and dotenv regression coverage.
| File | Description |
|---|---|
python/packages/core/agent_framework/_settings.py |
Extends union coercion beyond optional unions. |
python/packages/core/tests/core/test_settings.py |
Tests numeric coercion, errors, source reporting, and value masking. |
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
Evan Mattson (moonbox3)
approved these changes
Oct 1, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Oct 1, 2026
Eduard van Valkenburg (eavanvalkenburg)
approved these changes
Oct 1, 2026
This branch was successfully 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 & Context
Settings declared as int | float currently retain raw environment or dotenv strings, including invalid values. This can defer configuration failures until agent execution instead of reporting the invalid setting at startup.
Description & Review Guide
Related Issue
Fixes #8907. No competing open PR was found.
Contribution Checklist