feat: add scoped read-only audio preview and isolated Dify transport

This commit is contained in:
2026-10-09 16:10:59 +08:00
parent 27772bec61
commit 4d0af7f3f4
36 changed files with 1517 additions and 68 deletions
+27
View File
@@ -2,6 +2,10 @@
# Only dify may reuse existing [prescription_ai] base/key. openai_audio needs MODEL; asr_then_llm needs both stage model/key/base triples.
[followup_audio]
ENABLED = false
PREVIEW_ONLY = false
# IDs only. Empty or invalid diagnosis allowlist denies preview; admin list never replaces RBAC.
TEST_DIAGNOSIS_IDS =
TEST_ADMIN_IDS =
AUDIO_VERIFIED = false
VERIFIED_PROFILES =
PROFILE = qwen
@@ -66,3 +70,26 @@ OPENAI_EXTRACTION_MAX_TOKENS = 8192
# The local Qwen run exhausted 8192 tokens with thinking=true; false produced JSON, not a quality pass.
# QWEN_EXTRACTION_ENABLE_THINKING = false
# OPENAI_EXTRACTION_ENABLE_THINKING = false
# Synthetic connection readiness only; never sets AUDIO_VERIFIED or allows clinical adoption.
QWEN_PREVIEW_VERIFIED_FINGERPRINT =
OPENAI_PREVIEW_VERIFIED_FINGERPRINT =
# Explicit per-stage protocol. No automatic fallback. Dify uses dedicated App keys only.
QWEN_ASR_PROTOCOL = openai
QWEN_ASR_BINDING_REVISION =
QWEN_EXTRACTION_PROTOCOL = openai
QWEN_EXTRACTION_BINDING_REVISION =
OPENAI_ASR_PROTOCOL = openai
OPENAI_ASR_BINDING_REVISION =
OPENAI_EXTRACTION_PROTOCOL = openai
OPENAI_EXTRACTION_BINDING_REVISION =
# For Dify: ASR_PROTOCOL=dify, EXTRACTION_PROTOCOL=dify_chat, RESPONSE_FORMAT=prompt_json.
# Every Dify stage needs a nonempty BINDING_REVISION. MODEL is expected identity, not sent.
# Dify App owns generation parameters: local max_tokens/response_format/thinking are NOT forwarded.
# Leave EXTRACTION_ENABLE_THINKING absent for Dify; set generation limits in the dedicated App.
# Changing that App requires a new binding revision and fresh preview fingerprint acceptance.
# asr_then_llm only: curl (default) or openssl_stream (explicit verified-TLS child process).
# No automatic transport fallback; changing this requires new fingerprint readiness.
HTTP_TRANSPORT = curl