#34328 [Bug]: unpack_defs still hangs (unbounded) on recursive tool schemas — Bedrock & Vertex callers pass no byte budget
Related (closed): #19098, #13151, #11372 — this looks like an incomplete fix for #19098.
### What happened?
A `/chat/completions` request whose tool `parameters` is a **recursive, high-fan-in JSON Schema** (`$defs`/`$ref` where a type references itself and is reused by many other defs — the shape Pydantic emits for recursive models) causes `unpack_defs()` to expand **unboundedly**. It is CPU-bound, not just memory: a ~23 KB tool schema expands past **510 MB within 30 s and does not converge**, so the request never reaches the provider and the fronting gateway/LB times out (~80 s) → **502**. Adding memory does not help.
Reproduced on both: - **Bedrock** Converse (Claude), and - **Vertex AI / Gemini**.
This is closely related to the closed #19098. That fix added a `max_inlined_bytes` budget and a `ref_chain` cycle guard to `unpack_defs`, but the bug persists because:
1. **Neither caller passes `max_inlined_bytes`**, so it defaults to `None` (unbounded) on exactly the two paths that trigger the blow-up. 2. The `ref_chain` guard only prevents **path cycles** (a def already on the current resolution chain). It does **not** prevent **diamond fan-out** — the same def reused…