# Web search tool in Gemini 3.5 flash lite and 3.6 flash is broken

**URL:** <https://community.perplexity.ai/t/web-search-tool-in-gemini-3-5-flash-lite-and-3-6-flash-is-broken/5665>\
**Category:** Bug Reports\
**Tags:** search-api\
**Created:** [July 25, 2026, 12:03pm UTC](https://community.perplexity.ai/t/web-search-tool-in-gemini-3-5-flash-lite-and-3-6-flash-is-broken/5665 "2026-07-25T12:03:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Andrew\_Wheeler](https://sea1.discourse-cdn.com/flex001/user_avatar/community.perplexity.ai/andrew_wheeler/32/3388_2.png) [@Andrew\_Wheeler](https://community.perplexity.ai/u/Andrew_Wheeler)\
**Post date:** [July 25, 2026, 12:03pm UTC](https://community.perplexity.ai/t/web-search-tool-in-gemini-3-5-flash-lite-and-3-6-flash-is-broken/5665/1 "2026-07-25T12:03:24Z")

</div>

## Pre-flight checklist

- This is about the Perplexity API, not the Perplexity app, Comet, or web UI.
- I have removed API keys, secrets, and private data.
- I have included enough information for someone else to reproduce the issue.

## Bug type

- Error response or failed request
- Incorrect or unexpected model output
- Missing, invalid, or stale citations/search results
- Streaming issue
- Structured output or JSON schema issue
- SDK issue
- Billing, credits, or rate limit issue
- Dashboard, API key, or auth issue
- Other API bug

## Affected API area

- Agent API
- Search API
- Sonar API
- Embeddings API
- SDKs
- Dashboard, API keys, or auth
- Billing or credits
- Not sure

## Summary

The newest Gemini models (3.5 flash lite and 3.6 flash) there is something wrong when using web search tool calls in the API. See [https://gist.github.com/apwheele/0fb00fc9749ecdfd52c833f9fc97eee3](https://gist.github.com/apwheele/0fb00fc9749ecdfd52c833f9fc97eee3) for reproducible script.

## Expected behavior

The script shows tool calling in the responses API works with the older models. Just the newest released model does not work. Also see [https://x.com/CrimeDecoder/status/2080979274291462471](https://x.com/CrimeDecoder/status/2080979274291462471) for some screenshots of this in the API console where you can just use the GUI.

## Actual behavior

Returns a 400 error

## Minimal reproduction

```python
import os
from openai import OpenAI

client = OpenAI(
    api_key=os.environ["PERPLEXITY_API_KEY"],
    base_url="https://api.perplexity.ai/v1",
)

prompt = """What does 
https://andrewpwheeler.com/2026/07/23/notes-on-document-processing-with-llms/ 
talk about?"""

# works
response = client.responses.create(
    model="google/gemini-3.1-flash-lite",
    input=prompt,
    tools=[{"type": "web_search"}],
)
print(response.output_text)

# fails
response = client.responses.create(
    model="google/gemini-3.5-flash-lite",
    input=prompt,
    tools=[{"type": "web_search"}],
)
print(response.output_text)

```

## Response or error

```json
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/apwheele/miniconda3/lib/python3.12/site-packages/openai/_base_client.py", line 1105, in request
    raise self._make_status_error_from_response(err.response) from None
openai.BadRequestError: Error code: 400 - {'error': {'message': 'invalid request', 'type': 'invalid_request', 'code': 400}}

```

## Request details

- Endpoint: responses endpoint
- Model or preset: gemini 3.5 flash lite and gemini 3.6 flash
- SDK/language/version: python
- Request ID:
- Approximate time and timezone:
- Consistent or intermittent: consistent

## Additional context

---

<div class="post-metadata">

**Author:** ![albert\_pplx](https://avatars.discourse-cdn.com/v4/letter/a/258eb7/32.png) [@albert\_pplx](https://community.perplexity.ai/u/albert_pplx)\
**Post date:** [July 25, 2026, 7:27pm UTC](https://community.perplexity.ai/t/web-search-tool-in-gemini-3-5-flash-lite-and-3-6-flash-is-broken/5665/2 "2026-07-25T19:27:27Z")

</div>

Hi Andrew, thanks for flagging this. The team is working on a fix which should be deployed shortly. I’ll share updates shortly in this thread.

---

<div class="post-metadata">

**Author:** ![albert\_pplx](https://avatars.discourse-cdn.com/v4/letter/a/258eb7/32.png) [@albert\_pplx](https://community.perplexity.ai/u/albert_pplx)\
**Post date:** [July 26, 2026, 6:13pm UTC](https://community.perplexity.ai/t/web-search-tool-in-gemini-3-5-flash-lite-and-3-6-flash-is-broken/5665/3 "2026-07-26T18:13:22Z")

</div>

Hi Andrew,

Thanks again for flagging this, fix has been deployed.

If you have any further questions, please don’t hesitate to let us know either through this forum or at api@perplexity.ai
