Search_results showing duplicated sources in deep research

:bug: Describe the Bug

Sonar-Deep-Research shows the same source/url as if they were different sources in search_results.

:white_check_mark: Expected Behavior

Each source should be unique and not appear duplicated.

:cross_mark: Actual Behavior

search_results sometimes shows the same url/source more than once, as if they were different sources.

:counterclockwise_arrows_button: Steps to Reproduce

  1. Call the API with the contents shown below.
  2. Sometimes the search_results object will have duplicated values of sources/url. It doesn’t happen everytime, and I couldn’t find the reason why, since the request is always the same.

:pushpin: API Request & Response (if applicable)

curl -X POST "https://api.perplexity.ai/chat/completions" \                                                                                                                                                                                                                                                                                         
                  -H "Authorization: <Hidden>" \
                  -H "Content-Type: application/json" \
                  -H "Accept: application/json,text/html,application/xhtml+xml,application/xml,text/*;q=0.9, image/*;q=0.8, */*;q=0.7" \
                  --compressed \
                  --location \
                  --max-time 300 \
                  -d '{
                "model": "sonar-deep-research",
                "messages": [
                  {
                    "role": "user",
                    "content": "What are the main challenges in measuring fugitive emissions in agriculture?"
                  }
                ]
              }'

:globe_showing_europe_africa: Environment

  • API Version: sonar-deep-research

:paperclip: Logs or Screenshots (if applicable)

Add any logs or screenshots that can help debug the issue.

:memo: Additional Context

Add any other context about the problem here.