What happened?
The MCP server discovery process fails when the configuration headers contain non-ASCII characters (like 'ą').
It appears that Gemini CLI attempts to convert these header values into a ByteString (restricted to 255), causing an overflow error when a Unicode character is encountered.
Steps to Reproduce:
- Configure an MCP server in settings.json
"mcpServers": {
"mcp": {
"httpUrl": "https://mcp",
"headers": {
"X-Custom": "mąka",
},
"timeout": 60000
},
- Trigger the discovery process for the server.
What did you expect to happen?
convert non-ascii characters automatically
Client information
- CLI Version: 0.38.2
- Git Commit: b0ed611
- Session ID: 977679c3-feec-4261-98ad-bf1baf1720d6
- Operating System: win32 v25.0.0
- Sandbox Environment: no sandbox
- Model Version: gemini-3.1-flash-lite-preview
- Auth Type: oauth-personal
- Memory Usage: 332.6 MB
- Terminal Name: Unknown
- Terminal Background: #0c0c0c
- Kitty Keyboard Protocol: Unsupported
Login information
No response
Anything else we need to know?
No response
What happened?
The MCP server discovery process fails when the configuration headers contain non-ASCII characters (like 'ą').
It appears that Gemini CLI attempts to convert these header values into a ByteString (restricted to 255), causing an overflow error when a Unicode character is encountered.
Steps to Reproduce:
What did you expect to happen?
convert non-ascii characters automatically
Client information
Login information
No response
Anything else we need to know?
No response