agent-lattice 0.17.1 → 0.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -0
- package/dist/index.js +7 -7
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1301,6 +1301,13 @@ if (result.stop_reason === "max_tokens") {
|
|
|
1301
1301
|
The SDK does not treat that as an error, so checking this field is the only way
|
|
1302
1302
|
to distinguish a complete answer from a truncated one.
|
|
1303
1303
|
|
|
1304
|
+
When a response containing tool calls is truncated at `max_tokens`, the SDK
|
|
1305
|
+
does not execute those calls: the last `tool_use` input may be incomplete, and
|
|
1306
|
+
a truncated value can even survive JSON parsing with its meaning changed.
|
|
1307
|
+
Every call in the batch gets an error `tool_result` explaining the truncation
|
|
1308
|
+
and asking the model to reissue the call with a shorter output, and the loop
|
|
1309
|
+
continues. *Requires 0.18.0 or later.*
|
|
1310
|
+
|
|
1304
1311
|
Usage comes from the model client. The built-in Anthropic client fills it in from
|
|
1305
1312
|
the response, including the streaming path; a custom `ModelClient` that omits
|
|
1306
1313
|
`usage` produces zeroed counts rather than an error.
|