Observation-class, filed from the side while implementing #4187 (PR #5603) — recorded rather than fixed there, and out of that PR's scope.
maxToolRoundtrips is a declared-but-unenforced authorable key. It is spelled out at every layer that would make an author believe it works, and consumed at none.
Declared as authorable metadata:
packages/types/src/complex.ts:586 — maxToolRoundtrips?: number;packages/types/src/zod/complex.zod.ts:264 — z.number().optional().describe('Max tool-calling round-trips')
Threaded through the renderer at three call sites, so it really does travel from the authored document into the hook:
packages/plugin-chatbot/src/renderer.tsx:88, :306, :439 — maxToolRoundtrips: schema.maxToolRoundtrips,
Accepted by the hook, given a default, and then dropped:
packages/plugin-chatbot/src/useObjectChat.ts:242 — declared on UseObjectChatOptionspackages/plugin-chatbot/src/useObjectChat.ts:363 — maxToolRoundtrips = 5, destructured out of options and never referenced again in the file. ESLint says so out loud today: 'maxToolRoundtrips' is assigned a value but never used (@typescript-eslint/no-unused-vars, warning).
Nothing passes it to useChat, to the transport, or to the request body — grep -rn "maxToolRoundtrips" over packages/ and apps/ returns only the sites above.
Documented as working, with a stated default:
content/docs/plugins/plugin-chatbot.mdx:111 and :155 — | maxToolRoundtrips | number | 5 | Max tool-calling round-trips per message |
So an author who sets it gets no error, no warning, and no effect — and the docs give them a number to reason about. This is the shape ADR-0049's enforce-or-remove exists for: either the hook must cap round-trips with it, or the key comes out of the type, the zod schema, the renderer and the docs together.
Not assigned; not urgent as far as anything measured here — no runtime fault was observed, and the round-trip behaviour a user gets today is simply whatever the AI SDK defaults to. Filed so the discrepancy is on the record rather than rediscovered.
Observation-class, filed from the side while implementing #4187 (PR #5603) — recorded rather than fixed there, and out of that PR's scope.
maxToolRoundtripsis a declared-but-unenforced authorable key. It is spelled out at every layer that would make an author believe it works, and consumed at none.Declared as authorable metadata:
packages/types/src/complex.ts:586—maxToolRoundtrips?: number;packages/types/src/zod/complex.zod.ts:264—z.number().optional().describe('Max tool-calling round-trips')Threaded through the renderer at three call sites, so it really does travel from the authored document into the hook:
packages/plugin-chatbot/src/renderer.tsx:88,:306,:439—maxToolRoundtrips: schema.maxToolRoundtrips,Accepted by the hook, given a default, and then dropped:
packages/plugin-chatbot/src/useObjectChat.ts:242— declared onUseObjectChatOptionspackages/plugin-chatbot/src/useObjectChat.ts:363—maxToolRoundtrips = 5,destructured out ofoptionsand never referenced again in the file. ESLint says so out loud today:'maxToolRoundtrips' is assigned a value but never used(@typescript-eslint/no-unused-vars, warning).Nothing passes it to
useChat, to the transport, or to the request body —grep -rn "maxToolRoundtrips"overpackages/andapps/returns only the sites above.Documented as working, with a stated default:
content/docs/plugins/plugin-chatbot.mdx:111and:155—| maxToolRoundtrips | number | 5 | Max tool-calling round-trips per message |So an author who sets it gets no error, no warning, and no effect — and the docs give them a number to reason about. This is the shape ADR-0049's enforce-or-remove exists for: either the hook must cap round-trips with it, or the key comes out of the type, the zod schema, the renderer and the docs together.
Not assigned; not urgent as far as anything measured here — no runtime fault was observed, and the round-trip behaviour a user gets today is simply whatever the AI SDK defaults to. Filed so the discrepancy is on the record rather than rediscovered.