External Publication
Visit Post

Web_search filters.blocked_domains appears to be ignored in some cases

OpenAI Developer Community May 22, 2026
Source

Hi everyone,

I am using the Responses API with web_search tool and filters.blocked_domains.

Environment:

openai-python==2.38.0
model=gpt-5.4-mini

Request shape:

response = client.responses.create(
    model="gpt-5.4-mini",
    tools=[{
        "type": "web_search",
        "filters": {
            "blocked_domains": [
                "blocked-domain-1.com",
                "blocked-domain-2.com"
            ]
        }
    }],
    tool_choice="required",
    include=["web_search_call.action.sources"],
    input="Give me some basic information about the company with this website: www.test.com",
)

Expected behavior: blocked domains should not appear in web_search_call.action.sources.

Actual behavior: across 213 test cases , blocked domains appeared in sources in 13 cases.

I confirmed:

  • using web_search, not web_search_preview

  • using Responses API, not Chat Completions

  • domains are normalized, without https:// or paths

  • fewer than 100 blocked domains

One related observation: in openai-python==2.38.0, the generated SDK type file appears to include allowed_domains but not blocked_domains:

src/openai/types/responses/web_search_tool_param.py

So I am wondering whether this is an SDK typing/schema mismatch, a request serialization issue, or a backend enforcement issue.

Is this expected, or is blocked_domains enforcement currently unreliable?

Thanks.

Discussion in the ATmosphere

Loading comments...