Repository navigation
fix(native): drop the dead-key moderation guardrail — every guarded run 401'd before its model - #912
Merged
Merged
Conversation
…un 401'd before its model The Guide's first live smoke run failed with "Incorrect API key provided: placeholder" from platform.openai.com — not the model (deepseek-v4-flash authenticates fine, probed) but the openai-moderation-enforce guardrail, whose OPENAI_API_KEY is the literal placeholder. Every guarded native run dies on the guardrail before reaching any model, which is also the probable cause of the native fleet's 98% July failure rate (predating the August LiteLLM outage the #891 review surfaced). NATIVE_RUNTIME_GUARDRAILS becomes helm-tracked (a kubectl-set env is drift the next upgrade reverts — the #900 lesson) and dev pins it to injection-guard only: LiteLLM-native, keyless, and the guardrail that actually matters for untrusted input. Restore the moderation layer when a real OpenAI key lands in the api-keys secret. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01XeUH4HVDsDHYPsHJthXjB8
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Guide's first live smoke run (fresh signup on dev, first hello) failed with
Incorrect API key provided: placeholderfrom platform.openai.com — while a direct probe ofdeepseek-v4-flashthrough the same LiteLLM path authenticates fine. The 401 is theopenai-moderation-enforceguardrail, whoseOPENAI_API_KEYis the literal stringplaceholder: every guarded native run has been dying on the guardrail before reaching any model. Timeline note: this is also the probable cause of the native fleet's 98% July failure rate (guardrails validated 2026-07-01; the AugustECONNREFUSEDwall the #891 review found was layered on top).Fix:
NATIVE_RUNTIME_GUARDRAILSbecomes a helm-tracked backend env (the documented off-switch, but through values — akubectl set envis drift the next upgrade reverts, per the fix(helm): per-agent replicas knob — a parked cloud-codex agent must stay parked #900 lesson).injection-guardonly: it's LiteLLM-native (keyless, no external service) and is the layer that matters for untrusted input. The moderation layer returns when a real OpenAI key lands in the api-keys secret (Sam credential decision, noted in the values comment).Render-verified (
helm templateshows the env; lint clean). Post-merge deploy + the Guide smoke test rerun is the verification.🤖 Generated with Claude Code
https://claude.ai/code/session_01XeUH4HVDsDHYPsHJthXjB8