-
Notifications
You must be signed in to change notification settings - Fork 58
fix(providers): align Copilot and Hermes prompt schemas on the shared recursive builder #317
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Jason Robert (jrob5756)
merged 6 commits into
microsoft:main
from
hertznsk:emit-output-pr2b
Jul 24, 2026
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
eb12511
fix(providers): align Copilot and Hermes prompt schemas on the shared…
hertznsk b9071a9
test(providers): update golden schema literals and legacy tests for p…
hertznsk 6bdf96d
style(providers): collapse wrapped call in Hermes prompt-schema wrapp…
hertznsk e865f2a
test(providers): restore Claude golden baseline tests and fix stale d…
hertznsk a5abac8
test(providers): rename Hermes missing-description test to avoid the …
hertznsk 6ef9b22
test(providers): fold duplicate Hermes prompt-schema suite and fix st…
hertznsk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now that
field_name/description_fallbackare gone,build_prompt_schema_field/build_prompt_schema_propertiesare identical tobuild_json_schema_field/build_json_schema_propertiesabove (lines 45-104) - same depth check, same shape, same recursion. Only two call sites are left (copilot.py:1658,hermes.py:652). Given the PR title is literally about aligning on one shared builder, it seems worth finishing the job: drop this pair and point both callers atbuild_json_schema_propertiesinstead. Not asking for it in this PR necessarily, just flagging since the diff makes the duplication obvious.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch - they're identical right now, but deliberately so, and I'd like to keep the pair. I'm planning a follow-up PR that adds
additionalProperties: falseto the json_schema flavor only (Claude'semit_outputtool schema and claude-agent-sdk'soutput_format), where the API actually enforces it. The prompt flavor is serialized as text into Copilot/Hermes prompts, where the extra key would just add noise with no enforcement value - so the two flavors will intentionally diverge, and collapsing them now would mean re-splitting them in that follow-up. Thebuild_prompt_schema_*names also document the intent at the two call sites. Happy to revisit the structure in that follow-up if you'd prefer something like one parameterized private builder with two thin public wrappers.