diegosouzapw/OmniRoute · error

Missing required field: query

Error message

Missing required field: query

What it means

Manual required-field check in the web-search skill input handling: the query parameter is falsy (absent, null or empty string) even though the declared input type lists it as required. Sentinel validation before the search is dispatched — the tool call omitted its primary argument.

Solutions

  1. Include a non-empty query string in the tool input before invoking web search
  2. Validate the input earlier with the skill's Zod schema so the request fails fast with a typed error
  3. If query arrives empty from an agent, fall back to a clarification prompt instead of calling the skill
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/lib/skills/builtins.ts:359 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of diegosouzapw/OmniRoute@a179ffed5b (2026-08-25). Data as JSON: /api/errors/10a185a49ed5193d. Report an issue: GitHub.

Appendix: source

Thrown at src/lib/skills/builtins.ts:359

      language?: string;
      time_range?: "any" | "day" | "week" | "month" | "year";
      offset?: number;
      filters?: {
        include_domains?: string[];
        exclude_domains?: string[];
        safe_search?: "off" | "moderate" | "strict";
      };
      content?: {
        snippet?: boolean;
        full_page?: boolean;
        format?: "text" | "markdown";
        max_characters?: number;
      };
      provider_options?: Record<string, unknown>;
      strict_filters?: boolean;
    };
    if (!query) {
      throw new Error("Missing required field: query");
    }
    const search = await executeWebSearch({
      query,
      provider,
      limit,
      max_results,
      search_type,
      country,
      language,
      time_range,
      offset,
      filters,
      content,
      provider_options,
      strict_filters,
      apiKeyId: context.apiKeyId || null,
    });
    return {

View on GitHub (pinned to a179ffed5b)