Repository navigation
Conversation
DeepEvalAgent.__post_init__ only called the runner patch, so the base agents.Agent normalization never ran. model_settings kept the dataclass default (reasoning effort 'none' for every model), a dict model_settings was never coerced by _coerce_model_settings, and the field validation that rejects e.g. a non-list `tools` was skipped.
|
@BlueX888 is attempting to deploy a commit to the Confident AI Team on Vercel. A member of the Team first needs to authorize it. |
This branch has not been 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.
Summary
DeepEvalAgentnow runs the baseagents.Agent.__post_init__normalization when constructed.Why
DeepEvalAgent.__post_init__(deepeval/openai_agents/agent.py:35) overrode the SDK'sAgent.__post_init__but only calledpatch_default_agent_runner_get_model(), neversuper().__post_init__(). SinceDeepEvalAgentis a dataclass, its__post_init__fully replaces the base one, so the base normalization never ran:model_settingskept the dataclass default. The SDK's default model is a GPT-5 model whose default settings carryreasoning=Reasoning(effort="none"), so everyDeepEvalAgentused GPT-5 reasoning/verbosity defaults even for non-GPT-5 models such asgpt-4o, for which the base class swaps in genericModelSettings().model_settingswas never coerced by the SDK's_coerce_model_settings, leaving a raw dict on the field.toolswas silently accepted instead of raisingTypeError.Changes
deepeval/openai_agents/agent.py: callsuper().__post_init__()before the runner patch.tests/test_integrations/test_openai_agents/test_deepeval_agent.py: deterministic regression tests (no API key, no network):model_settingsparity with a baseAgentforgpt-5andgpt-4o, dictmodel_settingscoercion, andTypeErroron a non-listtools.Testing
Verified with openai-agents 0.22.3 (the openai-agents CI job installs the latest SDK via
pip install -U openai-agents, .github/workflows/test_integrations.yml:219).With the fix:
Without the one-line fix, the same file fails:
Full module suite (
pytest tests/test_integrations/test_openai_agents/ -q): 15 failed, 4 passed, 1 skipped; the 15 failures are pre-existing missing-credential failures (identical 15 failed, 1 skipped on the unpatched tree) and CI runs this job only whenOPENAI_API_KEYis set.