Skip to content

broker: REASONING_EFFORT knob for reasoning-line Realtime models - #7

Draft
jayzuccarelli wants to merge 1 commit into
mainfrom
reasoning-effort-knob
Draft

broker: REASONING_EFFORT knob for reasoning-line Realtime models#7
jayzuccarelli wants to merge 1 commit into
mainfrom
reasoning-effort-knob

Conversation

@jayzuccarelli

@jayzuccarelli jayzuccarelli commented Jul 21, 2026

Copy link
Copy Markdown
Owner

What

Adds a REASONING_EFFORT env knob (minimal/low/medium/high/xhigh) that injects reasoning: {effort} into every session.update. Pipecat 0.0.97's SessionProperties has no reasoning field and pydantic serializes by declared type, so the broker's service subclass injects it into the wire dict in send_client_event. Unset = field not sent (required for non-reasoning models like gpt-realtime); zero behavior change by default.

Why

gpt-realtime-2.1 is a reasoning-line Realtime model; its server-default effort (low) pads spoken replies and adds latency. This knob makes 2.1-line models testable/usable without prompt hacks.

Bench (2026-07-21, isolated 8766/8767, hygiene off, paired same-hour runs)

config scenarios first-audio p50 notes
gpt-realtime (live) 8/10, 10/10 97-154ms occasional flake, not model-specific
gpt-realtime-2.1 + minimal 8/10, 10/10, 9/10, 10/10 500-680ms replies now one-liners (verbosity fixed)

Verdict: minimal effort fixes 2.1's wordiness but 2.1 stays ~400-500ms behind on first-audio in this stack, so live keeps MODEL=gpt-realtime.

🤖 Generated with Claude Code

gpt-realtime-2.1 is a reasoning-line model; its server default effort (low)
pads spoken replies and adds latency. Pipecat 0.0.97's SessionProperties has
no reasoning field and pydantic serializes by declared type, so the broker
injects reasoning.effort into the session.update wire dict when
REASONING_EFFORT is set. Unset = field not sent (required for non-reasoning
models like gpt-realtime); zero behavior change by default.

Benched 2026-07-21 (isolated 8766/8767, hygiene off, paired same-hour runs):
minimal effort fixes 2.1's verbosity (one-liner replies) but first-audio
p50 stays 500-680ms vs 97-292ms on live gpt-realtime, so the live model
keeps MODEL=gpt-realtime for now. Part of JAY-92.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: a895b2c4-5a0f-4850-b9f3-aef0674811d6

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch reasoning-effort-knob

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.

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.

1 participant