Search_before_date and Search_after_date filters not working

:bug: Describe the Bug

First: it is unclear if the date format should be ‘mm-dd-yyyy’, as described in the reference API, or ‘mm/dd/yyyy’. On one occasion, using ‘mm=dd-yyyy’ gave a format error only when I used one of them (either search_before or search_after), whereas if I set both (time interval), there was no error.

Second: whatever you do, the filter by date seems to be ignored, and I tried with search_mode set to ‘academic’ or ‘web’.

Using last_updated_before/after didn’t help, these seem to be ignored as well.

:white_check_mark: Expected Behavior

I expect the response.search_results to have results in the desired date range.

:cross_mark: Actual Behavior

The search_before/after and/or last_updated_before/after have no effect on the search results

:counterclockwise_arrows_button: Steps to Reproduce

  1. response = client.chat.completions.create(

     model=model,  # A powerful model with web-search capabilities
    
     max_tokens=16384,
    
     messages=messages,
    
     temperature=0.2,
    
     response_format=response_format,
    
     search_before_date_filter="01/01/2020",
    
     last_updated_before_filter="01/01/2020",
    
     search_domain_filter=domain_filter_2,
    
     web_search_options={"search_context_size": "high"},
    
     search_mode="web"
    

    )

  2. Check response.search_results

:pushpin: API Request & Response (if applicable)

:globe_showing_europe_africa: Environment

  • API Version: [e.g., sonar-3.1]
  • SDK (if applicable): [e.g., Python SDK v0.5]
  • Operating System: [e.g., MacOS, Linux, Windows]

: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.