hermes-bsd/website/docs/user-guide/features
kshitijk4poor 2a352f96ee fix(x_search): surface degraded results + validate dates
The xAI Responses API for x_search returns 200 OK with a
synthesized fluff answer in two failure modes that callers currently
cannot distinguish from a real, citation-backed result:

1. Any narrowing filter (allowed_x_handles, excluded_x_handles,
   from_date, to_date) was active, but the X index returned no
   matching posts. The model then answers from training data.
2. The date range is malformed, inverted, or pure-future (e.g.
   from_date=2030-01-01). The API call burns quota and Grok
   responds with a generic answer.

Mitigations, both client-side:

* Validate from_date / to_date before the HTTP call:
  - Strict YYYY-MM-DD.
  - from_date <= to_date when both set.
  - from_date <= today UTC (no posts in a window that hasn't
    started). to_date in the future remains allowed so callers
    can request 'from yesterday to tomorrow'.

* Add 'degraded' + 'degraded_reason' to successful responses.
  degraded=True iff any narrowing filter was active AND both the
  top-level 'citations' array and inline 'url_citation'
  annotations came back empty. A broad query with no filters that
  returns no citations is *not* flagged degraded — that case is
  just an unsourced answer, not a filter miss.

Tests cover all four validation paths plus six degraded-flag
scenarios (each filter type, inline vs top-level citation
recovery, broad query baseline). All existing tests continue to
pass; the additions are purely additive on the success-path
response shape.

Discovered while testing the x_search toolset end-to-end:
queries scoped to @Teknium1 returned confident-sounding generic
text about Nous Research with zero citations, and from_date in
2030 produced sassy non-answers. Both are now detectable by the
caller.
2026-05-21 02:38:45 +05:30
..
_category_.json
acp.md docs: comprehensive 2-week sweep of feature/PR coverage gaps (#28497) 2026-05-18 23:55:25 -07:00
api-server.md
batch-processing.md
browser.md feat: auto-launch Chromium-family browser for CDP 2026-05-19 22:34:05 -07:00
built-in-plugins.md
code-execution.md
codex-app-server-runtime.md
computer-use.md
context-files.md
context-references.md
credential-pools.md
cron.md docs: comprehensive 2-week sweep of feature/PR coverage gaps (#28497) 2026-05-18 23:55:25 -07:00
curator.md docs: comprehensive 2-week sweep of feature/PR coverage gaps (#28497) 2026-05-18 23:55:25 -07:00
delegation.md docs: comprehensive 2-week sweep of feature/PR coverage gaps (#28497) 2026-05-18 23:55:25 -07:00
deliverable-mode.md
extending-the-dashboard.md
fallback-providers.md
goals.md docs: comprehensive 2-week sweep of feature/PR coverage gaps (#28497) 2026-05-18 23:55:25 -07:00
honcho.md
hooks.md
image-generation.md
kanban-tutorial.md
kanban-worker-lanes.md
kanban.md fix(kanban): respawn guard defers blocker_auth instead of auto-blocking (#28683) 2026-05-19 03:27:45 -07:00
lsp.md
mcp.md docs: comprehensive 2-week sweep of feature/PR coverage gaps (#28497) 2026-05-18 23:55:25 -07:00
memory-providers.md
memory.md
overview.md feat: auto-launch Chromium-family browser for CDP 2026-05-19 22:34:05 -07:00
personality.md
plugins.md
provider-routing.md
skills.md docs(skills): clarify external dir mutations 2026-05-20 12:41:38 -07:00
skins.md
spotify.md
subscription-proxy.md
tool-gateway.md
tools.md
tts.md
vision.md docs: comprehensive 2-week sweep of feature/PR coverage gaps (#28497) 2026-05-18 23:55:25 -07:00
voice-mode.md
web-dashboard.md
web-search.md docs(web-search): document xAI Web Search backend (#29052) 2026-05-19 20:11:37 -07:00
x-search.md fix(x_search): surface degraded results + validate dates 2026-05-21 02:38:45 +05:30