Skip to content

Add files via upload - #2

Open
CEXU FU (cexufu) wants to merge 1 commit into
microsoft:mainfrom
cexufu:fix/tutorial-variable-reference-format
Open

CEXU FU (cexufu) wants to merge 1 commit into
microsoft:mainfrom
cexufu:fix/tutorial-variable-reference-format

Conversation

@cexufu

@cexufu CEXU FU (cexufu) commented Oct 25, 2026 •

Copy link
Copy Markdown

Variable-reference arguments produced by make_custom_generator() use {"kind": "variable_name", "value": "ref1"}, but VariablePassingPlanner._expand_args() only accepts {"kind": "variable", "variable": "ref1"}. Passing a schema-compatible reference therefore raises AssertionError: Invalid kind for argument message: variable_name before the referenced value can reach the tool.

This change adds the missing variable_name branch and resolves its reference through the value field, while preserving the existing literal and legacy-reference branches.

A model-free check cell covers literal arguments, schema-compatible references, legacy references, and mixed arguments. Additional local checks confirmed that unknown references and unsupported kinds still raise errors, and that the regression input matches the actual schema generator.

Validation: the check cell reproduces the assertion on the original implementation and passes after the fix. All notebook code cells compile; existing outputs and metadata are preserved. Validation was performed by executing the relevant notebook class and check cell in isolation, without Azure/OpenAI calls. The complete notebook was not rerun against a live model.

Fix schema-compatible variable references in tutorial planner
@cexufu

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant