Scope check
Due diligence
What problem does this solve?
I wanted to use Open AI GPT and Anthropic's Haiku. For the same prompt I would get back a proper response from OpenAI but Invalid request - please check your input from Anthropic.
After a bit of digging and turning on debugging, I found this message deeper.
Accumulating error chunk: {"type":"error","error":{"type":"invalid_request_error","message":"Your credit balance is too low to access the Anthropic API. Please go to Plans & Billing to upgrade or purchase credits."},"request_id":"..."}
So the error reason is there but needs to be resurfaced.
Proposed solution
Dig in the specific response and surface the actual error.
Why this belongs in RubyLLM
It's the way RubyLLM handles responses.
Scope check
Due diligence
What problem does this solve?
I wanted to use Open AI GPT and Anthropic's Haiku. For the same prompt I would get back a proper response from OpenAI but
Invalid request - please check your inputfrom Anthropic.After a bit of digging and turning on debugging, I found this message deeper.
So the error reason is there but needs to be resurfaced.
Proposed solution
Dig in the specific response and surface the actual error.
Why this belongs in RubyLLM
It's the way RubyLLM handles responses.