Claude Message Threads: Node.js Setup, Replay and Limits

Claude message threads send only new turns to the Messages API. Node.js setup, field rules, replay on thread_not_found, caching and when to skip them.

LLM structured outputs stop AI APIs from returning broken JSON. Learn the Node.js + Zod fix for OpenAI and Claude, plus refusal and truncation gotchas.

Bedrock prompt caching in Node.js: add cachePoint blocks to Converse API calls, cut Claude input costs, and fix the gotchas that keep cache reads at zero.