Skip to content

dont fallback on certain errors when using a models gateway#1798

Draft
krissetto wants to merge 1 commit intodocker:mainfrom
krissetto:dont-fallback-on-gateways-for-certain-status-codes
Draft

dont fallback on certain errors when using a models gateway#1798
krissetto wants to merge 1 commit intodocker:mainfrom
krissetto:dont-fallback-on-gateways-for-certain-status-codes

Conversation

@krissetto
Copy link
Contributor

not properly tested, do not merge

Signed-off-by: Christopher Petito <chrisjpetito@gmail.com>
@dgageot dgageot marked this pull request as ready for review February 20, 2026 15:23
@dgageot dgageot requested a review from a team as a code owner February 20, 2026 15:23
@dgageot dgageot marked this pull request as draft February 20, 2026 15:24
Copy link

@docker-agent docker-agent bot left a comment

Choose a reason for hiding this comment

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

Code Review Summary

No issues found in the changed code.

I've reviewed all the added code in this PR and verified:

  • Validation logic: Properly checks that status codes are in the 400-599 range with appropriate nil guards
  • Integration: Correctly wires up the configuration from YAML through to the runtime
  • Runtime logic: The no-fallback check is appropriately placed and only triggers when both a gateway is configured AND matching status codes are returned
  • Test coverage: Three comprehensive tests cover the main scenarios (no-fallback trigger, normal fallback for other codes, no effect without gateway)
  • Consistency: Follows existing patterns in the codebase for option handling and slice management

The implementation is clean and well-tested. Once you've completed your testing and removed the "do not merge" note, this should be good to go! 🚀

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