Decouple AgentServer responses from generated model internals#47995
Draft
Shivakishore14 wants to merge 3 commits into
Draft
Decouple AgentServer responses from generated model internals#47995Shivakishore14 wants to merge 3 commits into
Shivakishore14 wants to merge 3 commits into
Conversation
Move response contracts to local TypedDict wire payloads and remove runtime reliance on generated model constructors, serialization helpers, and nested generated SDK model paths. Keep validation behind a stable local wrapper and update tests to exercise dict-native payloads instead of generated model runtime callability. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Use the source-built TypeSpec Python emitter TypedDict output as the model source instead of the localized bridge artifact. Normalize the emitted package into the local AgentServer generated boundary and remove fake model_base/_models compatibility shims. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
Summary
Azure/typespec-azurePython emitter that supportsmodels-mode=typeddictValidation
make generate-models TYPESPEC_PYTHON_EMITTER_PATH=/tmp/typespec-azure-agentserver/packages/typespec-pythonmake generate-openapi && make generate-validatorsPYTHONPATH=. /tmp/azsdk-agentserver-cleanup-venv/bin/python -m pytest tests/unit tests/contract tests/interop -qCurrent source-emitter gaps
Literal[...]aliases, but generated annotations still referenceEnumName.MEMBER, and the expected_enums.pymodule is not emitted. The finalizer currently adds enum-like fallback exports and rewrites generated enum-member references to literal strings._generated/agentserver/responses/models/; the finalizer extracts the emitted TypedDict files into the local_generated/package boundary._client.py,_configuration.py,operations/, andaio/; the finalizer copies only the model contract files needed by AgentServer.client.tspstill references removed OpenAI symbols (OutputItemComputerToolCallOutputResource,OutputItemCustomToolCall,OutputItemCustomToolCallOutput,FunctionToolCallOutputResource), so the finalizer removes those stale@@usagelines before compilation.latestandnextstill rejectmodels-mode=typeddict; generation currently requires a source-built emitter fromAzure/typespec-azure/mainviaTYPESPEC_PYTHON_EMITTER_PATH.Upstream asks
models-mode=typeddictsupport.Notes
sdk/agentserver/azure-ai-agentserver-responses.