Skip to content

[AI] [Agents] v1.1.0b2#41325

Merged
howieleung merged 14 commits intomainfrom
feature/azure-ai-agents/1.1.0b2
Jun 9, 2025
Merged

[AI] [Agents] v1.1.0b2#41325
howieleung merged 14 commits intomainfrom
feature/azure-ai-agents/1.1.0b2

Conversation

@glharper
Copy link
Member

Description

  • add is_valid_connection_id check to connection tool init

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 swagger spec, a link to the pull request containing these swagger spec changes has been 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.

* use as* `asyncio.gather` is used to make function tool calls in paral… (#41311)

* use as* `asyncio.gather` is used to make function tool calls in parallel for `async` scenario.

* Fixed version

* update

* update version

* run black
@glharper glharper marked this pull request as ready for review May 30, 2025 14:32
Copilot AI review requested due to automatic review settings May 30, 2025 14:32
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 enhances connection validation and streamlines asynchronous function tool execution.

  • Enforces Azure connection ID format via is_valid_connection_id in ConnectionTool and related classes
  • Introduces AsyncToolSet to run function tool calls concurrently and updates samples accordingly
  • Bumps package version to 1.1.0b2 and updates the changelog

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
samples/agents_async/sample_agents_stream_eventhandler_with_functions_async.py Switches to AsyncToolSet.execute_tool_calls for concurrency
samples/agents_async/sample_agents_functions_async.py Uses AsyncToolSet instead of manual loop for tool execution
azure/ai/agents/models/_patch.py Adds is_valid_connection_id, enforces validation, refactors tool execution
azure/ai/agents/_version.py Bumps version to 1.1.0b2
CHANGELOG.md Logs new features/fixes for 1.1.0b2
Comments suppressed due to low confidence (5)

sdk/ai/azure-ai-agents/azure/ai/agents/models/_patch.py:1845

  • The implementation of is_valid_connection_id uses re.match but re is not imported in this file. Please add import re at the top.
def is_valid_connection_id(connection_id: str) -> bool:

sdk/ai/azure-ai-agents/azure/ai/agents/models/_patch.py:1398

  • The code calls asyncio.gather but asyncio is not imported. Please add import asyncio at the top of this module.
tool_outputs = await asyncio.gather(

sdk/ai/azure-ai-agents/azure/ai/agents/models/_patch.py:865

  • [nitpick] The connection ID validation logic is duplicated in two __init__ methods. Consider moving this check into the base ConnectionTool constructor or a shared helper to avoid code duplication.
if not is_valid_connection_id(connection_id):

sdk/ai/azure-ai-agents/samples/agents_async/sample_agents_stream_eventhandler_with_functions_async.py:46

  • [nitpick] Defining toolset at module level and referencing it in MyEventHandler can hinder encapsulation and testing. Consider passing the toolset into the handler's constructor or storing it as an instance attribute.
# Initialize function tool with user functions

sdk/ai/azure-ai-agents/CHANGELOG.md:5

  • The changelog entry omits the newly added connection ID validation and references instrumentation for create_thread_and_run which isn’t present in this PR. Please update to accurately reflect all changes.
## 1.1.0b2 (2025-05-29)

Liudmila Molkova and others added 2 commits June 2, 2025 10:11
* fixing tracing for streaming when not using event handler

* fixing mypy warnings

* fixes

* changelog
* Update samples with project client

* more samples

* update samples

* UPDATE

* update

* change tooling samples

* black and readme update

* update pip install

* Update changelog

* change  is_valid_connection_id to _is_valid_connection_id and run black
@howieleung howieleung merged commit dec9ecb into main Jun 9, 2025
19 checks passed
@howieleung howieleung deleted the feature/azure-ai-agents/1.1.0b2 branch June 9, 2025 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants