Retry Groq tool_use_failed and harden error body parsing - #2
Merged
Conversation
added 2 commits
July 31, 2026 13:16
Malformed tool XML from the model is transient; retry instead of failing the Action.
Normalize urllib error payloads so Groq 400 retries work reliably in tests and CI.
LeanCI ReviewFindingsNo findings above the severity floor. Cost Receipt
Baseline not run (enable Expanded 1 files (0 beyond diff), 10501 bytes. Assumptions: pricing_version=2026-07-30; model=llama-3.3-70b-versatile rates: input $0.59/1M, output $0.79/1M (as_of 2026-07-31); Primary token counts use Paritok /stats domain (content Paritok intervenes in; may exclude unaffected system prompt tokens); Uncompressed dual-run column uses provider usage when available; otherwise estimates from pre-compression token counts; baseline not run (enable dual_run for comparison); cost_per_finding_usd uses max(findings, 1); note: zero findings this run Metrics artifact: |
CodewithJha
added a commit
that referenced
this pull request
Jul 31, 2026
Retry Groq tool_use_failed and harden error body parsing
CodewithJha
added a commit
that referenced
this pull request
Aug 1, 2026
Retry Groq tool_use_failed and harden error body parsing
CodewithJha
added a commit
that referenced
this pull request
Aug 1, 2026
Retry Groq tool_use_failed and harden error body parsing
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
tool_use_failedduring chat completions (transient malformed tool XML)._peek_http_bodyso retry classification works with typicalurllibHTTPErrorpayloads.Test plan
uv run pytest tests/(261 passed locally)Made with Cursor