feat: add scoped read-only audio preview and isolated Dify transport
This commit is contained in:
@@ -24,9 +24,10 @@ final class FollowupAudioDify
|
||||
if (empty($this->settings['enabled'])) {
|
||||
throw new FollowupAudioException('FEATURE_DISABLED');
|
||||
}
|
||||
if (!FollowupAudioProviderConfig::verified((string) ($task['model_key'] ?? ''), $this->settings, $this->provider)) {
|
||||
if (!FollowupAudioGate::ready((string) ($task['model_key'] ?? ''), $this->settings, $this->provider)) {
|
||||
throw new FollowupAudioException('AUDIO_NOT_VERIFIED');
|
||||
}
|
||||
FollowupAudioGate::assertScope((int) ($task['diagnosis_id'] ?? 0), (int) ($task['actor_id'] ?? 0), $this->settings);
|
||||
$resolved = FollowupAudioProviderConfig::resolve((string) $task['model_key'], $this->settings, $this->provider);
|
||||
if ($resolved['driver'] !== 'asr_then_llm' && (int) ($task['upstream_started_at'] ?? 0) > 0) {
|
||||
throw new FollowupAudioException('RECONCILIATION_REQUIRED', true);
|
||||
|
||||
Reference in New Issue
Block a user