Skip to content

inc idle_timeout_secs to 300#246

Merged
vizsatiz merged 3 commits intodevelopfrom
fix/pipecat_idle_timeout_detection
Mar 19, 2026
Merged

inc idle_timeout_secs to 300#246
vizsatiz merged 3 commits intodevelopfrom
fix/pipecat_idle_timeout_detection

Conversation

@rootflo-hardik
Copy link
Copy Markdown
Contributor

@rootflo-hardik rootflo-hardik commented Mar 18, 2026

  • also added UserStartedSpeakingFrame and BotStartedSpeakingFrame as idle_timeout_frame

Summary by CodeRabbit

  • Improvements
    • Added frame-accurate idle detection alongside seconds-based timing for more precise activity handling.
    • Increased idle timeout to 300 seconds to reduce premature call termination and improve session stability.

- also added UserStartedSpeakingFrame and BotStartedSpeakingFrame as idle_timeout_frame
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 18, 2026

📝 Walkthrough

Walkthrough

Updated pipecat_service to import four speaking frame types and configure PipelineTask with idle_timeout_frames (frame-precise) in addition to idle_timeout_secs, raising the effective idle timeout to 300 seconds.

Changes

Cohort / File(s) Summary
Frame-based Idle Timeout Configuration
wavefront/server/apps/call_processing/call_processing/services/pipecat_service.py
Added imports for BotSpeakingFrame, BotStartedSpeakingFrame, UserSpeakingFrame, UserStartedSpeakingFrame. PipelineTask invocation updated to include idle_timeout_frames (frame-precise) alongside idle_timeout_secs, increasing the configured idle timeout to 300 seconds.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

A rabbit counts frames in a cheerful race, 🐰
Bots and users speaking, each finds its place,
Frames tune the timeout, precise and neat,
Three hundred seconds keep the flow sweet,
Hopping through code with a smiling face. ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Title check ⚠️ Warning The title states 'inc idle_timeout_secs to 300' but the PR objectives indicate the increase is to 50, and the changes show both idle_timeout_secs and idle_timeout_frames being added. The title is partially related but contains a factual discrepancy with the stated objectives. Update the title to accurately reflect the changes, such as 'Increase idle_timeout_secs to 50 and add idle_timeout_frames' to match the PR objectives and actual implementation.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/pipecat_idle_timeout_detection
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
wavefront/server/apps/call_processing/call_processing/services/pipecat_service.py (1)

565-571: Consider tracking timeout-impact metrics after rollout.

Recommend monitoring idle-triggered cancellations and average silent call duration to confirm the 50s threshold improves UX without increasing dead-air call time.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@wavefront/server/apps/call_processing/call_processing/services/pipecat_service.py`
around lines 565 - 571, Add telemetry around the idle timeout behavior defined
by idle_timeout_secs and idle_timeout_frames (BotSpeakingFrame,
UserSpeakingFrame, BotStartedSpeakingFrame, UserStartedSpeakingFrame) so we can
measure impact after rollout: increment a counter (e.g.,
idle_triggered_cancellations) whenever a call is cancelled due to the idle
timeout in the pipecat_service cancellation path, and record a histogram/summary
(e.g., silent_call_duration_seconds) of the silent period length that led to the
timeout; use the existing metrics client used elsewhere in this module to emit
these metrics at the exact points where the idle timeout is detected and where
the cancellation is performed to enable tracking average silent duration and
rate of idle-triggered cancellations.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In
`@wavefront/server/apps/call_processing/call_processing/services/pipecat_service.py`:
- Around line 565-571: Add telemetry around the idle timeout behavior defined by
idle_timeout_secs and idle_timeout_frames (BotSpeakingFrame, UserSpeakingFrame,
BotStartedSpeakingFrame, UserStartedSpeakingFrame) so we can measure impact
after rollout: increment a counter (e.g., idle_triggered_cancellations) whenever
a call is cancelled due to the idle timeout in the pipecat_service cancellation
path, and record a histogram/summary (e.g., silent_call_duration_seconds) of the
silent period length that led to the timeout; use the existing metrics client
used elsewhere in this module to emit these metrics at the exact points where
the idle timeout is detected and where the cancellation is performed to enable
tracking average silent duration and rate of idle-triggered cancellations.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 1a597076-70ac-485f-a94a-fb841c3876ec

📥 Commits

Reviewing files that changed from the base of the PR and between 6baf88a and 294dfb4.

📒 Files selected for processing (1)
  • wavefront/server/apps/call_processing/call_processing/services/pipecat_service.py

# Conflicts:
#	wavefront/server/apps/call_processing/call_processing/services/pipecat_service.py
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
wavefront/server/apps/call_processing/call_processing/services/pipecat_service.py (1)

655-661: Consider moving idle-timeout tuning to config instead of hardcoding.

idle_timeout_secs=50 (and optionally the frame tuple) would be easier to tune per environment if sourced from agent/env config rather than being fixed in code.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@wavefront/server/apps/call_processing/call_processing/services/pipecat_service.py`
around lines 655 - 661, The idle timeout values are hardcoded—update the code
that sets idle_timeout_secs (and optionally idle_timeout_frames) to read from
configuration/environment instead: add a configurable value (e.g.,
AGENT_IDLE_TIMEOUT_SECS or a setting on the service config) with a sensible
default of 50 and use that variable where idle_timeout_secs is passed;
similarly, if you want frames to be tunable, expose the tuple via config (e.g.,
AGENT_IDLE_TIMEOUT_FRAMES or service_config.idle_timeout_frames) and fall back
to the current tuple. Locate the call that supplies idle_timeout_secs and
idle_timeout_frames (the call site constructing the object with those kwargs)
and replace the literal 50 and literal tuple with the config-backed variables,
validating/converting the env var to an int/list as needed.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In
`@wavefront/server/apps/call_processing/call_processing/services/pipecat_service.py`:
- Around line 655-661: The idle timeout values are hardcoded—update the code
that sets idle_timeout_secs (and optionally idle_timeout_frames) to read from
configuration/environment instead: add a configurable value (e.g.,
AGENT_IDLE_TIMEOUT_SECS or a setting on the service config) with a sensible
default of 50 and use that variable where idle_timeout_secs is passed;
similarly, if you want frames to be tunable, expose the tuple via config (e.g.,
AGENT_IDLE_TIMEOUT_FRAMES or service_config.idle_timeout_frames) and fall back
to the current tuple. Locate the call that supplies idle_timeout_secs and
idle_timeout_frames (the call site constructing the object with those kwargs)
and replace the literal 50 and literal tuple with the config-backed variables,
validating/converting the env var to an int/list as needed.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 87c58268-50c9-4fb8-a815-f24688b3898c

📥 Commits

Reviewing files that changed from the base of the PR and between 294dfb4 and f1b7c38.

📒 Files selected for processing (1)
  • wavefront/server/apps/call_processing/call_processing/services/pipecat_service.py

@rootflo-hardik rootflo-hardik changed the title inc idle_timeout_secs to 50 inc idle_timeout_secs to 300 Mar 19, 2026
@vizsatiz vizsatiz merged commit e87259f into develop Mar 19, 2026
10 checks passed
@vizsatiz vizsatiz deleted the fix/pipecat_idle_timeout_detection branch March 19, 2026 13:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants