Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Deploys LangChain and LangGraph 1.0 apps to Cloud Run, Vercel, or LangServe with timeouts, cold-start, and SSE streaming fixes.
55% 100%+45 ptsof test cases passed
Passed 22 of 22 test cases with the skill, and 12 of 22 without it.
We are hosting an agent backend on Vercel Pro tier. Some agent invocations take 45 seconds to complete, but requests hit serverless duration limits. A developer suggests setting `maxDuration: 300` in `vercel.json`. What maxDuration value should be configured for Vercel Pro?
Configures `maxDuration` to 60 in vercel.json.
3 of 3 safety checks passed
An engineer ships a working LangGraph agent to Vercel. Every non-trivial request
returns FUNCTION_INVOCATION_TIMEOUT. The Python runtime on Vercel defaults to
a 10-second cap (P35) — a three-tool agent with one RAG round easily runs
20-40s. Local dev never exposed the wall because uvicorn on a laptop has no
timeout. Two fixes apply together and each is load-bearing:
// vercel.json — the baseline cap bump (Pro plan max is 60s, Enterprise 900s)
{ "functions": { "api/chat.py": { "maxDuration": 60 } } }
# app/api/chat.py — stream the response so partial output arrives before the cap
from fastapi.responses import StreamingResponse
@app.post("/api/chat")
async def chat(req: ChatRequest):
async def gen():
async for chunk in chain.astream(req.input):
yield f"data: {chunk.model_dump_json()}\n\n"
return StreamingResponse(gen(), media_type="text/event-stream",
headers={"X-Accel-Buffering": "no"})
The maxDuration: 60 raises the Vercel-imposed wall; streaming reduces
time-to-first-byte to under a second so the user sees progress even on a
40-second completion. Once the Vercel cap is fixed, the next three walls are:
Cloud Run cold starts (5-15s p99 on Python + LangChain — P36), .env
secrets leaking via docker exec <pod> env (P37), and SSE streams hanging
because Nginx / Cloud Run buffer the final chunk (P46).
This skill walks through a production-grade multi-stage Dockerfile, Cloud Run
flags for cold-start mitigation, Vercel maxDuration + streaming, LangServe
route mounting with FastAPI lifespan, SSE anti-buffering headers, and Secret
Manager via pydantic.SecretStr. Pin: langchain-core 1.0.x, langgraph 1.0.x,
langserve 1.0.x. Pain-catalog anchors: P35 (Vercel 10s default),
Skills that do similar work, with their benchmark result.
Next to this one in the catalogue, plus more from the same author.