Skip to content

fix: allow max_retries to be 0 to disable retries#469

Merged
mikehostetler merged 1 commit into
agentjido:mainfrom
stevehodgkiss:allow-disabling-retries
Feb 27, 2026
Merged

fix: allow max_retries to be 0 to disable retries#469
mikehostetler merged 1 commit into
agentjido:mainfrom
stevehodgkiss:allow-disabling-retries

Conversation

@stevehodgkiss
Copy link
Copy Markdown
Contributor

Description

Change max_retries type from :pos_integer to :non_neg_integer so users can set it to 0 to disable retry attempts for transient network errors.

The reason I'd like to disable automatic transient error retries is to have control over how timeouts are handled. Some generations can take 5+ minutes and I'm not sure Req's put_aws_sig_v4 regenerates the signature on timeout retries, so eventually it hits a 403 with a signature error like this:

%ReqLLM.Error.API.Response{reason: "Bedrock API error", response_body: %{"message" => "Signature expired: 20260226T031356Z is now earlier than 20260226T031459Z (20260226T031959Z - 5 min.)"}, status: 403

I'd rather have timeouts not be retried and instead rely on Oban retry limits. Req already supports max_retries: 0, so I think it makes sense to allow that.

Type of Change

  • Bug fix (non-breaking change fixing an issue)
  • New feature (non-breaking change adding functionality)
  • Breaking change (fix or feature causing existing functionality to change)
  • Documentation update

Breaking Changes

Testing

  • Tests pass (mix test)
  • Quality checks pass (mix quality)

Checklist

  • My code follows the project's style guidelines
  • I have updated the documentation accordingly
  • I have added tests that prove my fix/feature works
  • All new and existing tests pass
  • My commits follow conventional commit format
  • I have NOT edited CHANGELOG.md (it is auto-generated by git_ops)

Related Issues

Closes #

Change max_retries type from :pos_integer to :non_neg_integer so users
can set it to 0 to disable retry attempts for transient network errors.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@mikehostetler mikehostetler merged commit 7ee69a8 into agentjido:main Feb 27, 2026
6 checks passed
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.

3 participants