Azure / Azure/azure-rest-api-specs

[BUG] Quote missing in MessageTextFileCitationDetails

Open
#37,714 1 comment 3 reactions 0 assignees View on GitHub
bug customer-reported question
Dominant language
TypeSpec
Stars
3.1k
Forks
5.9k
Avg merge
2d 22h
Merged PRs (30d)
444

Description

### API Spec link

https://learn.microsoft.com/en-us/rest/api/aifoundry/aiagents/messages/create-message?view=rest-aifoundry-aiagents-2025-05-01&tabs=HTTP#messagetextfilecitationdetails

### API Spec version

2025-05-01

### Describe the bug

When using the Azure AI Agent API configured with the File Search tool, citations appear in the response text and annotations object. However, the quote field (which should contain the actual snippet from the file) is missing in the `file_citation` annotations.

### Expected behavior

Each `file_citation` annotation should include:

- `file_id`
- `quote` (the actual snippet from the file used as the source)

### Actual behavior

- `file_id` is present
- `quote` is missing

The reference text in the response body shows a marker like `[1.1 source]`, but the quote is missing on the `file_citation` in the message annotation.

### Reproduction Steps

Configure an Agent with the File Search tool pointing to documents.

Start a new run on a thread where the model is prompted to answer from those documents.

Inspect the returned message object.

Check `message.content[].annotations[].file_citation` for the missing `quote`.

### Environment

REST calls via Quarkus (3.26.2) service.

System:
- Windows 11
- IntelliJ 2024.3.5

Contributor guide

Open the contributing guide

Research direction

Start with the linked Azure AI Agents API specification for version 2025-05-01, focusing on MessageTextFileCitationDetails and the file_citation annotation. Reproduce the REST request with File Search and inspect message.content[].annotations[].file_citation. Done means the returned annotation includes both file_id and the expected quote snippet.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, openapi
Domain
api, backend-api-design
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.