Skip to content

Relay provider rejection reasons to the model on retry - #157

Merged
DavertMik merged 2 commits into
mainfrom
fix/invalid-request-retry-feedback
Aug 28, 2026
Merged

Relay provider rejection reasons to the model on retry#157
DavertMik merged 2 commits into
mainfrom
fix/invalid-request-retry-feedback

Conversation

@DenysKuchma

Copy link
Copy Markdown
Collaborator

Summary

Requests the provider rejects as invalid (400) — tool names with channel markers invented tool names, malformed arguments — were retried blind: same context, new dice, no feedback. That cost 24 → 49 → 76 wasted generations across the last three overnight runs. The retry now appends the provider's own rejection message verbatim to the next attempt (detected purely by error type and status code, no text matching), so the model sees exactly what it broke and self-corrects in one step. The feedback is retry-scoped: never persisted to the conversation or any stored state. Also isolates provider unit tests from the machine's ~/.explorbot (a stray unhandled loadConfig was failing random tests locally).

@DenysKuchma
DenysKuchma requested a review from DavertMik August 28, 2026 16:20
@DavertMik
DavertMik merged commit 740ef68 into main Aug 28, 2026
2 checks passed
@DavertMik
DavertMik deleted the fix/invalid-request-retry-feedback branch August 28, 2026 18:24
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