Skip to content

fix(hotel_receptionist): say a refused confirm booked nothing - #6802

Open
u9g wants to merge 1 commit into
mainfrom
fix/hotel-refusal-states-outcome
Open

fix(hotel_receptionist): say a refused confirm booked nothing#6802
u9g wants to merge 1 commit into
mainfrom
fix/hotel-refusal-states-outcome

Conversation

@u9g

@u9g u9g commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Summary

confirm_booking / confirm_reservation raised ToolError(self._status()) when a required field was still missing. _status() is progress text — it says what to do next, never that nothing was booked — and the is_error flag doesn't reach the model, because the OpenAI provider format sends the string as the whole tool message. So the refusal read as a routine step, and the model went on to tell the caller they were booked, often with an invented confirmation code copied from one it had already spoken earlier in the call.

Both tasks now have a refusal-only string that states the outcome first and appends _status() as context. Lifted from #6567 so it doesn't wait on that PR.

Testing

  • .venv/bin/python -m pytest --unit (1942 passed, 5 skipped)
  • ruff format --check / ruff check clean on both files

confirm_booking / confirm_reservation raised ToolError(self._status())
when a required field was still missing. _status() is progress text - it
says what to do next, never that nothing was booked - and the is_error
flag doesn't reach the model, because the OpenAI provider format sends
the string as the whole tool message. So the refusal read as a routine
step and the model went on to tell the caller they were booked, often
with an invented confirmation code copied from one it had already
spoken earlier in the call.

Give the refusal path its own text that states the outcome first and
appends _status() as context.
@u9g
u9g requested a review from a team as a code owner August 11, 2026 20:13

@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 potential bugs to report.

View in Devin Review to see 1 additional finding.

Open in Devin Review

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