✕ [API Error: exception TypeError: fetch failed sending request]
What happened?
✕ [API Error: exception TypeError: fetch failed sending request]
What did you expect to happen?
It should work properly
Client information
Client Information
Run gemini to enter the interactive CLI, then run the /about command.
CLI Version 0.20.2 │ │ Git Commit af894e46-8 │ │ Model auto │ │ Sandbox no sandbox │ │ OS darwin │ │ Auth Method gemini-api-key
> /about
# paste output here
Login information
No response
Anything else we need to know?
tried this : https://github.com/google-gemini/gemini-cli/issues/3426
No response
Hi! Can you provide repro info for this? Is it always happening or just once?
It is always happening for me,
echo $https_proxy
echo $http_proxy
echo $HTTPS_PROXY
echo $HTTP_PROXY
All above info is empty for me, but it is working for my teammates.
Reproduce info:
- type gemini in terminal
- type anything in input box
{
"error": {
"message": "exception TypeError: fetch failed sending request",
"stack": "Error: exception TypeError: fetch failed sending request\n at file:///opt/homebrew/Cellar/gemini-cli/0.20.2/libexec/lib/node_modules/@google/gemini-cli/node_modules/@google/genai/dist/node/index.mjs:11550:19\n at process.processTicksAndRejections (node:internal/process/task_queues:103:5)\n at async Models.generateContentStream (file:///opt/homebrew/Cellar/gemini-cli/0.20.2/libexec/lib/node_modules/@google/gemini-cli/node_modules/@google/genai/dist/node/index.mjs:12859:24)\n at async file:///opt/homebrew/Cellar/gemini-cli/0.20.2/libexec/lib/node_modules/@google/gemini-cli/node_modules/@google/gemini-cli-core/dist/src/core/loggingContentGenerator.js:121:26\n at async retryWithBackoff (file:///opt/homebrew/Cellar/gemini-cli/0.20.2/libexec/lib/node_modules/@google/gemini-cli/node_modules/@google/gemini-cli-core/dist/src/utils/retry.js:75:28)\n at async GeminiChat.makeApiCallAndProcessStream (file:///opt/homebrew/Cellar/gemini-cli/0.20.2/libexec/lib/node_modules/@google/gemini-cli/node_modules/@google/gemini-cli-core/dist/src/core/geminiChat.js:380:32)\n at async GeminiChat.streamWithRetries (file:///opt/homebrew/Cellar/gemini-cli/0.20.2/libexec/lib/node_modules/@google/gemini-cli/node_modules/@google/gemini-cli-core/dist/src/core/geminiChat.js:234:40)\n at async Turn.run (file:///opt/homebrew/Cellar/gemini-cli/0.20.2/libexec/lib/node_modules/@google/gemini-cli/node_modules/@google/gemini-cli-core/dist/src/core/turn.js:60:30)\n at async GeminiClient.sendMessageStream (file:///opt/homebrew/Cellar/gemini-cli/0.20.2/libexec/lib/node_modules/@google/gemini-cli/node_modules/@google/gemini-cli-core/dist/src/core/client.js:392:26)\n at async file:///opt/homebrew/Cellar/gemini-cli/0.20.2/libexec/lib/node_modules/@google/gemini-cli/dist/src/ui/hooks/useGeminiStream.js:485:26"
},
"context": [
{
"role": "user",
"parts": [
{
"text": "This is the Gemini CLI. We are setting up the context for our chat.\nToday's date is Tuesday, December 16, 2025 (formatted according to the user's locale).\nMy operating system is: darwin\nThe project's temporary directory is: /Users/abc/.gemini/tmp/1feb3521b4022932acbda057ad0f7eb7b792e3e7659b9e49240ffdfc80fd4bd7\nI'm currently working in the directory: /Users/abc/z/x\nHere is the folder structure of the current working directories:\n\nShowing up to 200 items (files + folders). Folders or files indicated with ... contain more items not shown, were ignored, or the display limit (200 items) was reached....: Do not return an empty response when a tool call is required.\n\nMy setup is complete. I will provide my first command in the next turn."
}
]
},
{
"role": "user",
"parts": [
{
"text": "hi"
}
]
},
{
"role": "user",
"parts": [
{
"text": "hi"
}
]
}
]
}
ping 216.239.36.223
Does it work ?
I had the same issue, and it started working for me once my network was working again.
ping 216.239.36.223 this command works but gemini-cli is not working
Closing this as we are unable to duplicate. Please reopen with more steps required to reproduce this issue if you're able.