fix: remove namespace filtering from create_model#662
Merged
andreitava-uip merged 1 commit intomainfrom Mar 4, 2026
Merged
Conversation
cristian-groza
approved these changes
Mar 4, 2026
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.
Context
Previously we were filtering the returned namespace and renaming the types. This was redundant, and if anything, the filtering and renaming actively hurt it and caused bugs in forward ref resolution when defs only referenced by other defs were involved.
Easiest way to reproduce problems is to set static args for nested fields. Because the static args flow converts the pydantic model back to json schema for parsing. This roundtrip converts previous inline objects to refs, with some refs not referenced by root.
{"Code":"AGENT_RUNTIME.UNEXPECTED_ERROR","Title":"Unexpected error: PydanticUserError","Detail":"An unexpected error occurred during agent execution, please try again later or contact your Administrator.\nError Details:\nSend_Message_to_Useris not fully defined; you should define__Dynamictype_3, then callSend_Message_to_User.model_rebuild().\n\nFor further information visit <https://errors.pydantic.dev/2.12/u/class-not-fully-defined>","Category":"Unknown","Status":null}Fix
Simply remove the filtering logic and use the returned namespace as is.
Validation and testing
After the fix, the
is not fully definederror disappears and tool static args works as intended.Job attachment extraction logic has been validated and still works as expected (the job attachment type is correctly identified and resolved)