Skip to content

Conversation

@JC-386
Copy link
Member

@JC-386 JC-386 commented Jan 23, 2026

Description

Please add an informative description that covers that changes made by the pull request and link all relevant issues.

If an SDK is being regenerated based on a new API spec, a link to the pull request containing these API spec changes should be included above.

All SDK Contribution checklist:

  • The pull request does not introduce [breaking changes]
  • CHANGELOG is updated for new features, bug fixes or other significant changes.
  • I have read the contribution guidelines.

General Guidelines and Best Practices

  • Title of the pull request is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

  • Pull request includes test coverage for the included changes.

Copilot AI review requested due to automatic review settings January 23, 2026 05:56
@JC-386 JC-386 changed the base branch from main to lusu/agentserver-1110 January 23, 2026 05:56
# Conflicts:
#	sdk/agentserver/azure-ai-agentserver-langgraph/azure/ai/agentserver/langgraph/langgraph.py
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR expands test coverage across the agentserver packages (langgraph, core, agentframework) while also including several functional updates (tool binding/context resolution, tool facade normalization, docs/samples, and version/dependency bumps).

Changes:

  • Added extensive unit tests for Foundry tool binding/resolution/runtime behavior across core, langgraph, and agentframework.
  • Updated langgraph tool/context plumbing (registry usage, context resolution, request conversion usage) and adjusted converter/type signatures.
  • Added/updated docs + samples and bumped package versions/dependencies to 1.0.0b9.

Reviewed changes

Copilot reviewed 43 out of 47 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
sdk/agentserver/azure-ai-agentserver-langgraph/tests/unit_tests/langgraph/tools/test_tool_node.py New unit tests for tool node wrapper behavior
sdk/agentserver/azure-ai-agentserver-langgraph/tests/unit_tests/langgraph/tools/test_resolver.py New unit tests for tool resolver/registry
sdk/agentserver/azure-ai-agentserver-langgraph/tests/unit_tests/langgraph/tools/test_middleware.py New unit tests for tool binding middleware
sdk/agentserver/azure-ai-agentserver-langgraph/tests/unit_tests/langgraph/tools/test_context.py New unit tests for tool context container
sdk/agentserver/azure-ai-agentserver-langgraph/tests/unit_tests/langgraph/tools/test_chat_model.py New unit tests for late-binding chat model
sdk/agentserver/azure-ai-agentserver-langgraph/tests/unit_tests/langgraph/tools/test_builder.py New unit tests for use_foundry_tools builder
sdk/agentserver/azure-ai-agentserver-langgraph/tests/unit_tests/langgraph/tools/test_agent_integration.py Integration-style unit tests for graph usage patterns
sdk/agentserver/azure-ai-agentserver-langgraph/tests/unit_tests/langgraph/tools/conftest.py Shared fixtures for langgraph tools tests
sdk/agentserver/azure-ai-agentserver-langgraph/tests/unit_tests/langgraph/tools/init.py Test package namespace setup
sdk/agentserver/azure-ai-agentserver-langgraph/tests/unit_tests/langgraph/test_langgraph_request_converter.py Update tests to use ResponseAPIMessageRequestConverter
sdk/agentserver/azure-ai-agentserver-langgraph/tests/unit_tests/langgraph/conftest.py Test import path configuration
sdk/agentserver/azure-ai-agentserver-langgraph/tests/unit_tests/langgraph/init.py Test package namespace setup
sdk/agentserver/azure-ai-agentserver-langgraph/tests/init.py Removed placeholder tests package file
sdk/agentserver/azure-ai-agentserver-langgraph/samples/tool_client_example/graph_agent_tool.py New langgraph sample using Foundry tools
sdk/agentserver/azure-ai-agentserver-langgraph/pyproject.toml Pin langgraph dependency on core 1.0.0b9
sdk/agentserver/azure-ai-agentserver-langgraph/doc/azure.ai.agentserver.langgraph.tools.rst Sphinx docs stub for tools package
sdk/agentserver/azure-ai-agentserver-langgraph/doc/azure.ai.agentserver.langgraph.rst Sphinx docs stub for langgraph package
sdk/agentserver/azure-ai-agentserver-langgraph/doc/azure.ai.agentserver.langgraph.models.rst Sphinx docs stub for models package
sdk/agentserver/azure-ai-agentserver-langgraph/doc/azure.ai.agentserver.langgraph.models.response_event_generators.rst Sphinx docs stub for response generators
sdk/agentserver/azure-ai-agentserver-langgraph/azure/ai/agentserver/langgraph/tools/_tool_node.py Update runtime/context resolution usage
sdk/agentserver/azure-ai-agentserver-langgraph/azure/ai/agentserver/langgraph/tools/_chat_model.py Update context resolution + bound delegate handling
sdk/agentserver/azure-ai-agentserver-langgraph/azure/ai/agentserver/langgraph/tools/_builder.py Normalize tools via ensure_foundry_tool
sdk/agentserver/azure-ai-agentserver-langgraph/azure/ai/agentserver/langgraph/models/response_api_non_stream_response_converter.py Adjust non-stream converter input handling
sdk/agentserver/azure-ai-agentserver-langgraph/azure/ai/agentserver/langgraph/models/response_api_default_converter.py Update non-stream conversion signature/usage
sdk/agentserver/azure-ai-agentserver-langgraph/azure/ai/agentserver/langgraph/models/response_api_converter.py Update converter interface typing/signature
sdk/agentserver/azure-ai-agentserver-langgraph/azure/ai/agentserver/langgraph/langgraph.py Attach context into config + import adjustments
sdk/agentserver/azure-ai-agentserver-langgraph/azure/ai/agentserver/langgraph/_version.py Version bump to 1.0.0b9
sdk/agentserver/azure-ai-agentserver-langgraph/azure/ai/agentserver/langgraph/_context.py Add config attachment + context resolution helper
sdk/agentserver/azure-ai-agentserver-langgraph/azure/ai/agentserver/langgraph/init.py Minor formatting/import cleanup
sdk/agentserver/azure-ai-agentserver-langgraph/CHANGELOG.md Add changelog entries for 1.0.0b8/b9
sdk/agentserver/azure-ai-agentserver-core/tests/unit_tests/core/tools/utils/test_name_resolver.py New unit tests for tool name resolver
sdk/agentserver/azure-ai-agentserver-core/tests/unit_tests/core/tools/utils/conftest.py Fixtures/helpers for utils tests
sdk/agentserver/azure-ai-agentserver-core/tests/unit_tests/core/tools/utils/init.py Utils tests package marker
sdk/agentserver/azure-ai-agentserver-core/tests/unit_tests/core/tools/runtime/test_user.py New unit tests for user resolution/context vars
sdk/agentserver/azure-ai-agentserver-core/tests/unit_tests/core/tools/runtime/test_starlette.py New unit tests for Starlette middleware
sdk/agentserver/azure-ai-agentserver-core/tests/unit_tests/core/tools/runtime/test_runtime.py New unit tests for default runtime behavior
sdk/agentserver/azure-ai-agentserver-core/tests/unit_tests/core/tools/runtime/test_resolver.py New unit tests for invocation resolver
sdk/agentserver/azure-ai-agentserver-core/tests/unit_tests/core/tools/runtime/test_invoker.py New unit tests for tool invoker
sdk/agentserver/azure-ai-agentserver-core/tests/unit_tests/core/tools/runtime/test_facade.py New unit tests for ensure_foundry_tool
sdk/agentserver/azure-ai-agentserver-core/tests/unit_tests/core/tools/runtime/test_catalog.py New unit tests for tool catalog + concurrency
sdk/agentserver/azure-ai-agentserver-core/tests/unit_tests/core/tools/runtime/conftest.py Fixtures for runtime tests
sdk/agentserver/azure-ai-agentserver-core/tests/unit_tests/core/tools/runtime/init.py Runtime tests package marker
sdk/agentserver/azure-ai-agentserver-core/tests/unit_tests/core/tools/conftest.py Shared tools test fixtures + HTTP response helper
sdk/agentserver/azure-ai-agentserver-core/tests/unit_tests/core/tools/client/test_configuration.py New unit tests for client configuration
sdk/agentserver/azure-ai-agentserver-core/tests/unit_tests/core/tools/client/operations/test_foundry_hosted_mcp_tools.py New unit tests for hosted MCP ops
sdk/agentserver/azure-ai-agentserver-core/tests/unit_tests/core/tools/client/operations/test_foundry_connected_tools.py New unit tests for connected tools ops
sdk/agentserver/azure-ai-agentserver-core/tests/unit_tests/core/tools/client/operations/init.py Ops tests package marker
sdk/agentserver/azure-ai-agentserver-core/tests/unit_tests/core/tools/client/init.py Client tests namespace setup
sdk/agentserver/azure-ai-agentserver-core/tests/unit_tests/core/tools/init.py Tools tests namespace setup
sdk/agentserver/azure-ai-agentserver-core/tests/unit_tests/core/init.py Core tests namespace setup
sdk/agentserver/azure-ai-agentserver-core/samples/simple_mock_agent/custom_mock_agent_test.py Sample update for agent construction
sdk/agentserver/azure-ai-agentserver-core/pyproject.toml Dependency constraint update (cachetools>=6.0.0)
sdk/agentserver/azure-ai-agentserver-core/doc/azure.ai.agentserver.core.utils.rst Sphinx docs stub for utils
sdk/agentserver/azure-ai-agentserver-core/doc/azure.ai.agentserver.core.tools.utils.rst Sphinx docs stub for tools utils
sdk/agentserver/azure-ai-agentserver-core/doc/azure.ai.agentserver.core.tools.runtime.rst Sphinx docs stub for tools runtime
sdk/agentserver/azure-ai-agentserver-core/doc/azure.ai.agentserver.core.tools.rst Sphinx docs stub for tools package
sdk/agentserver/azure-ai-agentserver-core/doc/azure.ai.agentserver.core.tools.client.rst Sphinx docs stub for tools client
sdk/agentserver/azure-ai-agentserver-core/doc/azure.ai.agentserver.core.server.common.rst Sphinx docs: add constants module
sdk/agentserver/azure-ai-agentserver-core/doc/azure.ai.agentserver.core.rst Sphinx docs: expand toctree
sdk/agentserver/azure-ai-agentserver-core/doc/azure.ai.agentserver.core.models.rst Sphinx docs stub for models
sdk/agentserver/azure-ai-agentserver-core/doc/azure.ai.agentserver.core.models.projects.rst Sphinx docs stub for models.projects
sdk/agentserver/azure-ai-agentserver-core/doc/azure.ai.agentserver.core.models.openai.rst Sphinx docs stub for models.openai
sdk/agentserver/azure-ai-agentserver-core/doc/azure.ai.agentserver.core.application.rst Sphinx docs stub for application
sdk/agentserver/azure-ai-agentserver-core/azure/ai/agentserver/core/tools/runtime/_starlette.py Docstring formatting tweaks
sdk/agentserver/azure-ai-agentserver-core/azure/ai/agentserver/core/tools/runtime/_facade.py Add resource-ID parsing for connection IDs
sdk/agentserver/azure-ai-agentserver-core/azure/ai/agentserver/core/tools/client/_client.py Docstring formatting improvements
sdk/agentserver/azure-ai-agentserver-core/azure/ai/agentserver/core/tools/init.py Export FoundryToolDetails
sdk/agentserver/azure-ai-agentserver-core/azure/ai/agentserver/core/server/common/agent_run_context.py Mark as :meta private: for docs
sdk/agentserver/azure-ai-agentserver-core/azure/ai/agentserver/core/_version.py Version bump to 1.0.0b9
sdk/agentserver/azure-ai-agentserver-core/CHANGELOG.md Add changelog entry for 1.0.0b9
sdk/agentserver/azure-ai-agentserver-agentframework/tests/unit_tests/agent_framework/test_agent_framework_input_converter.py New unit tests for input converter
sdk/agentserver/azure-ai-agentserver-agentframework/tests/unit_tests/agent_framework/conftest.py Test import path configuration
sdk/agentserver/azure-ai-agentserver-agentframework/tests/unit_tests/agent_framework/init.py Tests namespace setup
sdk/agentserver/azure-ai-agentserver-agentframework/tests/init.py Removed placeholder tests package file
sdk/agentserver/azure-ai-agentserver-agentframework/pyproject.toml Pin dependency on core 1.0.0b9
sdk/agentserver/azure-ai-agentserver-agentframework/azure/ai/agentserver/agentframework/persistence/checkpoint_repository.py Add headers + formatting fixes
sdk/agentserver/azure-ai-agentserver-agentframework/azure/ai/agentserver/agentframework/persistence/agent_thread_repository.py Add headers + signature formatting fixes
sdk/agentserver/azure-ai-agentserver-agentframework/azure/ai/agentserver/agentframework/persistence/init.py Minor formatting fix
sdk/agentserver/azure-ai-agentserver-agentframework/azure/ai/agentserver/agentframework/models/human_in_the_loop_helper.py Add headers + typing/logging cleanup
sdk/agentserver/azure-ai-agentserver-agentframework/azure/ai/agentserver/agentframework/models/agent_framework_output_streaming_converter.py Import/logging cleanup + error formatting
sdk/agentserver/azure-ai-agentserver-agentframework/azure/ai/agentserver/agentframework/models/agent_framework_output_non_streaming_converter.py Refactor imports + helper method formatting
sdk/agentserver/azure-ai-agentserver-agentframework/azure/ai/agentserver/agentframework/models/agent_framework_input_converters.py HITL logging/validation refinements
sdk/agentserver/azure-ai-agentserver-agentframework/azure/ai/agentserver/agentframework/_workflow_agent_adapter.py Logging cleanup + typing/doc improvements
sdk/agentserver/azure-ai-agentserver-agentframework/azure/ai/agentserver/agentframework/_version.py Version bump to 1.0.0b9
sdk/agentserver/azure-ai-agentserver-agentframework/azure/ai/agentserver/agentframework/_foundry_tools.py Normalize tools via ensure_foundry_tool
sdk/agentserver/azure-ai-agentserver-agentframework/azure/ai/agentserver/agentframework/_ai_agent_adapter.py Logging cleanup
sdk/agentserver/azure-ai-agentserver-agentframework/azure/ai/agentserver/agentframework/_agent_framework.py Streaming helper/doc/logging cleanup
sdk/agentserver/azure-ai-agentserver-agentframework/azure/ai/agentserver/agentframework/init.py Import cleanup + minor API polish
sdk/agentserver/azure-ai-agentserver-agentframework/CHANGELOG.md Add changelog entry for 1.0.0b9

Comment on lines +68 to +77
def should_continue(state: MessagesState) -> Literal["environment", END]:
"""Decide if we should continue the loop or stop based upon whether the LLM made a tool call"""

messages = state["messages"]
last_message = messages[-1]
# If the LLM makes a tool call, then perform an action
if last_message.tool_calls:
return "Action"
# Otherwise, we stop (reply to the user)
return END
Copy link

Copilot AI Jan 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should_continue() is annotated as returning Literal["environment", END] but actually returns the string "Action" or END. This mismatch can confuse readers/type checkers and makes the conditional edge mapping harder to follow.

Align the return values and type annotation with the keys used in add_conditional_edges (either return "environment" directly, or update the mapping/annotation to use "Action").

Copilot uses AI. Check for mistakes.
Comment on lines +1 to +5
import os

from dotenv import load_dotenv
from langchain.chat_models import init_chat_model
from langchain_core.messages import SystemMessage, ToolMessage
Copy link

Copilot AI Jan 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sample file is missing the standard Azure SDK copyright header used by other samples in this package (e.g., samples/tool_client_example/react_agent_tool.py). Please add the header to keep samples consistent and compliant.

Copilot uses AI. Check for mistakes.
@JC-386 JC-386 merged commit cc8ba6e into lusu/agentserver-1110 Jan 23, 2026
2 of 3 checks passed
@JC-386 JC-386 deleted the jc/tools-uts branch January 23, 2026 17:49
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.

3 participants