-
-
Notifications
You must be signed in to change notification settings - Fork 277
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Basic checks
- I searched existing issues - this hasn't been reported
- I can reproduce this consistently
- This is a RubyLLM bug, not my application code
What's broken?
When using the Gemini provider, the gem sends a payload with max_tokens, which is invalid for the Gemini API. This results in the error: LLM API error: Invalid JSON payload received. Unknown name "max_tokens": Cannot find field. The correct parameter for Gemini is maxOutputTokens nested inside generationConfig
How to reproduce
use max_tokens
with Gemini
Expected behavior
i expect max_tokens
to be correctly translated to maxOutputTokens
What actually happened
i got a max_tokens
error
Environment
Ruby 3.2.2 (rbenv shim)
Latest
Gemini
Linux
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working