Skip to content

fix(tier3): keep the Bedrock label on strict judge errors that move on - #359

Merged
rng1995 merged 1 commit into
mainfrom
naren/followup-343-bedrock-label
Nov 6, 2026
Merged

rng1995 merged 1 commit into
mainfrom
naren/followup-343-bedrock-label

Conversation

@rng1995

@rng1995 rng1995 commented Nov 6, 2026

Copy link
Copy Markdown
Collaborator

Summary

Follow-up to #343, which merged before its last review round. #343 adds LLM_JUDGE_RETRY_POLICY=strict. Under that policy, a Bedrock error that hands the judge to the next model is re-raised from _call_bedrock and labeled by _strict_judge_failure as Public provider call failed: .... A Bedrock error that ends the judge is still returned by _call_bedrock as Bedrock request failed: .... The legacy policy also uses Bedrock request failed.

Example on main: a strict Bedrock judge whose primary and fallback models both return ResourceNotFoundException reports:

LLM judge model fallback exhausted: vendor/primary: Public provider call failed: Model not found | vendor/backup: Public provider call failed: Model not found

A throttled primary followed by a fallback that rejects maxTokens reports both labels in one error. The outcomes are correct, but the wording points Bedrock operators to the wrong provider.

  • _strict_judge_failure now takes the provider. _call_strict_judge passes it in, so a Bedrock error that moves on (throttling, AccessDeniedException, ResourceNotFoundException, an invalid model identifier, an unreachable endpoint) reads Bedrock request failed: ..., the same as one that ends the judge.
  • Other providers keep Public provider call failed: .... HTTP errors, refusals and used-up request limits keep their own text.
  • No documentation or CHANGELOG change. The docs and the unreleased feat(tier3): add opt-in judge fallback and strict retry policies #343 entry do not describe the error wording, and the policy's outcomes do not change.

Why

When a strict judge fails, the error lists each model that was tried. Every Bedrock entry in that list should carry the Bedrock label. Then an operator reading a report can tell at once that the failures came from Bedrock, and the text matches the legacy policy's errors for the same request.

Kept from public

Tests

  • New test_strict_bedrock_errors_that_move_on_keep_the_bedrock_label in tests/tier3/test_judge_policies.py, with 3 cases: model not found, throttled, and endpoint unreachable. Each checks the full exhausted error and the requests sent to each model. All 3 fail on main and pass with this change.
  • test_strict_bedrock_stop_keeps_the_errors_of_earlier_models now checks the full error, so both entries carry the Bedrock label. It also fails on main.
  • tests/tier3/test_judge_policies.py: 88 passed.
  • tests/tier3, tests/test_retry.py and tests/test_verifier_error_redaction.py on current main plus this change: 9643 passed, 3 skipped.
  • ruff check and ruff format --check are clean on the changed files, and scripts/check_oss_boundary.py passes.

🤖 Generated with Claude Code

Under LLM_JUDGE_RETRY_POLICY=strict, a Bedrock error that hands the judge
to the next model (throttling, a missing or inaccessible model, an
unreachable endpoint) was labeled "Public provider call failed", while a
Bedrock error that ended the judge kept "Bedrock request failed". Pass
the provider to _strict_judge_failure so both read "Bedrock request
failed", as the legacy policy does.

Signed-off-by: Narendran Raghavan <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>

@chrisknvidia chrisknvidia left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Reviewed. Passing the provider into _strict_judge_failure from both _converse and _call_strict_judge makes a Bedrock error that moves on read the same as one that ends the judge, and the parametrized model-not-found / throttled / endpoint-unreachable cases check both the label and the model order. The legacy loop's Public provider call failed for <model> path is untouched, which matches the summary. Nothing blocking from me.

@rng1995
rng1995 marked this pull request as ready for review November 6, 2026 12:20
@rng1995
rng1995 merged commit af50680 into main Nov 6, 2026
22 checks passed
@rng1995
rng1995 deleted the naren/followup-343-bedrock-label branch November 6, 2026 12:21
rng1995 added a commit that referenced this pull request Nov 6, 2026
…Unreleased

Nine PRs merged after the v0.8.0 tag (8149356). Four of them rewrote
bullets inside the 0.8.0 section and one added a new bullet there, so
main's 0.8.0 notes described behavior that 0.8.0 does not have. Two
fixes to 0.8.0 features added no entry.

- Restore the 0.8.0 section and everything below it to the tagged text,
  byte for byte.
- Move the agent skill entry (#366) to Unreleased, Added.
- Add Documentation entries for the 0.8.0 wording that #360, #361 and
  #363 corrected (refusal coverage error, inline short texts, capitalized
  HTTP prose that still warns).
- Add Fixed entries for #361, #365, #359, #364 and #363 that describe
  only what changed after 0.8.0. The #364 entry states that path masking
  skips text after a non-file: URL up to the next whitespace, which is
  how main behaves today.
- Move the #348 entry to Fixed and say what 0.8.0 did: a CI-redacted PII
  finding kept the digest of its unmasked value.
- The refusal docs test now reads the Documentation correction, which
  matches the docs, and still requires the switch's entry in 0.8.0.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Narendran Raghavan <[email protected]>
rng1995 added a commit that referenced this pull request Nov 6, 2026
…Unreleased

Nine PRs merged after the v0.8.0 tag (8149356). Four of them rewrote
bullets inside the 0.8.0 section and one added a new bullet there, so
main's 0.8.0 notes described behavior that 0.8.0 does not have. Two
fixes to 0.8.0 features added no entry.

- Restore the 0.8.0 section and everything below it to the tagged text,
  byte for byte.
- Move the agent skill entry (#366) to Unreleased, Added.
- Add Documentation entries for the 0.8.0 wording that #360, #361 and
  #363 corrected (refusal coverage error, inline short texts, capitalized
  HTTP prose that still warns).
- Add Fixed entries for #361, #365, #359, #364 and #363 that describe
  only what changed after 0.8.0. The #364 entry states that path masking
  skips text after a non-file: URL up to the next whitespace, which is
  how main behaves today.
- Move the #348 entry to Fixed and say what 0.8.0 did: a CI-redacted PII
  finding kept the digest of its unmasked value.
- The refusal docs test now reads the Documentation correction, which
  matches the docs, and still requires the switch's entry in 0.8.0.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Narendran Raghavan <[email protected]>
rng1995 added a commit that referenced this pull request Nov 6, 2026
…Unreleased (#371)

Nine PRs merged after the v0.8.0 tag (8149356). Four of them rewrote
bullets inside the 0.8.0 section and one added a new bullet there, so
main's 0.8.0 notes described behavior that 0.8.0 does not have. Two
fixes to 0.8.0 features added no entry.

- Restore the 0.8.0 section and everything below it to the tagged text,
  byte for byte.
- Move the agent skill entry (#366) to Unreleased, Added.
- Add Documentation entries for the 0.8.0 wording that #360, #361 and
  #363 corrected (refusal coverage error, inline short texts, capitalized
  HTTP prose that still warns).
- Add Fixed entries for #361, #365, #359, #364 and #363 that describe
  only what changed after 0.8.0. The #364 entry states that path masking
  skips text after a non-file: URL up to the next whitespace, which is
  how main behaves today.
- Move the #348 entry to Fixed and say what 0.8.0 did: a CI-redacted PII
  finding kept the digest of its unmasked value.
- The refusal docs test now reads the Documentation correction, which
  matches the docs, and still requires the switch's entry in 0.8.0.

Signed-off-by: Narendran Raghavan <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
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