what is causing this issue? line 364, in _bounce_...
# ask-ai
c
what is causing this issue? line 364, in _bounce_eou_task\n and end_of_turn_probability < unlikely_threshold\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nTypeError: '<' not supported between instances of 'float' and 'coroutine'", "timestamp": "2025-07-29T001744.774219+00:00"} /Users/clementhublin/Desktop/Livekit_repo_2/mirror-livekit-backend/venv/lib/python3.12/site-packages/pydantic/_internal/_generate_schema.py781 RuntimeWarning: coroutine 'EOUModelBase.unlikely_threshold' was never awaited {*fields.keys(), *computed_fields.keys()}, RuntimeWarning: Enable tracemalloc to get the object allocation traceback
t
Thanks for reaching out, Clovis. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Could you provide more details about the code or context where this error occurs? Specifically, it would help to know:
c
I think your message got cut off, what were you gonna say?
t
Hey there! 👋 I see you're running into a tricky async code issue. No worries—we'll figure this out together! Could you help me out with a few details that'll help me understand what's going on? 🕵️‍♀️ • Can you tell me which function or module is using
end_of_turn_probability
and
unlikely_threshold
? • Is
unlikely_threshold
an async function or a coroutine? • Have there been any recent code changes that might be causing this? The more info you can share, the better we can track down this bug. I'm totally here to help you solve this! 💪
c
I don't have any single instance of end_of_turn_probability nor unlikely_threshold in my code, I only have this:
Copy code
if turn_detection_mode == 'eou_vad':
        # EOU (End of Utterance) + VAD mode - uses AI model + voice detection
        if turn_detection_language == 'multilingual':
            session_kwargs['turn_detection'] = MultilingualModel()
            <http://logger.info|logger.info>(":earth_africa: Using Multilingual EOU Model")
        else:
            session_kwargs['turn_detection'] = EnglishModel()
            <http://logger.info|logger.info>(":us: Using English-only EOU Model")
        
        # EOU + VAD: All timing parameters apply
        session_kwargs.update({
            'min_endpointing_delay': min_endpointing_delay,
            'max_endpointing_delay': max_endpointing_delay,
            'min_interruption_duration': min_interruption_duration,
        })
        <http://logger.info|logger.info>(f":dart: EOU+VAD Timing: min_endpointing={min_endpointing_delay}s max_endpointing={max_endpointing_delay}s min_interruption={min_interruption_duration}s")
t
Hey there! I noticed you're experiencing an issue that might be connected to turn detection. I'm wondering if you've implemented any custom logic for the MultilingualModel or EnglishModel? If you have, it would be super helpful if you could share the specific code sections, especially anything related to how you're handling end-of-turn detection or setting thresholds. I'm here to help you troubleshoot this! Sources: tests/test_vad.py | metrics/metrics_stt.py
c
well it's just that, and then I create the session like this:
# Create session with configured parameters
session = AgentSession(**session_kwargs)
t
Hey there! Could you help me out by sharing the full traceback of the error? I'm wondering if any of the parameters passed to AgentSession (like min_endpointing_delay, max_endpointing_delay, or min_interruption_duration) might be coming from async functions. That could give us a clue about whether an unawaited coroutine might be causing this tricky issue. Let me know what you find! Sources: livekit-plugins/livekit-plugins-bey/livekit/plugins/bey/avatar.py