fix(drive-thru): assume unstated quantity is one#2074
Merged
Conversation
|
u9g
approved these changes
Jul 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
examples/drive-thru/database.pyexamples/src/drive-thru/database.tsNo source tests were added or modified in livekit/agents#6463, so no tests were ported.
Validation
pnpm exec turbo run build --concurrency=1passed.pnpm lintpassed with existing warnings.pnpm format:checkpassed.pnpm --filter livekit-agents-examples lintpassed with existing warnings.pnpm --filter livekit-agents-examples buildinitially failed before dependent package artifacts existed, then passed as part of the successful full build.pnpm --filter livekit-agents-examples testfailed in existing LLM-driven tests after dependencies were built:src/testing/agent_task.test.ts: missing expectedFunctionCallOutputEventaftercaptureEmailhandoff.src/drive-thru/test_agent.test.ts:should handle ordering multiple saucesadded both mayonnaise sauces, but the last event was a tool output rather than the expected assistant confirmation.Ported from livekit/agents#6463
Original PR description
Summary
test_consecutive_orderhas 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 callingorder_regular_item, socontains_function_callfound 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_order4 times locally with the change — 4/4 passed.