stealth_mode
💀🕷️ STEALTH MODE — mask the foundational model behind a house label.
Star’s response header opens with the model that produced the turn:
[`gemini-3.1-pro-preview` :: 😈🌀 :: she moves :: `needle_judo`]
That corporate nametag does real damage in queer spaces: people who are
already wary of AI see a Google (or OpenAI, or Anthropic) string, decide
the conversation is surveillance or ecocide, and leave before Star ever
gets to open her mouth. Stealth mode replaces the nametag — whatever
the underlying route resolved to — with STEALTH_MODEL_LABEL.
This is presentation only. Routing, quotas, per-user !gpt/!model
overrides and the privilege gates are all untouched; the mask is applied
to the display label the prompt context hands Star and to the label the
post-processor stamps back into the header.
Scope & precedence
Stealth is channel-scoped and tri-state, keyed at
stargazer:toggle:stealth:{platform}:{channel_id}:
"1"— explicitly ON for this channel"0"— explicitly OFF for this channel (beats a surface default)absent — fall through to the surface default
The surface default is ON for the two front doors aimed at people who
never opted into “an AI product”: the Stargazer Lens browser
extension / /stargazer route, and Babystar’s Dollhouse web
playpen. Everywhere else it is OFF, so Discord regulars keep seeing the
real model.
Discord’s bot and selfbot adapters share one numeric channel ID, so
lookups resolve across the discord / discord-self alias pair the
same way feature_toggles does.
- stealth_mode.FEATURE = 'stealth'
Toggle feature name — shares
feature_toggles’ key namespace.
- stealth_mode.channel_key_for(msg)
Return the
"{platform}:{channel_id}"key stealth is stored under.Uses
context_channel_idso a/stargazerturn — which rides a throwawaysg:lens:{uuid}reply channel — resolves against the channel the user is actually sitting in rather than a UUID that can never match anything they configured.- Return type:
- Parameters:
msg (IncomingMessage)
- stealth_mode.is_lens_surface(msg)
Return
Truewhen this turn arrived through the Stargazer Lens.Covers both Lens front doors: the browser extension posting to
/api/lens/prompt(platform == "lens") and the Discord/stargazerslash command, which keepsplatform == "discord"but routes its reply through a syntheticsg:lens:{uuid}channel.- Return type:
- Parameters:
msg (IncomingMessage)
- stealth_mode.is_dollhouse_surface(msg)
Return
Truewhen this turn came from Babystar’s Dollhouse. 🍼🏠- Return type:
- Parameters:
msg (IncomingMessage)
- stealth_mode.surface_default(msg)
Return the stealth default for msg’s surface, absent an explicit key.
ON for the Lens and the Dollhouse — the two surfaces that meet people who never signed up for “an AI product” — and OFF everywhere else.
- Return type:
- Parameters:
msg (IncomingMessage)
- async stealth_mode.explicit_state(redis, channel_key)
Return the explicitly stored stealth state, or
Noneif unset.Checks every Discord alias variant of channel_key and returns the first explicit value in variant order, so a toggle written under
discord:governsdiscord-self:traffic in the same room and vice versa. All variants are read in one concurrent batch rather than up to three serial round trips — this sits on the pre-inference hot path of every turn.- Parameters:
redis (Redis | None) – Async Redis client, or
Nonewhen Redis is unavailable.channel_key (str) –
"{platform}:{channel_id}".
- Return type:
bool | None
- Returns:
True(forced on),False(forced off), orNone(no key).
- async stealth_mode.is_stealth_enabled(redis, msg)
Return
Truewhen this turn’s model nametag must be masked.Explicit per-channel state wins; otherwise the surface default applies. Never raises — a Redis failure degrades to the surface default so a backend hiccup can’t unmask the Dollhouse or the Lens.
- Return type:
bool
- Parameters:
redis (Redis | None)
msg (IncomingMessage)
- async stealth_mode.set_stealth(redis, channel_key, enabled)
Persist an explicit stealth state for channel_key.
Both states are written rather than deleting on off, because
offhas to be able to override a surface default that would otherwise turn stealth back on for the Lens and the Dollhouse.
- async stealth_mode.clear_stealth(redis, channel_key)
Drop the explicit state so channel_key falls back to its default.