Skip to content

.NET: Python: [Bug]: Azure AI Search citations missing additional_properties.get_url in Foundry streaming #5995

@Harsh-Microsoft

Description

@Harsh-Microsoft

Description

url_citation annotations from Azure AI Search in FoundryAgent streaming responses no longer expose the per-document REST URL under additional_properties.get_url. Only the search-service root URL and a generic doc_N title are surfaced, making it impossible to identify or dereference the specific document referenced by each citation.

This worked on agent-framework-azure-ai==1.0.0rc2 and is broken on GA release.

Steps to Reproduce

  1. Configure FoundryAgent with AzureAISearchTool.
  2. Stream a query that triggers Azure AI Search.
  3. Inspect chunk.contents[].annotations for type='citation'.

Expected Behaviour

{
    'type': 'citation',
    'title': 'doc_4',
    'url': 'https://srch-example.search.windows.net/',
    'additional_properties': {
        'annotation_index': 1,
        'get_url': 'https://srch-example.search.windows.net/indexes/<index>/docs/<doc-id>_01?api-version=2024-07-01&$select=...',
    },
    ...
}

Actual Behaviour

{
    'type': 'citation',
    'title': 'doc_4',
    'url': 'https://srch-example.search.windows.net/',
    'additional_properties': None,
    ...
}

Debug log shows the source event is dropped:

DEBUG agent_framework.openai: Unparsed event of type: response.azure_ai_search_call_output.done: ...

Code Sample

Error Messages / Stack Traces

Package Versions

agent-framework-core==1.3.0 agent-framework-foundry==1.3.0 azure-ai-projects==2.1.0

Python Version

Python 3.11

Additional Context

Related: #4418 (same scenario, generic doc_N titles).

Metadata

Metadata

Type

No fields configured for Bug.

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions