Commit Graph

1810 Commits

  • .NET: feat: Implement return-to-previous routing in handoff workflow (#4356)
    * feat: Implement return-to-previous routing in handoff workflow
    
    - Also obsoletes HandoffsWorkflowBuilder => HandoffWorkflowBuilder (no "s")
    
    * refactor: Remove instance-shared current agent tracking in handoffs
    
    Because the tracker was instance-shared between the start and end executors, it would be shared between all sessions, resulting in incorrect behaviour.
    
    The corect way to do this is to keep the data in a shared executor scope, which is per-session.
    
    * fix: Fix test logic for Handoff to correctly use checkpointing for multiturn
  • Python: Move ag_ui_workflow_handoff demo from demos/ to 05-end-to-end/ (#4900)
    * Move ag_ui_workflow_handoff demo to 05-end-to-end (#4895)
    
    Move the AG-UI workflow handoff demo from python/samples/demos/ to
    python/samples/05-end-to-end/ to follow the current folder structure
    convention. Update README paths accordingly.
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Fix review feedback: remove build artifacts, fix README paths (#4895)
    
    - Add .gitignore to frontend/ to exclude *.tsbuildinfo, vite.config.js,
      and vite.config.d.ts build artifacts from version control
    - Remove the 4 tracked build artifact files from the tree
    - Fix step 2 cd path in README to be relative after 'cd python'
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Clarify working directory context in README Step 2 (#4895)
    
    Step 2 uses a python/-relative path (samples/...) which assumes the
    user is still in the python/ directory from Step 1. Add a brief note
    making this explicit.
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    ---------
    
    Co-authored-by: Copilot <copilot@github.com>
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
  • .NET: Fix bug with per-service-call persistence and approvals (#4933)
    * Fix bug with per-service-call persistence and approvals
    
    * Apply suggestions from code review
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
    
    ---------
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
  • .NET: Improve observability sample (#4917)
    * Improve .Net observability sample
    
    * Update dotnet/samples/02-agents/AgentOpenTelemetry/Program.cs
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
    
    ---------
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
  • .NET: Fix role assignment in ChatMessage construction (#4290)
    * Use actual message role when creating ChatMessage
    
    Replace hard-coded ChatRole.User with a ChatRole constructed from the message's Role. The change ensures ToChatMessage and FunctionMessage use the original role (new ChatRole(this.Role)) for both text and contents branches, fixing incorrect role assignment when constructing ChatMessage instances.
    
    * Update changes
    
    * Fix formatting in ToChatMessage tests
    
    ---------
    
    Co-authored-by: Roger Barreto <19890735+rogerbarreto@users.noreply.github.com>
  • .NET: Add integration test validating OpenAPI tools with AsAIAgent(agentVersion) (#4931)
    * .NET: Add integration test for OpenAPI tools with AsAIAgent(agentVersion)
    
    Validates end-to-end flow creating a Foundry agent with an OpenAPI tool
    definition via native Azure.AI.Projects SDK types and wrapping it with
    AsAIAgent(agentVersion). The test confirms the server-side OpenAPI
    function is invoked correctly through RunAsync.
    
    Addresses #4883
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Address PR review: RetryFact, PascalCase naming, stronger tool assertion
    
    - Use RetryFact with Skip for manual testing (flaky due to external API)
    - Fix agentName -> AgentName to match PascalCase convention in file
    - Strengthen tool invocation assertion: require >= 3 Eurozone countries
    - Add comment explaining server-side OpenAPI tools don't surface as
      FunctionCallContent in the MEAI abstraction
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    ---------
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
  • .NET: Add AsIChatClientWithStoredOutputDisabled for ProjectResponsesClient (#4911)
    * Add AsIChatClientWithStoredOutputDisabled for ProjectResponsesClient
    
    Add extension method on ProjectResponsesClient in Microsoft.Agents.AI.AzureAI
    package (Azure.AI.Extensions.OpenAI namespace) mirroring the existing extension
    on ResponsesClient in the OpenAI package. This enables Azure AI consumers to
    disable server-side response storage without depending on the OpenAI package.
    
    - New ProjectResponsesClientExtensions class with AsIChatClientWithStoredOutputDisabled
    - Optional deploymentName parameter (model is no longer required)
    - Updated OpenAI counterpart doc to remove 'Required' wording for model param
    - Added unit tests covering null guard, inner client accessibility,
      StoredOutputEnabled=false, and reasoning encrypted content inclusion/exclusion
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Preserve existing RawRepresentationFactory when disabling stored output
    
    Address PR review feedback: wrap/chain the existing factory instead of
    replacing it, so upstream configuration (e.g., deploymentName/model defaults
    from AsIChatClient) is preserved.
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    ---------
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
  • ADR to support a multi-source architecture for agent skills (#4787)
    * add  adr suggesting a new design to support a multi-source architecture for agent skills
    
    * add deciders
    
    * move the adr to the decisions folder
    
    * remove unnecessary section
    
    * describe adding a custom skill source
    
    * update
    
    * address comments
    
    * add constructor overloads to inline skill resource and script
    
    * consider ai-function as an alternative for skill script and skill resource model classes
    
    * update decision outcome section and sync adr with latest changes in the code
  • Add ADR to decide consistency of Chat History Persistence (#4816)
    * Add ADR to decide consitency of Chat History Persistence
    
    * Add example
    
    * Update ADR with review results
    
    * Remove unecessary clarification
    
    * Rename ADR to no 22
  • Python: Support structuredContent in MCP tool results and fix sampling options type (#4763)
    * Support MCP sampling tools capability (#4625)
    
    Forward systemPrompt, tools, and toolChoice from MCP sampling requests
    to the chat client's get_response() call. Also advertise the
    sampling.tools capability to MCP servers when a client is configured.
    
    - Pass SamplingCapability with tools support to ClientSession
    - Convert systemPrompt to instructions in options
    - Convert MCP Tool objects to FunctionTool instances for options
    - Map MCP ToolChoice.mode to tool_choice in options
    - Add tests for all new behaviors and update existing sampling tests
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Fix #4625: Support MCP sampling tool with proper typing and structured content
    
    - Fix mypy error by typing sampling callback options as ChatOptions[None]
      instead of dict[str, Any], and importing ChatOptions from _types
    - Handle structuredContent from CallToolResult in _parse_tool_result_from_mcp,
      serializing it as JSON text Content when present
    - Add tests for structuredContent parsing (with and without regular content)
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Fix lint: add author to TODO comment
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Address review feedback for #4625: remove default=str, add edge-case tests
    
    - Remove default=str from json.dumps for structuredContent to fail fast
      on non-JSON-serializable values instead of silently converting
    - Add test for non-JSON-serializable structuredContent (TypeError)
    - Add tests for empty systemPrompt ('') and empty tools list ([]) edge
      cases in sampling callback
    - Expand TODO comment noting list[Content] return type constraint for
      future result_type support
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Sanitize sampling callback error to avoid leaking internals (#4625)
    
    Log exception details at DEBUG level instead of including them in the
    ErrorData message returned to the MCP server, which may be untrusted.
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Address review feedback for #4625: move params to options, restore error info
    
    - Remove stale TODO comment about response_format (ChatOptions already has it)
    - Restore {ex} in sampling callback error message for useful debugging info
    - Set structuredContent as additional_property on Content for structured access
    - Move temperature, max_tokens, stop into options dict (not top-level kwargs)
    - Only set temperature when provided (not all models support it)
    - Add tests for generation params in options and temperature omission
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Fix MCP sampling callback and structured content error handling (#4625)
    
    - Guard max_tokens like temperature: only set when not None, so options
      can properly evaluate to None when all params are absent
    - Wrap json.dumps of structuredContent in try/except to fall back to
      str() for non-serializable values instead of propagating TypeError
    - Extract test_connect_sampling_capabilities_with_client into its own
      test function so pytest can discover it independently
    - Add test for max_tokens=None omission from options
    - Update structured content non-serializable test to expect fallback
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Address review feedback for #4625: review comment fixes
    
    * Fix MCP and Azure validation regressions
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    ---------
    
    Co-authored-by: Copilot <copilot@github.com>
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
  • Python: Include reasoning messages in MESSAGES_SNAPSHOT events (#4844)
    * Include reasoning messages in MESSAGES_SNAPSHOT (#4843)
    
    FlowState now tracks reasoning messages emitted during a run.
    _emit_text_reasoning() persists reasoning (including encrypted_value)
    into flow.reasoning_messages, and _build_messages_snapshot() appends
    them to the final MESSAGES_SNAPSHOT event.
    
    Changes:
    - Add reasoning_messages field to FlowState
    - Update _emit_text_reasoning() to accept optional flow parameter
    - Include reasoning_messages in _build_messages_snapshot()
    - Add 'reasoning' to ALLOWED_AGUI_ROLES so normalize_agui_role()
      preserves the role through snapshot round-trips
    - Skip reasoning messages in agui_messages_to_agent_framework() since
      they are UI-only state and should not be forwarded to LLM providers
    - Add regression tests for snapshot emission, encrypted value
      preservation, and multi-turn round-trip with reasoning
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Python: Include reasoning messages in MESSAGES_SNAPSHOT events
    
    Fixes #4843
    
    * Fix PR review feedback for reasoning persistence (#4843)
    
    - Accumulate reasoning text per message_id (append deltas) instead of
      storing only the current chunk, matching flow.accumulated_text pattern
    - Use camelCase encryptedValue in snapshot JSON to match AG-UI protocol
      conventions (toolCallId, encryptedValue)
    - Normalize snake_case encrypted_value to encryptedValue in
      agui_messages_to_snapshot_format for input compatibility
    - Update normalize_agui_role docstring to include reasoning role
    - Add tests for incremental reasoning accumulation and key normalization
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Address review feedback for #4843: Python: agent-framework-ag-ui: include reasoning messages in MESSAGES_SNAPSHOT
    
    ---------
    
    Co-authored-by: Copilot <copilot@github.com>
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
  • Python: Fix streaming path to emit mcp_server_tool_result on output_item.done instead of output_item.added (#4821)
    * Fix streaming path to deliver mcp_server_tool_result content (#4814)
    
    Remove premature mcp_server_tool_result emission from the
    response.output_item.added/mcp_call handler — at that point the MCP
    server has not yet responded and output is always None.
    
    Add a handler for response.mcp_call.completed that emits
    mcp_server_tool_result with the actual tool output, matching the
    non-streaming path behavior.
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Fix streaming path to deliver mcp_server_tool_result content (#4814)
    
    Stop eagerly emitting mcp_server_tool_result on response.output_item.added
    (when output is always None). Instead, handle response.output_item.done for
    mcp_call items, which carries the full McpCall with populated output.
    
    This matches the non-streaming path which guards with 'if item.output is not
    None' before emitting the result.
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Fix test docstring to match actual implementation event name
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Address review: call_id fallback and raw_representation consistency (#4814)
    
    - Add call_id fallback in response.output_item.done mcp_call handler to
      match the output_item.added handler pattern
    - Use done_item instead of event for raw_representation to keep
      consistent with other output_item branches and non-streaming path
    - Add test for call_id fallback when id attribute is missing
    - Add raw_representation assertions to existing done handler tests
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Address review: call_id fallback for non-streaming path and test coverage (#4814)
    
    - Apply defensive call_id fallback (getattr with id/call_id/empty) to
      non-streaming mcp_call path for consistency with streaming path
    - Add raw_representation assertion to call_id fallback test
    - Add test for empty-string fallback when neither id nor call_id exist
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    ---------
    
    Co-authored-by: Copilot <copilot@github.com>
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
  • Python: Fix A2AAgent to surface message content from in-progress TaskStatusUpdateEvents (#4798)
    * Fix A2AAgent dropping message content from in-progress TaskStatusUpdateEvents (#4783)
    
    _updates_from_task() returned [] for working-state tasks when
    background=False, silently discarding all intermediate message content
    from task.status.message. Now extracts and yields message parts from
    in-progress status updates during streaming.
    
    Also fixed MockA2AClient.send_message to yield all queued responses
    (enabling multi-event streaming tests) and added text parameter to
    add_in_progress_task_response for tests that need status messages.
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Fix: gate intermediate status updates behind emit_intermediate flag and add missing test coverage
    
    - Add emit_intermediate parameter to _updates_from_task and _map_a2a_stream
    - Thread stream flag from run() so only streaming callers see intermediate updates
    - Add IN_PROGRESS_TASK_STATES guard to emit_intermediate condition
    - Add role parameter to test helper add_in_progress_task_response
    - Add clarifying comment on MockA2AClient.send_message batch semantics
    - Add tests for user role mapping, background precedence, non-streaming behavior,
      terminal task with no artifacts, and empty parts edge case
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    ---------
    
    Co-authored-by: Copilot <copilot@github.com>
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
  • .NET: fix: HandoffAgentExecutor does not output any response when non-streaming (#4745)
    * fix: HandoffAgentExecutor does not output any reponse when non-streaming
    
    * fix: Ensure Workflow outputs persisted in chat history when hosted AsAgent
    
    * fix: Remove duplicate history entry creation and ad test
    
    * test: Add streaming tests for AsAgent to smoke tests
    
    * feat: Add output configurability to Handoffs
  • .NET: [BREAKING] Update type names and source generator to reduce conflicts (#4903)
    * refactor: [BREAKING] Config => ExecutorConfig
    
    Make the Config name less likely to collide with other classes by renaming to ExecutorConfig. Makes Configured and related classes internal as they do not need to be part of the public surface.
    
    * fix: Make RouteBuilder explicit in SourceGen to avoid conflicts
  • .NET: Fix ChatOptions mutation in AIContextProviderChatClient across calls (#4891)
    * Fix UseAIContextProviders tool accumulation across calls (#4864)
    
    Clone ChatOptions before mutating it in InvokeProvidersAsync to prevent
    context provider tools from accumulating when the same ChatOptions
    instance is reused across multiple API calls.
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Apply suggestions from code review
    
    Co-authored-by: chetantoshniwal <chetantoshniwal@gmail.com>
    
    * Apply suggestion from @westey-m
    
    ---------
    
    Co-authored-by: MAF Dashboard Bot <maf-dashboard-bot@users.noreply.github.com>
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    Co-authored-by: westey <164392973+westey-m@users.noreply.github.com>
  • .NET: Pass through external input request and handle response conversion for workflow as agent scenario (#4361)
    * Handle external input request and response conversion for workflow as agent scenario
    
    * Remove unnecessary test comment
    
    * Fix PR comments
    
    * Updated to fix edge cases, and add more tests.
    
    * Update pending requests to use typed properties instead of relying on StateBag. replying to PR feedback.
    
    * Fixed external response de-dup and updated possible brittle test.
    
    * Address PR comments on sending turn token for normal messages and handle contentId collision by source agent
    
    * Remove unnecessary serialization element and address pr comment on intercepted outgoing requests
    
    * Updated MEAI changes for UserInput request and response abstractions.
  • .NET: Clarify IResettableExecutor usage comment in workflow sample (#4905)
    * Clarify IResettableExecutor usage comment in workflow sample
    
    * Update dotnet/samples/03-workflows/Agents/WorkflowAsAnAgent/WorkflowFactory.cs
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
    
    * Update dotnet/samples/03-workflows/Agents/WorkflowAsAnAgent/WorkflowFactory.cs
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
    
    ---------
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
  • Python: [BREAKING] Reduce core dependencies and simplify optional integrations (#4904)
    * improved dependencies and some fixes
    
    * fix for mypy
    
    * improve mcp
  • .NET: Expose workflows as MCP tools when hosting on Azure functions (#4768)
    * Expose workflow as MCP Tool
    
    * Expose workflow as MCP Tool
    
    * Cleanup
    
    * PR feedback fixes
    
    * update changelog to include PR numner
    
    * Improvements to error handling.
    
    * Adding a sample project demonstrating how to setup Agents and Workflows together.
    
    * Ensure duplicate agent registrations are properly handled.
  • fix: FS Checkpoint storage special character support (#4730)
    The `sessionId`, an optional parameter when starting a new session when
    running a workflow is an arbitrary string. This allows consumers to
    support whatever ids are needed by other systems, but can result in
    errors when an OS special or forbidden character is included.
    
    The fix is to escape the paths, in a 1:1 manner. We rely on
    EncodeDataString to do this.
    
    * Also modifies the index file to make it easier to determine what the
      name of the file on disk is for a given `sessionId`.
  • .NET: Persist messages during function call loop (#4762)
    * Persist messages during the Function Call Loop
    
    * Revert version reset
    
    * Fix bugs and improve sample
    
    * Fix formatting issues
    
    * Also updating conversation id during run
    
    * Update based on ADR feedback
  • Python: [BREAKING] Python: Provider-leading client design & OpenAI package extraction (#4818)
    * Python: Provider-leading client design & OpenAI package extraction
    
    Major refactoring of the Python Agent Framework client architecture:
    
    - Extract OpenAI clients into new `agent-framework-openai` package
    - Core package no longer depends on openai, azure-identity, azure-ai-projects
    - Rename clients for discoverability: OpenAIResponsesClient → OpenAIChatClient,
      OpenAIChatClient → OpenAIChatCompletionClient
    - Unify `model_id`/`deployment_name`/`model_deployment_name` → `model` param
    - New FoundryChatClient for Azure AI Foundry Responses API
    - New FoundryAgent/FoundryAgentClient for connecting to pre-configured Foundry agents
    - Remove OpenAIBase/OpenAIConfigMixin from non-deprecated client MRO
    - Deprecate AzureOpenAI* clients, AzureAIClient, OpenAIAssistantsClient
    - Reorganize samples: azure_openai+azure_ai+azure_ai_agent → azure/
    - ADR-0020: Provider-Leading Client Design
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * fix: missing Agent imports in samples, .model_id → .model in foundry_local sample
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * fix: CI failures — mypy errors, coverage targets, sample imports
    
    - azure-ai mypy: add type ignores for TypedDict total=, model arg, forward ref
    - Coverage: replace core.azure/openai targets with openai package target
    - project_provider: add type annotation for opts dict
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * fix: populate openai .pyi stub, fix broken README links, coverage targets
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * fixes
    
    * updated observabilitty
    
    * reset azure init.pyi
    
    * fix errors
    
    * updated adr number
    
    * fix foundry local
    
    * fixed not renamed docstrings and comments, and added deprecated markers to old classes
    
    * fix tests and pyprojects
    
    * fix test vars
    
    * updated function tests
    
    * update durable
    
    * updated test setup for functions
    
    * Fix Foundry auth in workflow samples
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Stabilize Python integration workflows
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Update hosting samples for Foundry
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Trigger full CI rerun
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Trigger CI rerun again
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * trigger rerun
    
    * trigger rerun
    
    * fix for litellm
    
    * undo durabletask changes
    
    * Move Foundry APIs into foundry namespace
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Fix Foundry pyproject formatting
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Split provider samples by Foundry surface
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Restore hosting sample requirements
    
    Also fix the Foundry Local sample link after the provider sample move.
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * updated tests
    
    * udpated foundry integration tests
    
    * removed dist from azurefunctions tests
    
    * Use separate Foundry clients for concurrent agents
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * fix client setup in azfunc and durable
    
    * disabled two tests
    
    * updated setup for some function and durable tests
    
    * improved azure openai setup with new clients
    
    * ignore deprecated
    
    * fixes
    
    * skip 11
    
    * remove openai assistants int tests
    
    ---------
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
  • Python: Update sample validation scripts (#4870)
    * Update sample validation scripts
    
    * Adjust prompt
    
    * Update autogen-migration samples
    
    * Add fix suggestion
    
    * Split jobs
    
    * Add .env
    
    * Create trend report
    
    * Add timestamp
    
    * Add more env vars
    
    * Comments
    
    * force node24
    
    * force node24
    
    * force node22
  • .NET: Update AIContextProviders to use Microsoft.Extensions.Compliance.Redaction (#4854)
    * Update providers to use Microsoft.Extensions.Compliance.Redaction
    
    * Fix formatting.
    
    * Fix readme
  • .NET: Re-enable AzureAI.Persistent packaging and integration tests (#4769) (#4865)
    Azure.AI.Agents.Persistent 1.2.0-beta.10 now targets ME.AI 10.4.0+,
    resolving the compatibility issue that required disabling this package.
    
    - Remove IsPackable=false from the csproj
    - Re-enable all 6 integration test classes (IntegrationDisabled → Integration)
    - Remove outdated compatibility warning from README.md
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
  • Bump actions/download-artifact from 7 to 8 (#4372)
    Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 7 to 8.
    - [Release notes](https://github.com/actions/download-artifact/releases)
    - [Commits](https://github.com/actions/download-artifact/compare/v7...v8)
    
    ---
    updated-dependencies:
    - dependency-name: actions/download-artifact
      dependency-version: '8'
      dependency-type: direct:production
      update-type: version-update:semver-major
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Python: Fix PydanticSchemaGenerationError when using from __future__ import annotations with @tool (#4822)
    * Fix PydanticSchemaGenerationError with PEP 563 annotations in @tool
    
    _resolve_input_model used raw param.annotation from inspect.signature(),
    which returns string annotations when 'from __future__ import annotations'
    is active (PEP 563). This caused Pydantic's create_model to fail for
    complex types like Optional[int] or FunctionInvocationContext.
    
    Use typing.get_type_hints() to resolve annotations to actual types before
    passing them to create_model, matching the approach already used by
    _discover_injected_parameters.
    
    Fixes #4809
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Apply pre-commit auto-fixes
    
    * Remove reproduction report and unused test imports
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * fix(tests): strengthen PEP 563 regression tests per review feedback (#4809)
    
    - Verify type correctness in schema assertions (not just key presence)
    - Fix ctx annotation to FunctionInvocationContext | None for type consistency
    - Add test for Optional[CustomType] pattern (original bug trigger)
    - Add test for get_type_hints() fallback with unresolvable forward refs
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Apply pre-commit auto-fixes
    
    * Address review feedback for #4809: Python: [Bug]: PydanticSchemaGenerationError in FunctionInvocationContext
    
    ---------
    
    Co-authored-by: Copilot <copilot@github.com>
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
  • .NET: Update Hosted Samples References to latest beta.11 (#4853)
    * Bump HostedAgents samples to AgentFramework beta.11 and pass credential to UseFoundryTools
    
    Update all 8 HostedAgents samples:
    - Azure.AI.AgentServer.AgentFramework -> 1.0.0-beta.11
    - Microsoft.Agents.AI.OpenAI -> 1.0.0-rc4
    - Microsoft.Agents.AI/AzureAI/Workflows -> 1.0.0-rc4
    - Azure.AI.Projects -> 2.0.0-beta.1
    - Fix Workflow.AsAgent() -> AsAIAgent() in FoundryMultiAgent
    - Pass credential to UseFoundryTools in AgentWithTools (resolves #56802)
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Remove AgentWithTools sample (UseFoundryTools no longer supported)
    
    Remove the AgentWithTools hosted agent sample as the UseFoundryTools
    backend is no longer supported. Updated HostedAgents README and solution
    file to remove all references.
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Fix AgentWithHostedMCP: downgrade Azure.AI.OpenAI to 2.8.0-beta.1 for rc4 compatibility
    
    Azure.AI.OpenAI 2.9.0-beta.1 has breaking changes (GetResponsesClient no
    longer accepts deployment name, ResponsesClient.Model removed) that are
    incompatible with Microsoft.Agents.AI.OpenAI rc4. Pin to 2.8.0-beta.1 and
    use GetResponsesClient(deploymentName).AsAIAgent() pattern.
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    ---------
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
  • Bump Azure.AI.Agents.Persistent from 1.2.0-beta.9 to 1.2.0-beta.10 (#4833)
    ---
    updated-dependencies:
    - dependency-name: Azure.AI.Agents.Persistent
      dependency-version: 1.2.0-beta.10
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • .NET: Fix broken workflow samples (#4800)
    * Fix source generator bug that silently drops base class handler registrations for protocol-only partial executors
    
    * Fixed xml comments and variable naming.
    
    * Fix workflow samples broken due to routing change
  • Add ADR-0020: Foundry Evals integration (#4731)
    * Add ADR-0020: Foundry Evals integration design
    
    Captures the design for integrating Azure AI Foundry Evaluations with
    agent-framework. Key decisions:
    
    - EvalItem with conversation (list[Message]) as single source of truth
    - query/response derived from configurable conversation split strategies
    - Tools as list[FunctionTool] (including auto-extracted MCP tools)
    - FoundryEvals provider with auto-detection of evaluator capabilities
    - LocalEvaluator with @function_evaluator decorator for local checks
    - Consistent Python/C# APIs: evaluate_agent, evaluate_workflow
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Mark ADR 0020 Foundry Evals as accepted
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    ---------
    
    Co-authored-by: alliscode <bentho@microsoft.com>
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
  • .NET: Obsolete the V1 helper methods and migrate samples using it where possible (#4795)
    * Obsolete the V1 helper methods and migrate samples using it where possible
    
    * Address PR comments
  • .NET: Improve visibility for AzureFunctions Workflows samples run tests in increase timeouts (#4820)
    * Reduce timeout flakiness for AzureFunctions Workflows samples run tests
    
    * Add more updates
    
    * Address PR comments
    
    * Address PR comments
  • [BREAKING] Python: Add context mode to AgentExecutor (#4668)
    * Add context mode to AgentExecutor
    
    * Fix unit tests
    
    * Address comments
    
    * Address comments
    
    * REvise context mode and add tests
    
    * Add chain config to sequential builder
    
    * Add sample
    
    * Fix pipeline
    
    * Address comments
    
    * Address comments
  • .NET: Update to OpenAI 2.9.1, Azure.AI.OpenAI 2.9.0-beta.1, Microsoft.Extensions.AI 10.4.0, and Azure.AI.Projects 2.0.0-beta.2 (#4613)
    * Initial plan
    
    * Update code for Microsoft.Extensions.AI.Abstractions 10.4.0 breaking changes
    
    - Rename FunctionApprovalRequestContent → ToolApprovalRequestContent
    - Rename FunctionApprovalResponseContent → ToolApprovalResponseContent
    - Rename UserInputRequestContent → ToolApprovalRequestContent
    - Rename UserInputResponseContent → ToolApprovalResponseContent
    - Update .FunctionCall property → .ToolCall with FunctionCallContent casts where needed
    - Update .Id property → .RequestId on the renamed types
    - Rename FunctionApprovalRequestEventGenerator → ToolApprovalRequestEventGenerator
    - Rename FunctionApprovalResponseEventGenerator → ToolApprovalResponseEventGenerator
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Update OpenAI 2.9.1, ME.AI 10.4.0, fix breaking API changes
    
    Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>
    
    * Fix remaining ME.AI 10.4.0 breaking changes: MCP approval types, .Output→.Outputs
    
    Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>
    
    * Use pattern matching with `when` for ToolApprovalRequestContent/FunctionCallContent
    
    Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>
    
    * Update Azure.AI.OpenAI to 2.9.0-beta.1
    
    Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>
    
    * Fix remaining GetResponsesClient(model) build failures for Azure.AI.OpenAI 2.9.0-beta.1
    
    Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>
    
    * Address review feedback: remove redundant type checks in TestRequestAgent.cs and fix error message in AIAgentHostExecutor.cs
    
    Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>
    
    * Update Azure.AI.Projects to 2.0.0-beta.2 with namespace migration
    
    - Azure.AI.Projects 2.0.0-beta.1 → 2.0.0-beta.2
    - Azure.AI.Projects.OpenAI → Azure.AI.Extensions.OpenAI (transitive)
    - Agent types moved to Azure.AI.Projects.Agents namespace
    - AgentRecord.Versions.Latest → AgentRecord.GetLatestVersion()
    - OpenAPIFunctionDefinition → OpenApiFunctionDefinition
    - BingCustomSearchToolParameters → BingCustomSearchToolOptions
    - MemorySearchPreviewTool.UpdateDelay → UpdateDelayInSecs
    - Azure.Identity 1.17.1 → 1.19.0
    - Microsoft.Identity.Client.Extensions.Msal 4.78.0 → 4.83.1
    
    Co-authored-by: rogerbarreto <19890735+rogerbarreto@users.noreply.github.com>
    
    * Fix remaining type renames for Azure.AI.Projects 2.0.0-beta.2
    
    - BrowserAutomationToolParameters → BrowserAutomationToolOptions
    - MemoryUpdateOptions.UpdateDelay stays as UpdateDelay (not renamed)
    - WaitForMemoriesUpdateAsync parameter order: pollingInterval before options
    - AIProjectAgentsOperations → AgentsClient
    
    Co-authored-by: rogerbarreto <19890735+rogerbarreto@users.noreply.github.com>
    
    * Fix format errors and OpenTelemetry test for ME.AI 10.4.0
    
    - Remove unused 'using Azure.AI.Extensions.OpenAI' and fix import ordering
      in Agent_With_AzureAIProject/Program.cs
    - Update OpenTelemetryAgentTests: gen_ai.tool.definitions is now always
      emitted regardless of EnableSensitiveData per ME.AI 10.4.0 change
      (dotnet/extensions#7346). Tool definitions are not considered sensitive.
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Fix GetRepoFolder() to work in git worktrees
    
    Use 'workflow-samples' directory as repo root marker instead of '.git',
    which fails in worktrees (.git is a file) and also matches too early
    when a '.github' folder exists in subdirectories.
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Fix formatting: remove unused usings and fix import ordering
    
    dotnet format applied across 59 impacted projects. Primarily removes
    unnecessary 'using Azure.AI.Projects' where Azure.AI.Projects.Agents
    provides all needed types, and fixes import ordering per editorconfig.
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Disable AzureAIAgentsPersistent integration tests (#4769)
    
    Azure.AI.Agents.Persistent 1.2.0-beta.9 references McpServerToolApprovalResponseContent
    which was removed in ME.AI 10.4.0 (renamed to ToolApprovalResponseContent), causing
    TypeLoadException at runtime. Mark all 6 test classes with IntegrationDisabled trait
    until Persistent ships a version targeting ME.AI 10.4.0+.
    
    Upstream fix: https://github.com/Azure/azure-sdk-for-net/pull/56929
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Add README with compatibility note for AzureAI.Persistent (#4769)
    
    Documents that Azure.AI.Agents.Persistent 1.2.0-beta.9 is only compatible
    with ME.AI ≤10.3.0 and OpenAI ≤2.8.0 due to type renames in ME.AI 10.4.0.
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Fix file encoding: restore UTF-8 BOM on Persistent test files
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Mark AzureAI.Persistent as IsPackable=false (#4769)
    
    Prevent shipping until Azure.AI.Agents.Persistent targets ME.AI 10.4.0+.
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Moving IsPackable after import
    
    ---------
    
    Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>
    Co-authored-by: rogerbarreto <19890735+rogerbarreto@users.noreply.github.com>
  • Update script to ping only on waiting-for-author label (#4812)
    * update script to ping only on certain waiting for author label
    
    * Update .github/scripts/stale_issue_pr_ping.py
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
    
    * Update .github/scripts/stale_issue_pr_ping.py
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
    
    * Fix docstring
    
    ---------
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
  • Python: avoid duplicate agent response telemetry (#4685)
    * Python: avoid duplicate agent response telemetry
    
    * Python: conditionally suppress duplicate agent telemetry
    
    * Simplify telemetry ownership tracking
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Aggregate token usage from inner chat spans on invoke_agent span
    
    The invoke_agent span now carries the aggregated input/output token
    counts from all inner chat completion spans that occur during an agent
    run. Previously, when inner ChatTelemetryLayer spans captured usage,
    the outer AgentTelemetryLayer skipped setting usage entirely to avoid
    duplication. Now a new INNER_ACCUMULATED_USAGE context variable tracks
    cumulative usage across all inner completions, and the agent span
    always reports the total.
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    ---------
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
  • Python: Deprecate Azure AI v1 (Persistent Agents API) helper methods (#4804)
    * Deprecate Azure AI v1 (Persistent Agents API) helper methods
    
    Add DeprecationWarning to v1 classes and functions that have been
    superseded by the v2 (Projects/Responses) API:
    
    - AzureAIAgentsProvider -> use AzureAIProjectAgentProvider
    - AzureAIAgentClient -> use AzureAIClient
    - AzureAIAgentOptions -> use AzureAIProjectAgentOptions
    - to_azure_ai_agent_tools() -> use to_azure_ai_tools()
    - from_azure_ai_agent_tools() -> use from_azure_ai_tools()
    - AzureAIAgentClient static tool factory methods -> use AzureAIClient equivalents
    
    All v1 components still function but emit warnings to guide migration.
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Add deprecation warnings to AzureAIAgentsProvider methods
    
    Mark create_agent(), get_agent(), and as_agent() as deprecated
    individually, pointing to AzureAIProjectAgentProvider equivalents.
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    ---------
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
  • Python: Bump Python version to 1.0.0rc5 and 1.0.0b260319 for a release. (#4807)
    * Bump Python version to 1.0.0rc5 and 1.0.0b260319 for a release.
    
    * update missed pkg versions
    
    * Update changelog
  • Python: Emit tool call events in GitHubCopilotAgent streaming (#4711)
    * Emit tool call events in GitHubCopilotAgent streaming
    
    _stream_updates now yields FunctionCallContent for TOOL_EXECUTION_START
    and FunctionResultContent for TOOL_EXECUTION_COMPLETE events from the
    Copilot SDK session. This enables DevUI and other consumers to display
    tool calls during streaming agent execution. Previously only ASSISTANT_MESSAGE_DELTA, SESSION_IDLE, and SESSION_ERROR
    were handled — tool execution events were silently dropped.
    
    Signed-off-by: James Sturtevant <jsturtevant@gmail.com>
    
    * Add some tests
    
    Signed-off-by: James Sturtevant <jsturtevant@gmail.com>
    
    * Respond to feedback
    
    Signed-off-by: James Sturtevant <jsturtevant@gmail.com>
    
    * Fix TOOL_EXECUTION_COMPLETE to use correct SDK types
    
    - Read result text from session_events.Result.content (not ToolResult.text_result_for_llm)
    - Read failure state from event.data.success/error (not result_obj.result_type/error)
    - Handle ErrorClass.message and plain string errors
    - Update tests to use session_events.Result and ErrorClass
    - Add tests for string errors, success-with-error, and COMPLETE missing fields
    
    Signed-off-by: James Sturtevant <jsturtevant@gmail.com>
    
    ---------
    
    Signed-off-by: James Sturtevant <jsturtevant@gmail.com>
  • Python: [BREAKING] Refactor middleware layering and split Anthropic raw client (#4746)
    * [BREAKING] Refactor middleware layering and raw clients
    
    Reorder chat client layers so function invocation wraps chat middleware, and chat middleware stays outside telemetry while still running for each inner model call. Add middleware pipeline caching, refresh docs and samples, and split Anthropic into raw and public clients to match the standard layering model.
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Tighten typing ignores in ancillary modules
    
    Add targeted typing ignores in workflow visualization and lab modules so pyright stays clean alongside the middleware refactor work.
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Fix categorize_middleware to unpack tuple/Sequence and use relative MRO assertions
    
    - Broaden isinstance check in categorize_middleware from list to Sequence
      so tuples and other Sequence types are properly unpacked instead of
      being appended as a single item.
    - Replace fragile hardcoded MRO index assertions in anthropic test with
      relative ordering via mro.index().
    - Add regression tests for categorize_middleware with tuple, list, and
      None inputs.
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Fix middleware string decomposition, add middleware param to FunctionInvocationLayer, and add tests (#4710)
    
    - Guard categorize_middleware Sequence check against str/bytes to prevent
      character-by-character decomposition of accidentally passed strings
    - Add explicit middleware parameter to FunctionInvocationLayer.get_response
      and merge it into client_kwargs before categorization, fixing the
      inconsistency where only OpenAIChatClient supported this parameter
    - Add assertions that RawAnthropicClient does not inherit convenience layers
    - Add chat middleware cache test with non-empty base middleware
    - Add tests for single unwrapped middleware item and string input
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Apply pre-commit auto-fixes
    
    * Apply pre-commit auto-fixes
    
    * Address review feedback for #4710: review comment fixes
    
    ---------
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    Co-authored-by: Copilot <copilot@github.com>
  • Python: Emit TOOL_CALL_RESULT events when resuming after tool approval (#4758)
    * Emit TOOL_CALL_RESULT events on approval resume (#4589)
    
    When a tool call is approved via the interrupt/resume flow,
    _resolve_approval_responses executes the tool and injects the result
    into the messages array, but no TOOL_CALL_RESULT SSE event was yielded
    to the client.
    
    Changes:
    - _resolve_approval_responses now returns the list of resolved
      function_result Content objects instead of None
    - run_agent_stream yields ToolCallResultEvent for each resolved
      approval result after RunStartedEvent is emitted
    - Add ToolCallResultEvent to ag_ui.core imports in _agent_run.py
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Apply pre-commit auto-fixes
    
    * fix(ag-ui): address PR review feedback for #4589
    
    1. _resolve_approval_responses now returns only approved results (not
       rejections) so TOOL_CALL_RESULT events are emitted only for executed
       tools. Rejection results are still written into message history.
    
    2. Emit resolved TOOL_CALL_RESULT events in the no-updates fallback
       RUN_STARTED path so approval results are never lost.
    
    3. Rewrite tests to use real FunctionTool with func and
       approval_mode='always_require' via StubAgent default_options,
       verifying actual tool execution output in TOOL_CALL_RESULT content.
       Added test for rejection not emitting TOOL_CALL_RESULT.
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Fix #4589: clean up approval resolution and add missing tests
    
    - Extract duplicated TOOL_CALL_RESULT emission block into
      _make_approval_tool_result_events helper to prevent drift
    - Remove dead rejection_results construction in _resolve_approval_responses;
      _replace_approval_contents_with_results already handles rejections inline
    - Pass only approved_results (not all_results) to clarify the contract
    - Add mixed approve/reject test validating the core splitting logic
    - Add zero-updates test covering the no-updates fallback emission path
    - Add direct unit test for _resolve_approval_responses return value
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Apply pre-commit auto-fixes
    
    * Fix import sorting lint error in test_approval_result_event.py
    
    Add blank line between first-party and third-party import groups
    to satisfy ruff I001 rule.
    
    Fixes #4589
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    ---------
    
    Co-authored-by: Copilot <copilot@github.com>
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
  • Python: Emit AG-UI events for MCP tool calls, results, and text reasoning (#4760)
    * Python: Emit AG-UI events for MCP tool calls, results, and text reasoning
    
    Fixes #4213 — `_emit_content()` in the AG-UI layer only handled `text`,
    `function_call`, `function_result`, `function_approval_request`, `usage`,
    and `oauth_consent_request` content types. Foundry MCP content types
    (`mcp_server_tool_call`, `mcp_server_tool_result`) and `text_reasoning`
    fell through unhandled, producing no SSE events for AG-UI consumers.
    
    Added three new handler functions wired into `_emit_content()`:
    
    - `_emit_mcp_tool_call`: emits TOOL_CALL_START + TOOL_CALL_ARGS and
      tracks in FlowState for MESSAGES_SNAPSHOT inclusion
    - `_emit_mcp_tool_result`: emits TOOL_CALL_END + TOOL_CALL_RESULT with
      full FlowState cleanup mirroring `_emit_tool_result`
    - `_emit_text_reasoning`: emits the protocol-defined reasoning event
      sequence (ReasoningStart → MessageStart → MessageContent → MessageEnd
      → ReasoningEnd) with ReasoningEncryptedValueEvent for protected_data
    
    * Add HTTP round-trip tests for MCP tool and reasoning SSE events
    
    Exercises the full POST → SSE bytes → parse → validate pipeline for
    mcp_server_tool_call, mcp_server_tool_result, text_reasoning, and
    ReasoningEncryptedValueEvent content through FastAPI TestClient.
    
    * Fix _emit_mcp_tool_result missing predictive_handler support (#4213)
    
    - Add predictive_handler parameter to _emit_mcp_tool_result and mirror
      the apply_pending_updates + StateSnapshotEvent block from _emit_tool_result
    - Forward predictive_handler from _emit_content to _emit_mcp_tool_result
    - Add assertion for stored arguments in MCP tool call test
    - Add test for predictive handler state snapshot after MCP tool result
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Apply pre-commit auto-fixes
    
    * Refactor MCP tool emit functions and add missing tests (#4213)
    
    - Extract _emit_tool_result_common shared helper to eliminate duplication
      between _emit_tool_result and _emit_mcp_tool_result
    - Remove server_name prefix from tool_call_name in _emit_mcp_tool_call;
      display_name now equals tool_name directly
    - Add test for tool_name fallback to 'mcp_tool' when tool_name is None
    - Add test for output=None fallback to empty string in _emit_mcp_tool_result
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Address review feedback for #4213: review comment fixes
    
    ---------
    
    Co-authored-by: Copilot <copilot@github.com>
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
  • Add automated stale issue and PR follow-up ping workflow (#4776)
    * Add script to ping on stale issues/PRs
    
    * Add script to ping on stale issues/PRs
    
    * Fix stale issue/PR ping script review comments
    
    - Rename TEAM_NAME env var to TEAM_SLUG for clarity
    - Add actionable error messages for 403/404 team lookup failures
    - Add contents:read permission for actions/checkout
    - Use github.event.inputs context with fallback for scheduled runs
    - Pin PyGithub to 2.6.0 for reproducible builds
    - Fetch comments once in should_ping() to reduce API calls
    - Make ping() retry loop idempotent (track comment/label state)
    - Validate DAYS_THRESHOLD with helpful error for non-numeric input
    - Fix timezone bug: use astimezone() instead of replace(tzinfo=)
    - Add comprehensive unit tests (29 tests)
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    ---------
    
    Co-authored-by: Copilot <copilot@github.com>
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
  • Python: Support detail field in OpenAI Chat API image_url payload (#4756)
    * Support detail field in OpenAI image_url payload (#4616)
    
    Include the optional 'detail' field from Content.additional_properties
    when building image_url payloads for the OpenAI Chat API, matching the
    existing pattern used for 'filename' in document file payloads.
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Apply pre-commit auto-fixes
    
    * Remove reproduction report
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Simplify detail extraction from additional_properties (#4616)
    
    - Remove unnecessary hasattr check; additional_properties is always
      initialized as a dict on Content instances.
    - Use 'is not None' instead of truthy check to be more precise.
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Apply pre-commit auto-fixes
    
    * Remove detail allowlist in chat client to align with responses client
    
    Replace the strict allowlist check ('low', 'high', 'auto') with an
    isinstance(detail, str) check so that any valid string detail value is
    passed through to OpenAI. This aligns the chat client behavior with the
    responses client, which passes detail through unconditionally.
    
    Also add test coverage for:
    - Future/unknown string detail values being passed through
    - Data URI images (covering the 'data' branch of the match)
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    ---------
    
    Co-authored-by: Copilot <copilot@github.com>
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
  • Python: Fix MCP tool schema normalization for zero-argument tools missing 'properties' key (#4771)
    * Fix zero-argument MCP tool schema missing 'properties' key (#4540)
    
    MCP servers for zero-argument tools (e.g. matlab-mcp-core-server's
    detect_matlab_toolboxes) declare inputSchema as {"type": "object"}
    without a "properties" key. OpenAI's API requires "properties" to
    be present on object schemas, causing a 400 invalid_request_error.
    
    Normalize inputSchema at MCP ingestion in load_tools() to inject an
    empty "properties": {} when it is missing from object-type schemas.
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Address review feedback for #4540: improve test robustness and add defensive guard
    
    - Look up loaded functions by name instead of index to avoid brittle
      ordering assumptions
    - Add negative-path test cases: non-object schema (type: string) and
      empty schema ({}) to verify guard clause skips them correctly
    - Assert original inputSchema dicts are not mutated by load_tools()
    - Add defensive guard for tool.inputSchema being None
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Address review feedback for #4540: Python: [Bug]: Local stdio MCP works for calculator but fails for official matlab-mcp-core-server on LM Studio /v1/responses
    
    ---------
    
    Co-authored-by: Copilot <copilot@github.com>
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>