Skip to content

add 402 payment error hint to vision tool error handler#2798

Closed
dlkakbs wants to merge 1 commit into
NousResearch:mainfrom
dlkakbs:fix/vision-402-error-handling
Closed

add 402 payment error hint to vision tool error handler#2798
dlkakbs wants to merge 1 commit into
NousResearch:mainfrom
dlkakbs:fix/vision-402-error-handling

Conversation

@dlkakbs

@dlkakbs dlkakbs commented Mar 24, 2026

Copy link
Copy Markdown
Contributor

Summary

When an API provider returns a 402 (Insufficient Credits / Payment Required)error during vision analysis, the error fell through to the generic "There was a problem with the request" message, giving users no actionable information.

This PR adds explicit handling for payment/credit errors so users get a clear message to top up their account.

Changes

  • tools/vision_tools.py: Added 402/credit-related hints ("402", "insufficient", "payment required", "credits", "billing") before the existing vision capability error check.

@teknium1

Copy link
Copy Markdown
Contributor

Merged via PR #2802. Your commit was cherry-picked onto current main with authorship preserved. Thanks @dlkakbs!

@dlkakbs dlkakbs deleted the fix/vision-402-error-handling branch March 24, 2026 16:35
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