decolua/9router · error

Provider ${providerId} does not support web search

Error message

Provider ${providerId} does not support web search

What it means

The provider id resolved successfully, but its registry entry has neither a `searchConfig` nor `searchViaChat` flag, so it cannot execute web-search requests. This 400 is returned before any credential or upstream call. It is a capability mismatch: the provider exists but only supports chat/embeddings/etc.

Source

Thrown at src/sse/handlers/search.js:107

  return handleSingleProviderSearch(body, providerInput, request, apiKey, settings);
}

async function handleSingleProviderSearch(body, providerInput, request, apiKey, settings) {
  const query = body.query;
  const providerId = resolveProviderId(providerInput);
  const resolvedProvider = AI_PROVIDERS[providerId];

  if (!resolvedProvider) {
    log.warn("SEARCH", "Unknown provider", { provider: providerInput });
    return errorResponse(HTTP_STATUS.BAD_REQUEST, `Unknown provider: ${providerInput}`);
  }

  const providerConfig = resolvedProvider.searchConfig;
  const supportsSearch = !!providerConfig || !!resolvedProvider.searchViaChat;

  if (!supportsSearch) {
    log.warn("SEARCH", "Provider does not support web search", { provider: providerId });
    return errorResponse(HTTP_STATUS.BAD_REQUEST, `Provider ${providerId} does not support web search`);
  }

  if (providerInput !== providerId) {
    log.info("ROUTING", `${providerInput} → ${providerId}`);
  } else {
    log.info("ROUTING", `Provider: ${providerId}`);
  }

  // Sanitized body forwarded to core
  const coreBody = {
    query: query.trim(),
    provider: providerId,
    max_results: body.max_results,
    search_type: body.search_type,
    country: body.country,
    language: body.language,
    time_range: body.time_range,

View on GitHub (pinned to 90b52e06ff)

Solutions

  1. Choose a provider whose registry entry defines `searchConfig` or `searchViaChat` (e.g. tavily, brave, searxng).
  2. If the provider should support search, add `searchConfig` (or `searchViaChat: true`) to its registry file under open-sse/providers/registry/.
  3. For search combos, ensure every model in the combo is a search-capable provider id.
  4. Check the dashboard's provider list filtered by web-search support instead of all providers.

Example fix

// before (registry/gpt.js)
export default { id: 'gpt', /* no searchConfig */ };
// after
export default { id: 'gpt', searchViaChat: true, searchConfig: { endpoint: '/responses', ... } };
Defensive patterns

Strategy: validation

Validate before calling

const p = AI_PROVIDERS[resolveProviderId(provider)];
if (p && !p.searchConfig && !p.searchViaChat) {
  throw new Error(`Provider ${resolveProviderId(provider)} does not support web search`);
}

Type guard

const supportsSearch = (p) => Boolean(AI_PROVIDERS[resolveProviderId(p)]?.searchConfig || AI_PROVIDERS[resolveProviderId(p)]?.searchViaChat);

Prevention

When it happens

Trigger: Posting a search request with provider set to a chat-only provider id (e.g. a plain OpenAI-compatible endpoint or an LLM provider without a searchConfig); reusing a chat combo whose models are all non-search providers; a registry file whose searchConfig was removed or renamed in a refactor.

Common situations: Pointing a generic search client at every configured provider assuming uniform capabilities; combo expansion routing search traffic to chat models that lack searchViaChat; upstream registry template copied without filling searchConfig; users confusing provider search (Tavily/Brave) with LLM builtin web search on non-supporting providers.

Understand the failure class

Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.

Related errors


AI-assisted analysis of decolua/9router@90b52e06ff (2026-08-30). Data as JSON: /api/errors/d14f68a3977906b1. Report an issue: GitHub.