Gemini CLI API Error
What happened?
I have this below error with Gemini CLI version 0.1.7, OS Linux, no matter the message I type it give the same error ✕ [API Error: Cannot convert argument to a ByteString because the character at index 0 has a value of 8221 which is greater than 255.]
What did you expect to happen?
Gemini output whatever the message is
Client information
│ CLI Version 0.1.7 │ │ Git Commit 55cc809 │ │ Model gemini-2.5-pro │ │ Sandbox no sandbox │ │ OS linux │ │ Auth Method gemini-api-key
Login information
Auth Method gemini-api-key
Anything else we need to know?
No response
Hello! I can confirm this is a known bug, which is being tracked in this official GitHub issue: #2929
As you can see, the issue is still marked as 'Open'.
However, I am running version [0.1.12] and can confirm that the bug is resolved for me. I tested the exact same input with typographic quotes (”) and the error no longer occurs.
It seems the fix has already been released and the issue just needs to be formally closed. I highly recommend you update your Gemini CLI and see if it solves the problem for you too.
bash npm update -g @google/gemini-cli
Thank you Secprobe for your response. Gemini CLI updated, current version 0.1.12 but still have the same error: ✕ [API Error: Cannot convert argument to a ByteString because the character at index 0 has a value of 8221 which is greater than 255.]
My general tip for any of these: have another box Gemini ♊, Claude etc. CLIs self diagnose and temp fix these: it can read this git cloned repo too, this one. And then they would write the logs, tests, fixes etc for you then.
So, just make one AI run the other one, with the -p (non interactive) switch in this cloned repo, and have them report and fix on their own, also hereto, via gh. (An instantiation of https://en.m.wikipedia.org/wiki/Genetic_algorithm, in fact, with us being the wetware here.)
Thanks for the issue @enageba77 👏
Going to mark this as a duplicate of the pre-existing issue mentioned above so that we can folks all look at one place for tracking updates and developments 👍