cloud: also hide AI model/provider, cost and pipeline internals from client logs
Extend the sensitive-log filter so cloud users don't see which model powers the app (gemini/flash), token/cost lines, or the 2-pass window/shortlist internals — just clean transcription + clip progress. DEBUG_LOGS still shows everything locally.
This commit is contained in:
parent
29fed21495
commit
5bcdda38f6
1 changed files with 9 additions and 5 deletions
14
app.py
14
app.py
|
|
@ -541,13 +541,17 @@ def _scrub_secrets(line: str) -> str:
|
|||
return _CREDENTIAL_URL_RE.sub(r'\1***:***@', line)
|
||||
|
||||
|
||||
# Cloud users don't need (and shouldn't see) the ingest plumbing: proxy usage,
|
||||
# the YouTube downloader internals, cookies, etc. These are dropped from the
|
||||
# client view even when the line is emoji-prefixed. Never applied under
|
||||
# DEBUG_LOGS (local dev sees everything).
|
||||
# Cloud users don't need (and shouldn't see) implementation details: the ingest
|
||||
# plumbing (proxy / downloader / cookies) OR which AI model powers it, token
|
||||
# usage and cost. These are dropped from the client view even when the line is
|
||||
# emoji-prefixed. Never applied under DEBUG_LOGS (local dev sees everything).
|
||||
_SENSITIVE_LOG_RE = re.compile(
|
||||
# Ingest plumbing
|
||||
r'proxy|yt[-_ ]?dlp|youtube-?dl|cookie|residential|po[_ ]?token'
|
||||
r'|player_client|extractor|\bdownload|descarg',
|
||||
r'|player_client|extractor|\bdownload|descarg'
|
||||
# AI model / provider / cost / pipeline internals
|
||||
r'|gemini|openai|anthropic|\bflash\b|\bmodel\b|token|thinking'
|
||||
r'|\bcost\b|\$\s*[0-9]|scoring window|shortlist',
|
||||
re.IGNORECASE,
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue