-
Notifications
You must be signed in to change notification settings - Fork 380
[python] Add DPG TypedDict generation opt-out #11372
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
Open
Copilot
wants to merge
15
commits into
main
Choose a base branch
from
copilot/python-disable-typeddict-generation
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
b9e1f80
Initial plan
Copilot fb6b9cb
feat(http-client-python): add dpg typeddict opt-out
Copilot 3f8f519
test(http-client-python): cover json overload when typeddict is disabled
Copilot 5014b3e
Merge branch 'main' into copilot/python-disable-typeddict-generation
l0lawrence c7a11a1
Merge branch 'main' into copilot/python-disable-typeddict-generation
l0lawrence be122e6
Add changeset for http-client-python TypedDict opt-out
l0lawrence 025eceb
Restore pre-TypedDict JSON dict overload when generate-typeddict is f…
l0lawrence e957fc5
Fix single-body JSON overload skip for models-mode: typeddict spread …
l0lawrence 210c4d2
Replace jsonOverloadReplacedByTypeddict flag with explicit skip_singl…
l0lawrence 588c7f9
Merge branch 'main' into copilot/python-disable-typeddict-generation
l0lawrence a979f7c
Merge branch 'main' into copilot/python-disable-typeddict-generation
l0lawrence 88a5b58
Apply remaining changes
Copilot a5402a2
feat(http-client-python): deprecate models-mode typeddict in favor of…
l0lawrence 6eca06e
style(http-client-python): fix SKILL.md markdown table alignment
l0lawrence b6bb261
Merge branch 'main' into copilot/python-disable-typeddict-generation
l0lawrence 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
7 changes: 7 additions & 0 deletions
7
.chronus/changes/python-disable-typeddict-generation-2026-7-24-12-59-0.md
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| --- | ||
| changeKind: feature | ||
| packages: | ||
| - "@typespec/http-client-python" | ||
| --- | ||
|
|
||
| Add a `generate-typeddict` emitter option (default `true`) that controls `TypedDict` generation independently of `models-mode`. `models-mode` now toggles just `dpg` and `none`; the `typeddict` value is deprecated. |
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
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.
won't this emitter option get confusing with the existing
models-mode: typeddict? is there a way to combine the two?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.
I looked it doesnt looke like models-mode is checked in anywhere to azure-rest-api-specs main, but what is the flow here for causing a big behavioral change like this?
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.
i believe @dargilco is the only person potentially using
--models-mode=typespec. I would do one release with it removed from documentation (behind the scenes, if we see models-mode=typespec, just set models-mode = none), then we can remove it completely.cc @kashifkhan and @msyyc for this design suggestion on how we can handle typespec dictionary generation
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.
@iscai-msft
agentserver-responsesis one more that is going with typespec mode only, they are not using any of the dpg models. I think the approach is fine, having types there as an overload is an addition and not breaking for the SDKs.I was initially thinking default mode being what we have today with dpg mode only, but given we want to move towards more typeddicts, its fine to have the new default.