Tools and state

openai_web_search_dispatch

Read the release-matched openai web search dispatch documentation and its scope.

Praxis AI v0.12.1 (alpha) 3 min read
On this page

Web search filter for model-driven web_search_call dispatch.

Configuration Notes

Detects pending web search calls in the response phase and executes them on re-entry via the iterative_request_router agentic loop.

Each provider request is executed through the shared filtered-subrequest executor, which enforces destination authority, DNS/SSRF, TLS/SNI, and Host centrally. An optional outbound_chain runs operator-managed cross-cutting filters (headers, credentials, logging) on the callout; when omitted it defaults to an empty inline chain (pure passthrough), so the central protections still apply.

A client’s web-search filters.allowed_domains and filters.blocked_domains are enforced by the proxy on every provider result, so a result outside the allow-list (or under a blocked domain) never reaches the model or action.sources. Malformed, unsupported, or conflicting filters are rejected with HTTP 400 before the first inference round whenever the request’s tool_choice leaves a web-search tool eligible; a request that forbids every hosted search with "none" is not validated because no search can run. filters is accepted on every web-search tool type this filter executes, including the web_search_preview variants whose pinned schema does not declare it.

Domain handling matches hosted OpenAI where hosted documents it: each list accepts up to 100 bare domains (no scheme), both match subdomains, and an absent, null, or empty list restricts nothing. A wildcard entry such as *.example.org (including percent-encoded spellings) and an entry with an empty label are rejected rather than stored literally, and while either list is active a result whose URL is not an absolute http/https URL with a verifiable host is dropped. Hosted does not document how the two lists combine; dispatch applies the allow-list and then removes blocked domains, so a host matching both is blocked. Requests whose web-search tools declare different filters are rejected because dispatch applies one filter to every search in the request; hosted behavior for that disagreement is undocumented.

Configuration

FieldTypeRequiredDescription
providerbrave | tavily | youyesSearch backend provider.
user_credentialstringnoOptional callout-credential slot id (see [WebSearchFilterConfig::user_credential]).
api_keyCredentialSourceyesAPI key credential source for the search provider: exactly one of value, env_var, or file; see [CredentialSource].
default_context_sizestringnoDefault search context size when the client omits it.
timeout_msintegernoCallout timeout in milliseconds. Inside an iterative request router, the effective timeout is capped by the router’s remaining deadline.
max_calls_per_roundintegernoHard cap on web-search calls processed from one model response (1..=1024; default: 32).
max_query_bytesintegernoMaximum UTF-8 bytes accepted for one model-generated search query, after trimming (1..=8192; default: 8192). A blank or oversized query fails the call locally instead of reaching the provider. 8192 is a hard ceiling: admins may lower the bound but cannot raise it.
base_urlstringnoOverride the provider’s default API base URL.
outbound_chainstring | objectnoOutbound filter chain the provider callout executes through. See [WebSearchFilterConfig::outbound_chain]; the two configs stay in sync. Optional — when omitted it defaults to an empty inline passthrough chain via [default_outbound_chain].

Examples

Example 1

filter: openai_web_search_dispatch
provider: brave
api_key:
  env_var: WEB_SEARCH_API_KEY

Example 2

filter: openai_web_search_dispatch
provider: brave
api_key:
  env_var: WEB_SEARCH_API_KEY
outbound_chain: web_search_outbound
default_context_size: medium
timeout_ms: 10000
max_calls_per_round: 32
max_query_bytes: 8192