LearnNewsExamplesServices
Frontmatter
id12983
titleWire the ask-path env (NEO_KB_ASK_*) into ai/deploy compose — cloud ask silently degrades to references-only without it
stateClosed
labels
bugaimodel-experience
assigneesneo-opus-grace
createdAtJun 12, 2026, 11:56 AM
updatedAtJun 21, 2026, 2:16 AM
githubUrlhttps://github.com/neomjs/neo/issues/12983
authorneo-opus-grace
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtJun 12, 2026, 9:15 PM

Wire the ask-path env (NEO_KB_ASK_*) into ai/deploy compose — cloud ask silently degrades to references-only without it

Closed v13.1.0/archive-v13-1-0-chunk-1 bugaimodel-experience
neo-opus-grace
neo-opus-grace commented on Jun 12, 2026, 11:56 AM

Context

Surfaced during the 13.0.0 publish-hold friction inventory (operator holding the npm publish on post-cut cloud-first-run items; @neo-fable consolidating, gave the explicit "file it"). Direct analog of #12972 (the add_memory health-gate) — a fresh v13 cloud deploy silently degrades a core MC capability.

The Problem

SearchService.ask (the ask_knowledge_base tool) builds its synthesis model from the dedicated askSynthesis config block (#12836): provider:'gemini', model:'gemini-2.5-flash', apiKey = the dedicated NEO_KB_ASK_API_KEY env (NOT the shared GEMINI_API_KEY — for budget-capping; + NEO_KB_ASK_PROVIDER). The canonical ai/deploy compose (docker-compose.yml / .dev.yml) wires NO ask-path env into the kb-server — verified rg "NEO_KB_ASK" ai/deploy/ = 0 hits (2026-06-12). So a fresh cloud deploy's ask_knowledge_base has no synthesis provider/key → degrades to references-only (no synthesized answer), exactly like local pre-rename. Silent (no crash; just a degraded answer with a degradedCode).

The Fix

Add ${NEO_KB_ASK_API_KEY:-} + ${NEO_KB_ASK_PROVIDER:-} (+ any askSynthesis runtime leaves, e.g. timeoutMsRemote) as pass-throughs to the deploy kb-server environment: — the key VALUE stays a runtime secret (never in compose), mirroring the secret pattern. This is the ask-path analog of the WAL env pass-through fix (#12874/#12875).

Operator-owned decision (Tier 4)

The cloud ask provider choice is the operator's call: gemini-2.5-flash (fast, but query + retrieved KB docs egress to Google) vs local ollama/openAiCompatible (private, but ~287s under REM-contention → fail-softs to refs). This ticket wires the pass-through machinery; the provider/key VALUE is the operator's runtime config decision. Same privacy/speed class as #12873 (the graph path).

Contract Ledger

Field Value
Target Surface ai/deploy/docker-compose.yml + .dev.yml kb-server environment:
Source of Authority #12836 (askSynthesis block + NEO_KB_ASK_API_KEY); #12874/#12875 (the WAL env pass-through precedent)
Proposed Behavior ${NEO_KB_ASK_*:-} pass-throughs added → cloud ask reaches its synthesis provider when the operator sets the runtime secret
Evidence rg "NEO_KB_ASK" ai/deploy/ = 0 hits (gap confirmed 2026-06-12); local repro: ask degrades to refs-only without the env (#12836 chain)

Acceptance Criteria

  • ${NEO_KB_ASK_API_KEY:-} + ${NEO_KB_ASK_PROVIDER:-} (+ relevant askSynthesis leaves) pass-throughs in the base + dev deploy compose kb-server env.
  • Secret VALUE stays runtime-only (never committed in compose).
  • Verified: a deploy with the runtime secret set → ask returns synthesis (not refs-only); without it → graceful refs-only fallback (current behavior, no crash). [L3-deferred — operator handoff needed] — requires a live cloud deploy with the runtime secret set; PR #13005 ships at L2 (compose-config validation + rendered pass-through proof) and declares this residual. Operator-verified post-merge.

Out of Scope

  • The provider/privacy choice (operator Tier-4).
  • The local-synthesis 287s root (REM-contention — #12873 / vega's lane).
  • The WAL-drain env (shipped #12874/#12875).

Related

#12836 (the askSynthesis block + dedicated key), #12874/#12875 (the WAL env pass-through precedent + pattern), #12873 (cloud provider routing — sibling privacy/speed decision), #12972 (the add_memory gate — sibling cloud-first-run degradation).

Surfaced in: the 13.0.0 publish-hold friction inventory (post-cut). Sweep: gh issue list --search "NEO_KB_ASK ask deploy compose" = no dup (2026-06-12). Release classification: publish-relevant (cloud-first-run quality — @neo-fable's consolidation, operator hold). Boardless per ticket-create §4.

Authored by Claude Opus 4.8 (Claude Code) / @neo-opus-grace (Grace).

tobiu referenced in commit 7b9d175 - "feat(deploy): wire ask-path env (NEO_KB_ASK_*) pass-throughs into kb-server compose (#12983) (#13005) on Jun 12, 2026, 9:15 PM
tobiu closed this issue on Jun 12, 2026, 9:15 PM