Repository navigation
Python: Respect FOUNDRY_MODEL in FoundryEvals - #9981
Merged
Eduard van Valkenburg (eavanvalkenburg) merged 1 commit intoNov 4, 2026
Conversation
ZedingZhang (ZedingZhang)
temporarily deployed
to
github-app-auth
November 2, 2026 17:27 — with
GitHub Actions
Inactive
ZedingZhang (ZedingZhang)
had a problem deploying
to
github-app-auth
November 2, 2026 17:27 — with
GitHub Actions
Error
ZedingZhang (ZedingZhang)
marked this pull request as ready for review
November 2, 2026 17:27
ZedingZhang (ZedingZhang)
requested review from
Darren Cohen (dargilco),
Jose Alvarez (jpalvarezl) and
sophia-ramsey
as code owners
November 2, 2026 17:27
ZedingZhang (ZedingZhang)
temporarily deployed
to
github-app-auth
November 2, 2026 17:28 — with
GitHub Actions
Inactive
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are recorded for the change that makes auto-created FoundryEvals clients honor FOUNDRY_MODEL.
No open issues 🎉
What changed in this PR
Fixes #9951 by making auto-created FoundryEvals clients respect FOUNDRY_MODEL instead of overriding it with the default deployment.
Changes:
- Resolves the model in order: explicit argument,
FOUNDRY_MODEL, then"gpt-4o". - Documents the fallback behavior while preserving injected-client behavior.
- Adds seven regression cases covering model precedence, unset/empty environment values, and injected clients.
| File | Description |
|---|---|
python/packages/foundry/tests/test_foundry_evals.py |
Adds model-precedence and injected-client regression tests. |
python/packages/foundry/agent_framework_foundry/_foundry_evals.py |
Resolves settings before applying the default model and documents the behavior. |
Review effort: Balanced
ZedingZhang (ZedingZhang)
temporarily deployed
to
github-app-auth
November 2, 2026 17:30 — with
GitHub Actions
Inactive
Eduard van Valkenburg (eavanvalkenburg)
approved these changes
Nov 4, 2026
ZedingZhang (ZedingZhang)
deleted the
fix/foundry-evals-model-precedence-9951
branch
November 4, 2026 09:29
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 & Context
FoundryEvals()passes"gpt-4o"as an explicit model when creating its ownFoundryChatClient. This silently overridesFOUNDRY_MODEL, so evaluations use the default deployment even when another deployment is configured.Description & Review Guide
load_settingsandFoundrySettingsbefore applying the"gpt-4o"fallback. Document the precedence and add seven regression cases covering explicit values, environment values, unset/empty environment values, and both injected-client paths.model, thenFOUNDRY_MODEL, then"gpt-4o". Model resolution for injected clients keeps its existing behavior.Related Issue
Fixes #9951. The issue has the
ready-for-implementationlabel; no competing open PR was found before submission.AI Assistance
AI assistance details: Codex assisted with issue investigation, implementation, regression tests, the docstring update, and this PR description. Codex executed the reported checks; I reviewed all submitted content and take responsibility for it.
Contribution Checklist
breaking changelabel (or add "[BREAKING]" to the title prefix, before or after any language prefix) — a workflow keeps the label and title prefix in sync automatically.