While checking the frontend-integration example, I noticed the request timeout handling is inconsistent.
In frontend-integration/frontend_app.py, the /health route calls each agent with requests.get(..., timeout=5) at line 114, but the user-facing routes call local agents without a timeout:
search_products() uses requests.post(f"{AGENTS['search']}/search", json=payload) around line 27
get_product_info() uses requests.post(f"{AGENTS['info']}/product", json=payload) around line 68
If either local agent accepts the connection but stalls, the Flask request can hang until the HTTP client/socket stack gives up. That makes the frontend feel stuck instead of returning the same kind of controlled error response already used for offline agents.
Suggested fix:
- add explicit timeouts to both POST requests, probably matching the existing health check timeout
- keep the existing
requests.RequestException handling so timeout failures return JSON errors instead of blocking the request
- optionally document the timeout behavior in the frontend integration README
This should stay scoped to frontend-integration/frontend_app.py and the related README if maintainers want the behavior documented.
If this looks valid for GSSoC'26, I can work on a focused fix for it.
While checking the
frontend-integrationexample, I noticed the request timeout handling is inconsistent.In
frontend-integration/frontend_app.py, the/healthroute calls each agent withrequests.get(..., timeout=5)at line 114, but the user-facing routes call local agents without a timeout:search_products()usesrequests.post(f"{AGENTS['search']}/search", json=payload)around line 27get_product_info()usesrequests.post(f"{AGENTS['info']}/product", json=payload)around line 68If either local agent accepts the connection but stalls, the Flask request can hang until the HTTP client/socket stack gives up. That makes the frontend feel stuck instead of returning the same kind of controlled error response already used for offline agents.
Suggested fix:
requests.RequestExceptionhandling so timeout failures return JSON errors instead of blocking the requestThis should stay scoped to
frontend-integration/frontend_app.pyand the related README if maintainers want the behavior documented.If this looks valid for GSSoC'26, I can work on a focused fix for it.