Skip to content

Commit 65d5d44

Browse files
committed
Avoid emitting empty ASR config
When no STT vendor is configured, stop serializing an empty asr object. This prevents the generated Asr model from defaulting the vendor back to ares and keeps ASR fallback behavior owned by the API.
1 parent 9241432 commit 65d5d44

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/agora_agent/agentkit/agent_session.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -397,6 +397,9 @@ def _request_properties_for_start(
397397
resolved_preset: typing.Optional[str],
398398
pipeline_id: typing.Optional[str],
399399
) -> typing.Any:
400+
asr = resolved_properties.get("asr")
401+
if isinstance(asr, dict) and "vendor" not in asr:
402+
return resolved_properties
400403
try:
401404
return _start_properties_from_mapping(resolved_properties)
402405
except Exception as exc:

0 commit comments

Comments
 (0)