[agentserver] Fix review comments for azure-ai-agentserver invoke API#45490
Closed
[agentserver] Fix review comments for azure-ai-agentserver invoke API#45490
Conversation
Co-authored-by: zhiyong-gayang <15938424+zhiyong-gayang@users.noreply.github.com>
Co-authored-by: zhiyong-gayang <15938424+zhiyong-gayang@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Review comments and suggest fixes for PR 45481
[agentserver] Address PR #45481 review comments
Mar 3, 2026
Copilot stopped work on behalf of
zhiyong-gayang due to an error
March 3, 2026 17:17
Co-authored-by: zhiyong-gayang <15938424+zhiyong-gayang@users.noreply.github.com>
Copilot
AI
changed the title
[agentserver] Address PR #45481 review comments
[agentserver] Fix review comments for azure-ai-agentserver invoke API
Mar 3, 2026
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.
Addresses all automated review comments from PR #45481 introducing the
azure-ai-agentserverpackage. Fixes bugs that would cause silent failures, incorrect HTTP semantics, and resource leaks.Bug fixes (
server/_base.py,_logger.py)import logging.configmissing —configure_logging()silently failed withAttributeErrorcaught by broadexceptisinstance(result, AsyncGenerator)withtyping.AsyncGeneratorcan raiseTypeErrorat runtime; replaced withinspect.isasyncgen()/inspect.isawaitable()str(exc)gated behindAGENT_DEBUG_ERRORSenv var to prevent leaking internal detailsAcceptheader — now uses"application/json"(the actual response media type)media_type="application/json"toResponse()import json— removed (RuffF401)Test fixes
conftest.pyfixtures — converted allhttpx.AsyncClientfixtures to async generators usingasync with/yieldto ensure proper teardownclient = httpx.AsyncClient(...)withasync with httpx.AsyncClient(...) as client:intest_get_cancel.pyandtest_openapi_validation.pycaplogunused intest_response_validation_logs_warning— added assertion oncaplog.recordsso the warning is actually verifiedPackaging / CI
pyproject.toml:azure-identityandazure-monitor-opentelemetryare not imported anywhere in the packagerequirements.txt— removed>=1.0.0b1version pins from all 6 samplerequirements.txtfiles, consistent with other agentserver samplesci.yml— addedazure-ai-agentserverto the Artifacts list so it is built, tested, and linted by the pipelineWarning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
scanning-api.github.com/home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js(dns block)If you need me to access, download, or install something from one of these locations, you can either:
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.