web: gate anonymous grounding behind a runtime feature flag (showcase-with-kill-switch) #191

Closed
opened 2026-07-19 09:26:58 +00:00 by grenade · 0 comments
Owner

Part of #177.

Anonymous chat sessions at helexa.ai currently offer the grounding tools unconditionally (useChat sends web_search + read_page on every request), but helexa/small (Qwen3-1.7B) essentially never emits a tool call — so first-time visitors see no grounding capability at all. We may never get a second chance to impress that visitor.

Decision: support anonymous web search deliberately, as a gated mechanism that can be turned off in seconds when abused:

  • [features] anon_web_search in helexa-upstream config (default true), exposed on a public unauthenticated GET /web/v1/features.
  • The SPA reads it at chat load and gates whether tools are offered to anonymous sessions; fail-closed for anonymous when the endpoint is unreachable. Signed-in sessions keep tools unconditionally.
  • Kill switch = add anon_web_search = false to helexa-upstream.toml on gallumbits + restart. No site rebuild, no nginx edit.

Not a security boundary: /tools/* stays per-IP rate-limited at the edge regardless of the flag; hard-off for the backends remains stopping the helexa-tools / SearXNG services.

Known limitation, accepted for now: the anonymous tier model (1.7B) tool-calls unreliably, so the showcase is weak until a tool-capable small model serves the anon tier — tracked in the Gemma 4 small-models issue.

Part of #177. Anonymous chat sessions at helexa.ai currently *offer* the grounding tools unconditionally (`useChat` sends `web_search` + `read_page` on every request), but `helexa/small` (Qwen3-1.7B) essentially never emits a tool call — so first-time visitors see no grounding capability at all. We may never get a second chance to impress that visitor. Decision: support anonymous web search deliberately, as a **gated mechanism** that can be turned off in seconds when abused: - `[features] anon_web_search` in helexa-upstream config (default `true`), exposed on a public unauthenticated `GET /web/v1/features`. - The SPA reads it at chat load and gates whether tools are offered to anonymous sessions; **fail-closed** for anonymous when the endpoint is unreachable. Signed-in sessions keep tools unconditionally. - Kill switch = add `anon_web_search = false` to `helexa-upstream.toml` on gallumbits + restart. No site rebuild, no nginx edit. Not a security boundary: `/tools/*` stays per-IP rate-limited at the edge regardless of the flag; hard-off for the backends remains stopping the helexa-tools / SearXNG services. Known limitation, accepted for now: the anonymous tier model (1.7B) tool-calls unreliably, so the showcase is weak until a tool-capable small model serves the anon tier — tracked in the Gemma 4 small-models issue.
grenade added the p1-now label 2026-07-19 09:27:12 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: helexa/helexa#191