Skip to content

fix(drive-thru): assume unstated quantity is one#2074

Merged
u9g merged 1 commit into
mainfrom
promos-bellowed-saying
Jul 20, 2026
Merged

fix(drive-thru): assume unstated quantity is one#2074
u9g merged 1 commit into
mainfrom
promos-bellowed-saying

Conversation

@rosetta-livekit-bot

@rosetta-livekit-bot rosetta-livekit-bot Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Summary

Ports livekit/agents#6463 to the JS drive-thru example prompt.

The drive-thru agent now treats an unstated quantity as one, while continuing to avoid assuming other missing order details.

Source diff coverage

Coverage classification
Source file Classification Target file Notes
examples/drive-thru/database.py Ported examples/src/drive-thru/database.ts Ported the prompt behavior to the TypeScript counterpart. Adapted Python string-concatenation wording into the target's existing template literal and prompt structure: added unstated quantity = one, and narrowed the no-assumptions rule to details other than quantity.

No source tests were added or modified in livekit/agents#6463, so no tests were ported.

Validation

  • pnpm exec turbo run build --concurrency=1 passed.
  • pnpm lint passed with existing warnings.
  • pnpm format:check passed.
  • pnpm --filter livekit-agents-examples lint passed with existing warnings.
  • pnpm --filter livekit-agents-examples build initially failed before dependent package artifacts existed, then passed as part of the successful full build.
  • pnpm --filter livekit-agents-examples test failed in existing LLM-driven tests after dependencies were built:
    • src/testing/agent_task.test.ts: missing expected FunctionCallOutputEvent after captureEmail handoff.
    • src/drive-thru/test_agent.test.ts: should handle ordering multiple sauces added both mayonnaise sauces, but the last event was a tool output rather than the expected assistant confirmation.
    • One OpenAI inference request timed out during the drive-thru test run.

Ported from livekit/agents#6463

Original PR description

Summary

test_consecutive_order has flaked twice on main in the last week (runs 29438348555 and 29261765536, both on commits unrelated to the drive-thru eval). In both cases the model responded to "Can I get a keychup sauce and a McFlurry Oreo ?" with a clarifying question ("Just to check, did you want just one of each?") instead of calling order_regular_item, so contains_function_call found no tool call.

#6383 fixed the stated-quantity variant of this ("two mayonnaise sauces" → add twice without confirming). This extends the same instruction bullet to cover the unstated-quantity case: if no quantity is stated, assume one and add the item without confirming the count.

Testing

Ran examples/drive-thru/test_agent.py::test_consecutive_order 4 times locally with the change — 4/4 passed.

@rosetta-livekit-bot
rosetta-livekit-bot Bot requested a review from a team as a code owner July 20, 2026 13:08
@changeset-bot

changeset-bot Bot commented Jul 20, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: a8cc10f

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@rosetta-livekit-bot
rosetta-livekit-bot Bot requested a review from u9g July 20, 2026 13:08

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

@u9g
u9g merged commit 86f1ecc into main Jul 20, 2026
5 checks passed
@u9g
u9g deleted the promos-bellowed-saying branch July 20, 2026 13:09
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