Problem
_call_llm_provider in utils/call_llm.py calls requests.post(...) with no timeout= kwarg, so a slow/stuck upstream (Ollama, XAI, OpenRouter, self-hosted) hangs the whole tutorial run forever. The except requests.exceptions.Timeout handler at line 120 is dead code.
Cite
utils/call_llm.py:104 — response = requests.post(url, headers=headers, json=payload)
utils/call_llm.py:120 — except requests.exceptions.Timeout: (unreachable).
Steps
- Set
LLM_PROVIDER=OLLAMA, OLLAMA_BASE_URL=http://10.255.255.1:11434 (unroutable), OLLAMA_MODEL=llama3.
python main.py --repo https://github.com/octocat/Hello-World.
Expected
Abort with timeout error after ~30s.
Actual
Process hangs indefinitely; only Ctrl-C exits.
Env
Python 3.10-slim (Dockerfile); requests>=2.28.0 (requirements.txt).
Fix
requests.post(url, headers=headers, json=payload, timeout=(10, 300)).
Thanks for maintaining The-Pocket/PocketFlow-Tutorial-Codebase-Knowledge!
Problem
_call_llm_providerinutils/call_llm.pycallsrequests.post(...)with notimeout=kwarg, so a slow/stuck upstream (Ollama, XAI, OpenRouter, self-hosted) hangs the whole tutorial run forever. Theexcept requests.exceptions.Timeouthandler at line 120 is dead code.Cite
utils/call_llm.py:104—response = requests.post(url, headers=headers, json=payload)utils/call_llm.py:120—except requests.exceptions.Timeout:(unreachable).Steps
LLM_PROVIDER=OLLAMA,OLLAMA_BASE_URL=http://10.255.255.1:11434(unroutable),OLLAMA_MODEL=llama3.python main.py --repo https://github.com/octocat/Hello-World.Expected
Abort with timeout error after ~30s.
Actual
Process hangs indefinitely; only Ctrl-C exits.
Env
Python 3.10-slim (Dockerfile);
requests>=2.28.0(requirements.txt).Fix
requests.post(url, headers=headers, json=payload, timeout=(10, 300)).Thanks for maintaining The-Pocket/PocketFlow-Tutorial-Codebase-Knowledge!