Repository navigation
fix #5829 - Bug: schema cleanup removes fields named default, minItems, or min_items - #5830
Open
Lucky-Lodhi2004 wants to merge 1 commit into
Open
Lucky-Lodhi2004 wants to merge 1 commit into
Lucky-Lodhi2004 wants to merge 1 commit into
Conversation
|
|
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.
Description
When structured output compatibility flags remove JSON Schema metadata, the cleanup pass also removes user properties whose names match those metadata keys. The resulting schema still lists the removed names in required, while additionalProperties is false, so the schema cannot be satisfied (from original issue).
Fixes
applied the exact same
in_propertiesprotection logic to theremove_forbidden_fieldsfunction that is already being used in the initialoptimize_schemapass.Specifically, in
browser_use/llm/schema.pyTests
All tests were passed locally.
Summary by cubic
Fixes schema cleanup so user-defined properties named
default,minItems, ormin_itemsare no longer removed when stripping metadata.Bug Fixes
in_propertiesguard toremove_forbidden_fieldsinbrowser_use/llm/schema.py.Written for commit 9fb0a30. Summary will update on new commits.