Repository navigation
Python: dispatch the model kind by shape in the declarative schema - #9867
Closed
Manohar Paturi (ManoharPaturi) wants to merge 1 commit into
Closed
Manohar Paturi (ManoharPaturi) wants to merge 1 commit into
Manohar Paturi (ManoharPaturi) wants to merge 1 commit into
Conversation
Two case branches shared the model kind, leaving the Model branch unreachable dead code, so a model specification raised a TypeError instead of loading. The dispatch now sends provider carrying shapes to Model and keeps name carrying shapes on the model resource. Signed-off-by: Manohar Paturi <186662190+ManoharPaturi@users.noreply.github.com>
Manohar Paturi (ManoharPaturi)
temporarily deployed
to
github-app-auth
October 30, 2026 03:51 — with
GitHub Actions
Inactive
Manohar Paturi (ManoharPaturi)
requested review from
Darren Cohen (dargilco),
Jose Alvarez (jpalvarezl),
sophia-ramsey and
westey (westey-m)
as code owners
October 30, 2026 03:51
Manohar Paturi (ManoharPaturi)
temporarily deployed
to
github-app-auth
October 30, 2026 03:51 — with
GitHub Actions
Inactive
Contributor
Author
|
Understood, sorry for racing ahead of the review process. #9866 now uses the bug report template with the dispatch reproduction, and this stays closed until the team agrees. |
This branch was previously 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.
Motivation & Context
agent_schema_dispatchcontained twocase "model"branches. The first returned aModelResource, making the branch returning aModelunreachable dead code, so a model specification carrying its actual fields (provider,apiType,connection,options) raised aTypeErrorand no input shape could load aModelthrough the dispatch.Description & Review Guide
modelcase now dispatches by shape: a schema carrying any model specification field loads as aModel, with the kind tag dropped before construction, and everything else keeps loading as the model resource exactly as the existing dispatch tests pin.nameplusidform covered by the current tests.Related Issue
Fixes #9866
AI Assistance
Contribution Checklist
breaking changelabel (or add "[BREAKING]" to the title prefix, before or after any language prefix) — a workflow keeps the label and title prefix in sync automatically.