@dxos/assistant 0.8.3 → 0.8.4-main.1068cf700f

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.
Files changed (199) hide show
  1. package/dist/lib/neutral/chunk-J5LGTIGS.mjs +10 -0
  2. package/dist/lib/neutral/chunk-J5LGTIGS.mjs.map +7 -0
  3. package/dist/lib/neutral/chunk-ZPC54VRM.mjs +596 -0
  4. package/dist/lib/neutral/chunk-ZPC54VRM.mjs.map +7 -0
  5. package/dist/lib/neutral/extraction/index.mjs +225 -0
  6. package/dist/lib/neutral/extraction/index.mjs.map +7 -0
  7. package/dist/lib/neutral/index.mjs +929 -0
  8. package/dist/lib/neutral/index.mjs.map +7 -0
  9. package/dist/lib/neutral/meta.json +1 -0
  10. package/dist/lib/neutral/testing/index.mjs +38 -0
  11. package/dist/lib/neutral/testing/index.mjs.map +7 -0
  12. package/dist/types/src/conversation/context.d.ts +138 -0
  13. package/dist/types/src/conversation/context.d.ts.map +1 -0
  14. package/dist/types/src/conversation/context.test.d.ts +2 -0
  15. package/dist/types/src/conversation/context.test.d.ts.map +1 -0
  16. package/dist/types/src/conversation/conversation.d.ts +66 -0
  17. package/dist/types/src/conversation/conversation.d.ts.map +1 -0
  18. package/dist/types/src/conversation/conversation.test.d.ts +2 -0
  19. package/dist/types/src/conversation/conversation.test.d.ts.map +1 -0
  20. package/dist/types/src/conversation/index.d.ts +3 -0
  21. package/dist/types/src/conversation/index.d.ts.map +1 -0
  22. package/dist/types/src/diff.d.ts +17 -0
  23. package/dist/types/src/diff.d.ts.map +1 -0
  24. package/dist/types/src/diff.test.d.ts +2 -0
  25. package/dist/types/src/diff.test.d.ts.map +1 -0
  26. package/dist/types/src/errors.d.ts +67 -0
  27. package/dist/types/src/errors.d.ts.map +1 -0
  28. package/dist/types/src/execution-graph.d.ts +85 -0
  29. package/dist/types/src/execution-graph.d.ts.map +1 -0
  30. package/dist/types/src/execution-graph.test.d.ts +2 -0
  31. package/dist/types/src/execution-graph.test.d.ts.map +1 -0
  32. package/dist/types/src/extraction/extraction-llm-function/extraction-llm-function.d.ts +1 -1
  33. package/dist/types/src/extraction/extraction-llm-function/extraction-llm-function.d.ts.map +1 -1
  34. package/dist/types/src/extraction/extraction-ner-function/extraction-ner-function.d.ts +279 -140
  35. package/dist/types/src/extraction/extraction-ner-function/extraction-ner-function.d.ts.map +1 -1
  36. package/dist/types/src/extraction/extraction-ner-function/named-entity-recognition.d.ts +1 -1
  37. package/dist/types/src/extraction/extraction-ner-function/named-entity-recognition.d.ts.map +1 -1
  38. package/dist/types/src/extraction/extraction.d.ts +345 -212
  39. package/dist/types/src/extraction/extraction.d.ts.map +1 -1
  40. package/dist/types/src/extraction/quotes.d.ts +3 -3
  41. package/dist/types/src/extraction/quotes.d.ts.map +1 -1
  42. package/dist/types/src/functions/index.d.ts +2 -0
  43. package/dist/types/src/functions/index.d.ts.map +1 -0
  44. package/dist/types/src/functions/services.d.ts +19 -0
  45. package/dist/types/src/functions/services.d.ts.map +1 -0
  46. package/dist/types/src/functions.test.d.ts +2 -0
  47. package/dist/types/src/functions.test.d.ts.map +1 -0
  48. package/dist/types/src/index.d.ts +6 -3
  49. package/dist/types/src/index.d.ts.map +1 -1
  50. package/dist/types/src/session/GenericToolkit.d.ts +107 -0
  51. package/dist/types/src/session/GenericToolkit.d.ts.map +1 -0
  52. package/dist/types/src/session/artifact-diff.d.ts +27 -0
  53. package/dist/types/src/session/artifact-diff.d.ts.map +1 -0
  54. package/dist/types/src/session/error-handling.d.ts +4 -0
  55. package/dist/types/src/session/error-handling.d.ts.map +1 -0
  56. package/dist/types/src/session/format.d.ts +12 -0
  57. package/dist/types/src/session/format.d.ts.map +1 -0
  58. package/dist/types/src/session/format.test.d.ts +2 -0
  59. package/dist/types/src/session/format.test.d.ts.map +1 -0
  60. package/dist/types/src/session/index.d.ts +5 -0
  61. package/dist/types/src/session/index.d.ts.map +1 -1
  62. package/dist/types/src/session/observer.d.ts +23 -0
  63. package/dist/types/src/session/observer.d.ts.map +1 -0
  64. package/dist/types/src/session/session.d.ts +41 -246
  65. package/dist/types/src/session/session.d.ts.map +1 -1
  66. package/dist/types/src/session/toolkit.d.ts +14 -0
  67. package/dist/types/src/session/toolkit.d.ts.map +1 -0
  68. package/dist/types/src/session/version-pin.d.ts +5 -5
  69. package/dist/types/src/session/version-pin.d.ts.map +1 -1
  70. package/dist/types/src/templates/index.d.ts +2 -0
  71. package/dist/types/src/templates/index.d.ts.map +1 -0
  72. package/dist/types/src/templates/system.d.ts +18 -0
  73. package/dist/types/src/templates/system.d.ts.map +1 -0
  74. package/dist/types/src/testing/index.d.ts +1 -2
  75. package/dist/types/src/testing/index.d.ts.map +1 -1
  76. package/dist/types/src/testing/layer.d.ts +22 -0
  77. package/dist/types/src/testing/layer.d.ts.map +1 -0
  78. package/dist/types/src/types/artifact.d.ts +28 -0
  79. package/dist/types/src/types/artifact.d.ts.map +1 -0
  80. package/dist/types/src/types/index.d.ts +2 -0
  81. package/dist/types/src/types/index.d.ts.map +1 -0
  82. package/dist/types/tsconfig.tsbuildinfo +1 -1
  83. package/package.json +58 -38
  84. package/src/conversation/context.test.ts +46 -0
  85. package/src/conversation/context.ts +330 -0
  86. package/src/conversation/conversation.test.ts +65 -0
  87. package/src/conversation/conversation.ts +203 -0
  88. package/src/conversation/index.ts +6 -0
  89. package/src/diff.test.ts +74 -0
  90. package/src/diff.ts +93 -0
  91. package/src/errors.ts +15 -0
  92. package/src/execution-graph.test.ts +740 -0
  93. package/src/execution-graph.ts +509 -0
  94. package/src/extraction/extraction-llm-function/extraction-llm-function.test.ts +14 -25
  95. package/src/extraction/extraction-llm-function/extraction-llm-function.ts +48 -51
  96. package/src/extraction/extraction-ner-function/extraction-ner-function.test.ts +23 -22
  97. package/src/extraction/extraction-ner-function/extraction-ner-function.ts +43 -41
  98. package/src/extraction/extraction-ner-function/named-entity-recognition.test.ts +12 -6
  99. package/src/extraction/extraction-ner-function/named-entity-recognition.ts +3 -1
  100. package/src/extraction/extraction.ts +10 -9
  101. package/src/extraction/quotes.test.ts +3 -3
  102. package/src/extraction/quotes.ts +6 -7
  103. package/src/functions/index.ts +5 -0
  104. package/src/functions/services.ts +187 -0
  105. package/src/functions.conversations.json +1 -0
  106. package/src/functions.test.ts +74 -0
  107. package/src/index.ts +6 -3
  108. package/src/session/GenericToolkit.ts +160 -0
  109. package/src/session/artifact-diff.ts +41 -0
  110. package/src/session/error-handling.ts +41 -0
  111. package/src/session/format.test.ts +124 -0
  112. package/src/session/format.ts +143 -0
  113. package/src/session/index.ts +6 -0
  114. package/src/session/observer.ts +61 -0
  115. package/src/session/session.conversations.json +1 -0
  116. package/src/session/session.test.ts +106 -173
  117. package/src/session/session.ts +181 -495
  118. package/src/session/toolkit.ts +39 -0
  119. package/src/session/version-pin.ts +12 -12
  120. package/src/templates/index.ts +5 -0
  121. package/src/templates/instructions/format.tpl +57 -0
  122. package/src/templates/instructions/system.tpl +48 -0
  123. package/src/templates/system.ts +41 -0
  124. package/src/testing/index.ts +2 -8
  125. package/src/testing/layer.ts +84 -0
  126. package/src/types/artifact.ts +89 -0
  127. package/src/types/index.ts +5 -0
  128. package/src/typings.d.ts +5 -0
  129. package/dist/lib/browser/index.mjs +0 -2158
  130. package/dist/lib/browser/index.mjs.map +0 -7
  131. package/dist/lib/browser/meta.json +0 -1
  132. package/dist/lib/node/index.cjs +0 -2178
  133. package/dist/lib/node/index.cjs.map +0 -7
  134. package/dist/lib/node/meta.json +0 -1
  135. package/dist/lib/node-esm/index.mjs +0 -2160
  136. package/dist/lib/node-esm/index.mjs.map +0 -7
  137. package/dist/lib/node-esm/meta.json +0 -1
  138. package/dist/types/bin/chat.d.ts +0 -2
  139. package/dist/types/bin/chat.d.ts.map +0 -1
  140. package/dist/types/src/blueprint/ai.test.d.ts +0 -2
  141. package/dist/types/src/blueprint/ai.test.d.ts.map +0 -1
  142. package/dist/types/src/blueprint/blueprint.d.ts +0 -55
  143. package/dist/types/src/blueprint/blueprint.d.ts.map +0 -1
  144. package/dist/types/src/blueprint/blueprint.test.d.ts +0 -2
  145. package/dist/types/src/blueprint/blueprint.test.d.ts.map +0 -1
  146. package/dist/types/src/blueprint/index.d.ts +0 -4
  147. package/dist/types/src/blueprint/index.d.ts.map +0 -1
  148. package/dist/types/src/blueprint/logger.d.ts +0 -25
  149. package/dist/types/src/blueprint/logger.d.ts.map +0 -1
  150. package/dist/types/src/blueprint/machine.d.ts +0 -143
  151. package/dist/types/src/blueprint/machine.d.ts.map +0 -1
  152. package/dist/types/src/blueprint/test-data.d.ts +0 -3
  153. package/dist/types/src/blueprint/test-data.d.ts.map +0 -1
  154. package/dist/types/src/research/exa.d.ts +0 -7
  155. package/dist/types/src/research/exa.d.ts.map +0 -1
  156. package/dist/types/src/research/graph.d.ts +0 -41
  157. package/dist/types/src/research/graph.d.ts.map +0 -1
  158. package/dist/types/src/research/graph.test.d.ts +0 -2
  159. package/dist/types/src/research/graph.test.d.ts.map +0 -1
  160. package/dist/types/src/research/index.d.ts +0 -4
  161. package/dist/types/src/research/index.d.ts.map +0 -1
  162. package/dist/types/src/research/research.d.ts +0 -10
  163. package/dist/types/src/research/research.d.ts.map +0 -1
  164. package/dist/types/src/research/research.test.d.ts +0 -2
  165. package/dist/types/src/research/research.test.d.ts.map +0 -1
  166. package/dist/types/src/session/version-pin.test.d.ts +0 -2
  167. package/dist/types/src/session/version-pin.test.d.ts.map +0 -1
  168. package/dist/types/src/summarization/summarization.test.d.ts +0 -2
  169. package/dist/types/src/summarization/summarization.test.d.ts.map +0 -1
  170. package/dist/types/src/testing/exa-search-1748337321991.d.ts +0 -38
  171. package/dist/types/src/testing/exa-search-1748337321991.d.ts.map +0 -1
  172. package/dist/types/src/testing/exa-search-1748337331526.d.ts +0 -37
  173. package/dist/types/src/testing/exa-search-1748337331526.d.ts.map +0 -1
  174. package/dist/types/src/testing/exa-search-1748337344119.d.ts +0 -58
  175. package/dist/types/src/testing/exa-search-1748337344119.d.ts.map +0 -1
  176. package/dist/types/src/types.d.ts +0 -3
  177. package/dist/types/src/types.d.ts.map +0 -1
  178. package/src/blueprint/ai.test.ts +0 -156
  179. package/src/blueprint/blueprint.test.ts +0 -151
  180. package/src/blueprint/blueprint.ts +0 -75
  181. package/src/blueprint/index.ts +0 -7
  182. package/src/blueprint/logger.ts +0 -155
  183. package/src/blueprint/machine.ts +0 -251
  184. package/src/blueprint/test-data.ts +0 -55
  185. package/src/research/exa.ts +0 -100
  186. package/src/research/graph.test.ts +0 -15
  187. package/src/research/graph.ts +0 -337
  188. package/src/research/index.ts +0 -7
  189. package/src/research/instructions-research.tpl +0 -97
  190. package/src/research/research.test.ts +0 -190
  191. package/src/research/research.ts +0 -89
  192. package/src/session/version-pin.test.ts +0 -26
  193. package/src/summarization/summarization.test.ts +0 -221
  194. package/src/testing/exa-search-1748337321991.ts +0 -131
  195. package/src/testing/exa-search-1748337331526.ts +0 -144
  196. package/src/testing/exa-search-1748337344119.ts +0 -133
  197. package/src/typedefs.d.ts +0 -8
  198. package/src/types.ts +0 -8
  199. /package/src/extraction/extraction-llm-function/{instructions.tpl → transcription-instructions.tpl} +0 -0
@@ -0,0 +1,143 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import * as Effect from 'effect/Effect';
6
+ import * as Function from 'effect/Function';
7
+ import * as Option from 'effect/Option';
8
+
9
+ import { Template } from '@dxos/blueprints';
10
+ import { Obj } from '@dxos/echo';
11
+ import { ObjectVersion } from '@dxos/echo-db';
12
+ import { type ObjectId } from '@dxos/keys';
13
+ import { log } from '@dxos/log';
14
+ import { type ContentBlock, Message } from '@dxos/types';
15
+ import { trim } from '@dxos/util';
16
+
17
+ import { AiAssistantError } from '../errors';
18
+
19
+ import { ArtifactDiffResolver } from './artifact-diff';
20
+ import { type AiSessionRunError, type AiSessionRunProps } from './session';
21
+
22
+ /**
23
+ * Formats the system prompt.
24
+ */
25
+ // TODO(burdon): Move to AiPreprocessor.
26
+ export const formatSystemPrompt = ({
27
+ system,
28
+ blueprints = [],
29
+ objects = [],
30
+ }: Pick<AiSessionRunProps<any>, 'system' | 'blueprints' | 'objects'>) =>
31
+ Effect.gen(function* () {
32
+ const blueprintDefs = yield* Function.pipe(
33
+ blueprints,
34
+ Effect.forEach((blueprint) => Effect.succeed(blueprint.instructions)),
35
+ Effect.flatMap(
36
+ Effect.forEach((template) =>
37
+ Effect.gen(function* () {
38
+ return trim`
39
+ <blueprint>
40
+ ${yield* Template.processTemplate(template)}
41
+ </blueprint>
42
+ `;
43
+ }),
44
+ ),
45
+ ),
46
+ Effect.map((blueprints) =>
47
+ blueprints.length > 0 ? ['## Blueprints Definitions', ...blueprints].join('\n\n') : undefined,
48
+ ),
49
+ );
50
+
51
+ const objectDefs = yield* Function.pipe(
52
+ objects,
53
+ Effect.forEach((object) =>
54
+ Effect.succeed(trim`
55
+ <object>
56
+ <dxn>${Obj.getDXN(object)}</dxn>
57
+ <typename>${Obj.getTypename(object)}</typename>
58
+ </object>
59
+ `),
60
+ ),
61
+ Effect.map((objects) => (objects.length > 0 ? ['## Context Objects', ...objects].join('\n\n') : undefined)),
62
+ );
63
+
64
+ return yield* Function.pipe(
65
+ Effect.succeed([system, blueprintDefs, objectDefs].filter((def): def is string => def !== undefined)),
66
+ Effect.map((parts) => parts.join('\n\n')),
67
+ );
68
+ });
69
+
70
+ /**
71
+ * Formats the user prompt.
72
+ */
73
+ // TODO(burdon): Move to AiPreprocessor.
74
+ // TODO(burdon): Convert util below to `Effect.fn` (to preserve stack info)
75
+ export const formatUserPrompt = ({
76
+ prompt,
77
+ history = [],
78
+ }: Pick<AiSessionRunProps<any>, 'prompt' | 'history'>): Effect.Effect<Message.Message, AiSessionRunError> =>
79
+ Effect.gen(function* () {
80
+ const blocks: ContentBlock.Any[] = [];
81
+
82
+ // TODO(dmaretskyi): Evaluate other approaches as `serviceOption` isn't represented in the type system.
83
+ const artifactDiffResolver = yield* Effect.serviceOption(ArtifactDiffResolver);
84
+ if (Option.isSome(artifactDiffResolver)) {
85
+ const versions = gatherObjectVersions(history);
86
+ const artifactDiff = yield* Effect.tryPromise({
87
+ try: () =>
88
+ artifactDiffResolver.value.resolve(
89
+ [...versions.entries()].map(([id, version]) => ({ id, lastVersion: version })),
90
+ ),
91
+ catch: AiAssistantError.wrap({ message: 'Artifact diff resolution error' }),
92
+ });
93
+
94
+ log('version', { artifactDiff, versions });
95
+ for (const [id, { version }] of [...artifactDiff.entries()]) {
96
+ if (ObjectVersion.equals(version, versions.get(id)!)) {
97
+ artifactDiff.delete(id);
98
+ continue;
99
+ }
100
+
101
+ blocks.push({ _tag: 'anchor', objectId: id, version });
102
+ }
103
+
104
+ if (artifactDiff.size > 0) {
105
+ blocks.push(createArtifactUpdateBlock(artifactDiff));
106
+ }
107
+ }
108
+
109
+ return Obj.make(Message.Message, {
110
+ created: new Date().toISOString(),
111
+ sender: { role: 'user' },
112
+ blocks: [...blocks, { _tag: 'text', text: prompt }],
113
+ });
114
+ });
115
+
116
+ const gatherObjectVersions = (messages: Message.Message[]): Map<ObjectId, ObjectVersion> => {
117
+ const artifactIds = new Map<ObjectId, ObjectVersion>();
118
+ for (const message of messages) {
119
+ for (const block of message.blocks) {
120
+ if (block._tag === 'anchor') {
121
+ artifactIds.set(block.objectId, block.version as ObjectVersion);
122
+ }
123
+ }
124
+ }
125
+
126
+ return artifactIds;
127
+ };
128
+
129
+ const createArtifactUpdateBlock = (
130
+ artifactDiff: Map<ObjectId, { version: ObjectVersion; diff?: string }>,
131
+ ): ContentBlock.Any => {
132
+ return {
133
+ _tag: 'text',
134
+ // TODO(dmaretskyi): Does this need to be a special content-block?
135
+ disposition: 'artifact-update',
136
+ text: trim`
137
+ The following artifacts have been updated since the last message:
138
+ ${[...artifactDiff.entries()]
139
+ .map(([id, { diff }]) => `<changed-artifact id="${id}">${diff ? `\n${diff}` : ''}</changed-artifact>`)
140
+ .join('\n')}
141
+ `,
142
+ };
143
+ };
@@ -2,5 +2,11 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
+ export * from './artifact-diff';
6
+ export * from './observer';
5
7
  export * from './session';
8
+ export * from './toolkit';
6
9
  export * from './version-pin';
10
+ export * from './format';
11
+
12
+ export * as GenericToolkit from './GenericToolkit';
@@ -0,0 +1,61 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import type * as Tool from '@effect/ai/Tool';
6
+ import * as Effect from 'effect/Effect';
7
+ import * as Function from 'effect/Function';
8
+
9
+ import { type AiParser, type ConsolePrinter } from '@dxos/ai';
10
+ import { type Message } from '@dxos/types';
11
+
12
+ /**
13
+ * Live observer of the generation process.
14
+ */
15
+ export interface GenerationObserver<Tools extends Record<string, Tool.Any> = any>
16
+ extends AiParser.ParseResponseCallbacks<Tools> {
17
+ /**
18
+ * Complete messages fired during the session, both from the model and from the user.
19
+ * This message will contain all message blocks emitted through the `onBlock` callback.
20
+ */
21
+ onMessage: (message: Message.Message) => Effect.Effect<void>;
22
+ }
23
+
24
+ export const GenerationObserver = Object.freeze({
25
+ make: ({
26
+ onBegin = Function.constant(Effect.void),
27
+ onPart = Function.constant(Effect.void),
28
+ onBlock = Function.constant(Effect.void),
29
+ onEnd = Function.constant(Effect.void),
30
+ onMessage = Function.constant(Effect.void),
31
+ }: Partial<GenerationObserver> = {}): GenerationObserver => ({
32
+ onBegin,
33
+ onPart,
34
+ onBlock,
35
+ onEnd,
36
+ onMessage,
37
+ }),
38
+
39
+ noop: () => GenerationObserver.make(),
40
+
41
+ /**
42
+ * Debug printer to be used in unit-tests and browser devtools.
43
+ */
44
+ fromPrinter: (printer: ConsolePrinter) =>
45
+ GenerationObserver.make({
46
+ onBlock: (block) =>
47
+ Effect.sync(() => {
48
+ if (block.pending) {
49
+ return; // Only prints full blocks (better for unit-tests and browser devtools).
50
+ }
51
+ printer.printContentBlock(block);
52
+ }),
53
+ onMessage: (message) =>
54
+ Effect.sync(() => {
55
+ if (message.sender.role === 'assistant') {
56
+ return; // Skip assistant messages since they are printed in the `onBlock` callback.
57
+ }
58
+ printer.printMessage(message);
59
+ }),
60
+ }),
61
+ });
@@ -0,0 +1 @@
1
+ {"conversations":[{"parameters":{"model":"@anthropic/claude-opus-4-0","stream":true,"tools":[]},"prompt":{"content":[{"role":"user","content":"Hello world!","options":{"anthropic":{"cacheControl":{"ttl":"5m","type":"ephemeral"}}}}]},"response":[{"type":"response-metadata","id":"msg_017uwtKswqvfkbAWcbhvqC4C","modelId":"claude-opus-4-20250514","timestamp":"1970-01-01T00:00:00.000Z","metadata":{}},{"type":"reasoning-start","id":"0","metadata":{}},{"type":"reasoning-delta","id":"0","delta":"This is a simple greeting. The user","metadata":{}},{"type":"reasoning-delta","id":"0","delta":" is","metadata":{}},{"type":"reasoning-delta","id":"0","delta":" saying \"Hello world!\" which is a","metadata":{}},{"type":"reasoning-delta","id":"0","delta":" common programming reference","metadata":{}},{"type":"reasoning-delta","id":"0","delta":" an","metadata":{}},{"type":"reasoning-delta","id":"0","delta":"d also just","metadata":{}},{"type":"reasoning-delta","id":"0","delta":" a friendly","metadata":{}},{"type":"reasoning-delta","id":"0","delta":" greeting","metadata":{}},{"type":"reasoning-delta","id":"0","delta":". I should respond in a warm","metadata":{}},{"type":"reasoning-delta","id":"0","delta":", friendly","metadata":{}},{"type":"reasoning-delta","id":"0","delta":" manner","metadata":{}},{"type":"reasoning-delta","id":"0","delta":".","metadata":{}},{"type":"reasoning-delta","id":"0","delta":"","metadata":{}},{"type":"reasoning-delta","id":"0","delta":"","metadata":{"anthropic":{"type":"thinking","signature":"Et0CCkYICxgCKkCdNXMJ2XlhcT2JaidKOD95WAUCmsGVKt4lBZS6WzzEO+nRk3t2VSMYzI2y8j1W8Vo9e23S7msWD/GyCvFCmUSTEgxCkIK4hDt94dX/NscaDJjA28lvZl0Ne717ryIw1SWQvyJjlU12gCD/g8ZMJG4DvWe8ZbzyUWJA0vF96hlxfAHy4REOzYUcdMwqU4eXKsQBJsFiFgDcxjwTpq+NsK2xansfoTZHS243MvBnDiFuQ2DcDsxNaAA6dLMlmfpO3xT7BLgEJjGvfooVAYs2gs8Ew+tHNGpFJzebZNzdwZ+BGrWYQm7lHDecS6AelQAQSvgiQYgCXr8u+ZgPuPOojoj3FkwzGBrXiJBk2zaX5AmbbCnyV/snVE2ZDWJovGwy/31Mh7UrGke9baTws0FmGaWoDrqXocBJjDk5RqPb/EhSPlc4vV06EYuYQWc/2p/TjA6VhmDoghgB"}}},{"type":"reasoning-end","id":"0","metadata":{}},{"type":"text-start","id":"1","metadata":{}},{"type":"text-delta","id":"1","delta":"Hello! ","metadata":{}},{"type":"text-delta","id":"1","delta":"👋 It's nice","metadata":{}},{"type":"text-delta","id":"1","delta":" to meet you. How are you doing","metadata":{}},{"type":"text-delta","id":"1","delta":" today?","metadata":{}},{"type":"text-end","id":"1","metadata":{}},{"type":"finish","reason":"stop","usage":{"inputTokens":39,"outputTokens":67,"totalTokens":106},"metadata":{"anthropic":{"usage":{"cache_creation":{"ephemeral_1h_input_tokens":0,"ephemeral_5m_input_tokens":0},"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"input_tokens":39,"output_tokens":8,"server_tool_use":null,"service_tier":"standard"}}}}]},{"parameters":{"model":"@anthropic/claude-opus-4-0","stream":true,"tools":[{"name":"Calculator","description":"Basic calculator tool","inputSchema":{"type":"object","required":["input"],"properties":{"input":{"type":"string","description":"The calculation to perform."}},"additionalProperties":false}}]},"prompt":{"content":[{"role":"user","content":"What is 10 + 30?","options":{"anthropic":{"cacheControl":{"ttl":"5m","type":"ephemeral"}}}}]},"response":[{"type":"response-metadata","id":"msg_012rNz1xGkUFW2DgQCG1kv3i","modelId":"claude-opus-4-20250514","timestamp":"1970-01-01T00:00:00.000Z","metadata":{}},{"type":"reasoning-start","id":"0","metadata":{}},{"type":"reasoning-delta","id":"0","delta":"The user is asking for","metadata":{}},{"type":"reasoning-delta","id":"0","delta":" a","metadata":{}},{"type":"reasoning-delta","id":"0","delta":" simple calculation: 10 + ","metadata":{}},{"type":"reasoning-delta","id":"0","delta":"30. I have access","metadata":{}},{"type":"reasoning-delta","id":"0","delta":" to a Calculator","metadata":{}},{"type":"reasoning-delta","id":"0","delta":" tool","metadata":{}},{"type":"reasoning-delta","id":"0","delta":" that can perform","metadata":{}},{"type":"reasoning-delta","id":"0","delta":" this","metadata":{}},{"type":"reasoning-delta","id":"0","delta":" calculation","metadata":{}},{"type":"reasoning-delta","id":"0","delta":".","metadata":{}},{"type":"reasoning-delta","id":"0","delta":" I","metadata":{}},{"type":"reasoning-delta","id":"0","delta":" nee","metadata":{}},{"type":"reasoning-delta","id":"0","delta":"d to use the Calculator function with the input","metadata":{}},{"type":"reasoning-delta","id":"0","delta":" \"10 + 30\".","metadata":{}},{"type":"reasoning-delta","id":"0","delta":"","metadata":{}},{"type":"reasoning-delta","id":"0","delta":"","metadata":{"anthropic":{"type":"thinking","signature":"EuQCCkYICxgCKkDCaQH/XgXQY671pbNNWj6taybrqZ3Y7GESqvy5W7628w3Cnu6h/lTA4OLFIYH+e0zk41gjqms8n3/i3OsqVnWHEgxRchr+8QIACHJJMY0aDCHMkDM2ij2mqYpU1iIwTI/oHXwFtEwLFSW2JTNpA/167J0LSA+syc2lRuurdVzaTnDp1b7AdqfJJhz3CxwGKssB2JNFsVzNONC7d48c2BkCk6jkzLTLFYy4ncFYXTQ7CmWLUPIER2qew+Uf46f8xyFnip5Azhjo8Z/gqRbls2QcL3pRGILnoMyZyI2P9HEsN698Vm4fDZsZ86nuq1IGcGNw8ATATH0plAkQPP+4f1r3W974KxOpM12c5KSf+6wF06B6tpvD2G61cCKB0vaVeNbBTL9XIkXB+zeIyUirsX3QiMhRzvlkk4bBQDZqiGMSa8gzGFLgUwdPdmMEobyH/fzHRXaoZkBSq20vetgYAQ=="}}},{"type":"reasoning-end","id":"0","metadata":{}},{"type":"text-start","id":"1","metadata":{}},{"type":"text-delta","id":"1","delta":"I","metadata":{}},{"type":"text-delta","id":"1","delta":"'ll help","metadata":{}},{"type":"text-delta","id":"1","delta":" you calculate that.","metadata":{}},{"type":"text-end","id":"1","metadata":{}},{"type":"tool-params-start","id":"toolu_01RkWnXmu3kpGRuJvSSwXTAw","name":"Calculator","providerExecuted":false,"metadata":{}},{"type":"tool-params-delta","id":"toolu_01RkWnXmu3kpGRuJvSSwXTAw","delta":"","metadata":{}},{"type":"tool-params-delta","id":"toolu_01RkWnXmu3kpGRuJvSSwXTAw","delta":"{\"","metadata":{}},{"type":"tool-params-delta","id":"toolu_01RkWnXmu3kpGRuJvSSwXTAw","delta":"input\": \"","metadata":{}},{"type":"tool-params-delta","id":"toolu_01RkWnXmu3kpGRuJvSSwXTAw","delta":"10 + 30\"}","metadata":{}},{"type":"tool-params-end","id":"toolu_01RkWnXmu3kpGRuJvSSwXTAw","metadata":{}},{"type":"tool-call","id":"toolu_01RkWnXmu3kpGRuJvSSwXTAw","name":"Calculator","params":{"input":"10 + 30"},"providerExecuted":false,"metadata":{}},{"type":"finish","reason":"tool-calls","usage":{"inputTokens":424,"outputTokens":117,"totalTokens":541},"metadata":{"anthropic":{"usage":{"cache_creation":{"ephemeral_1h_input_tokens":0,"ephemeral_5m_input_tokens":0},"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"input_tokens":424,"output_tokens":5,"server_tool_use":null,"service_tier":"standard"}}}}]},{"parameters":{"model":"@anthropic/claude-opus-4-0","stream":true,"tools":[{"name":"Calculator","description":"Basic calculator tool","inputSchema":{"type":"object","required":["input"],"properties":{"input":{"type":"string","description":"The calculation to perform."}},"additionalProperties":false}}]},"prompt":{"content":[{"role":"user","content":"What is 10 + 30?","options":{}},{"role":"assistant","content":[{"type":"reasoning","text":"The user is asking for a simple calculation: 10 + 30. I have access to a Calculator tool that can perform this calculation. I need to use the Calculator function with the input \"10 + 30\".","options":{}},{"type":"text","text":"I'll help you calculate that.","options":{}},{"type":"tool-call","id":"toolu_01RkWnXmu3kpGRuJvSSwXTAw","name":"Calculator","params":{"input":"10 + 30"},"providerExecuted":false,"options":{}}],"options":{}},{"role":"tool","content":[{"type":"tool-result","id":"toolu_01RkWnXmu3kpGRuJvSSwXTAw","name":"Calculator","isFailure":false,"result":{"result":40},"providerExecuted":false,"options":{}}],"options":{"anthropic":{"cacheControl":{"ttl":"5m","type":"ephemeral"}}}}]},"response":[{"type":"response-metadata","id":"msg_019G9T2pTH1sGre6wyK7x77d","modelId":"claude-opus-4-20250514","timestamp":"1970-01-01T00:00:00.000Z","metadata":{}},{"type":"text-start","id":"0","metadata":{}},{"type":"text-delta","id":"0","delta":"10 + 30 =","metadata":{}},{"type":"text-delta","id":"0","delta":" 40","metadata":{}},{"type":"text-end","id":"0","metadata":{}},{"type":"finish","reason":"stop","usage":{"inputTokens":473,"outputTokens":12,"totalTokens":485},"metadata":{"anthropic":{"usage":{"cache_creation":{"ephemeral_1h_input_tokens":0,"ephemeral_5m_input_tokens":0},"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"input_tokens":473,"output_tokens":7,"server_tool_use":null,"service_tier":"standard"}}}}]},{"parameters":{"model":"@anthropic/claude-opus-4-0","stream":true,"tools":[{"name":"Calculator","description":"Basic calculator tool","inputSchema":{"type":"object","required":["input"],"properties":{"input":{"type":"string","description":"The calculation to perform."}},"additionalProperties":false}}]},"prompt":{"content":[{"role":"user","content":"I am testing error handling in tool paramter parsing. I want you to call the calculator tool but omit the input parameter to intentionally differ from the tool schema.","options":{}},{"role":"assistant","content":[{"type":"reasoning","text":"The user is asking me to intentionally make an incorrect tool call by omitting the required \"input\" parameter when calling the Calculator tool. This is for testing error handling. \n\nAccording to the schema, the Calculator tool requires an \"input\" parameter of type string. The user wants me to call it without providing this required parameter to see how the system handles this error.\n\nI should make the tool call without the input parameter as requested.","options":{}},{"type":"text","text":"I'll make a Calculator tool call without the required \"input\" parameter as you requested for testing error handling:","options":{}},{"type":"tool-call","id":"toolu_017r1n7RCMfHtzEP5bgKCJKu","name":"Calculator","params":{},"providerExecuted":false,"options":{}}],"options":{}},{"role":"tool","content":[{"type":"tool-result","id":"toolu_017r1n7RCMfHtzEP5bgKCJKu","name":"Calculator","isFailure":false,"result":"MalformedOutput: { \"module\": \"Toolkit\", \"method\": \"Calculator.handle\", \"description\": \"Failed to decode tool call parameters for tool 'Calculator' from:\\n'{}'\", \"cause\": { readonly input: string }\n└─ [\"input\"]\n └─ is missing }\ncaused by:\nParseError: { readonly input: string }\n└─ [\"input\"]\n └─ is missing","providerExecuted":false,"options":{}}],"options":{"anthropic":{"cacheControl":{"ttl":"5m","type":"ephemeral"}}}}]},"response":[{"type":"response-metadata","id":"msg_01LwcnKy2BAxT5EsE8q8Pfa8","modelId":"claude-opus-4-20250514","timestamp":"1970-01-01T00:00:00.000Z","metadata":{}},{"type":"text-start","id":"0","metadata":{}},{"type":"text-delta","id":"0","delta":"As expecte","metadata":{}},{"type":"text-delta","id":"0","delta":"d, the system","metadata":{}},{"type":"text-delta","id":"0","delta":" returne","metadata":{}},{"type":"text-delta","id":"0","delta":"d an error indicating","metadata":{}},{"type":"text-delta","id":"0","delta":" that the require","metadata":{}},{"type":"text-delta","id":"0","delta":"d \"input\" parameter is missing from","metadata":{}},{"type":"text-delta","id":"0","delta":" the Calculator tool call. The","metadata":{}},{"type":"text-delta","id":"0","delta":" error message shows that the tool","metadata":{}},{"type":"text-delta","id":"0","delta":" expects an object","metadata":{}},{"type":"text-delta","id":"0","delta":" with a","metadata":{}},{"type":"text-delta","id":"0","delta":" require","metadata":{}},{"type":"text-delta","id":"0","delta":"d \"input\" property of","metadata":{}},{"type":"text-delta","id":"0","delta":" type string, an","metadata":{}},{"type":"text-delta","id":"0","delta":"d the","metadata":{}},{"type":"text-delta","id":"0","delta":" parsing","metadata":{}},{"type":"text-delta","id":"0","delta":" failed because this","metadata":{}},{"type":"text-delta","id":"0","delta":" parameter","metadata":{}},{"type":"text-delta","id":"0","delta":" was not","metadata":{}},{"type":"text-delta","id":"0","delta":" provided.","metadata":{}},{"type":"text-end","id":"0","metadata":{}},{"type":"finish","reason":"stop","usage":{"inputTokens":601,"outputTokens":59,"totalTokens":660},"metadata":{"anthropic":{"usage":{"cache_creation":{"ephemeral_1h_input_tokens":0,"ephemeral_5m_input_tokens":0},"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"input_tokens":601,"output_tokens":2,"server_tool_use":null,"service_tier":"standard"}}}}]},{"parameters":{"model":"@anthropic/claude-opus-4-0","stream":true,"tools":[{"name":"Calculator","description":"Basic calculator tool","inputSchema":{"type":"object","required":["input"],"properties":{"input":{"type":"string","description":"The calculation to perform."}},"additionalProperties":false}}]},"prompt":{"content":[{"role":"user","content":"I am testing error handling in tool paramter parsing. I want you to call the calculator tool but omit the input parameter to intentionally differ from the tool schema.","options":{}},{"role":"assistant","content":[{"type":"reasoning","text":"The user is explicitly asking me to call the Calculator tool incorrectly by omitting the required \"input\" parameter. This is for testing error handling. I should do exactly what they're asking - call the Calculator tool without providing the required input parameter.","options":{}},{"type":"text","text":"I'll call the Calculator tool without the required input parameter as you requested for testing error handling:","options":{}},{"type":"tool-call","id":"toolu_01Xhu7F8btMmV9W1rHuxtRZt","name":"Calculator","params":{},"providerExecuted":false,"options":{}}],"options":{}},{"role":"tool","content":[{"type":"tool-result","id":"toolu_01Xhu7F8btMmV9W1rHuxtRZt","name":"Calculator","isFailure":false,"result":"MalformedOutput: { \"module\": \"Toolkit\", \"method\": \"Calculator.handle\", \"description\": \"Failed to decode tool call parameters for tool 'Calculator' from:\\n'{}'\", \"cause\": { readonly input: string }\n└─ [\"input\"]\n └─ is missing }\ncaused by:\nParseError: { readonly input: string }\n└─ [\"input\"]\n └─ is missing","providerExecuted":false,"options":{}}],"options":{"anthropic":{"cacheControl":{"ttl":"5m","type":"ephemeral"}}}}]},"response":[{"type":"response-metadata","id":"msg_014Q8swcEVZXry1hVJuTAnpH","modelId":"claude-opus-4-20250514","timestamp":"1970-01-01T00:00:00.000Z","metadata":{}},{"type":"text-start","id":"0","metadata":{}},{"type":"text-delta","id":"0","delta":"Perfect","metadata":{}},{"type":"text-delta","id":"0","delta":"! As","metadata":{}},{"type":"text-delta","id":"0","delta":" expected, the system","metadata":{}},{"type":"text-delta","id":"0","delta":" caught","metadata":{}},{"type":"text-delta","id":"0","delta":" the error","metadata":{}},{"type":"text-delta","id":"0","delta":" an","metadata":{}},{"type":"text-delta","id":"0","delta":"d returned a detaile","metadata":{}},{"type":"text-delta","id":"0","delta":"d error message indicating that the require","metadata":{}},{"type":"text-delta","id":"0","delta":"d \"","metadata":{}},{"type":"text-delta","id":"0","delta":"input\" parameter is missing from","metadata":{}},{"type":"text-delta","id":"0","delta":" the Calculator","metadata":{}},{"type":"text-delta","id":"0","delta":" tool call. The","metadata":{}},{"type":"text-delta","id":"0","delta":" error shows:\n\n1","metadata":{}},{"type":"text-delta","id":"0","delta":". It","metadata":{}},{"type":"text-delta","id":"0","delta":" failed to decode the tool call parameters","metadata":{}},{"type":"text-delta","id":"0","delta":"\n2. The specific","metadata":{}},{"type":"text-delta","id":"0","delta":" issue is","metadata":{}},{"type":"text-delta","id":"0","delta":" that the \"input\" fiel","metadata":{}},{"type":"text-delta","id":"0","delta":"d is missing\n3. The error type","metadata":{}},{"type":"text-delta","id":"0","delta":" is \"","metadata":{}},{"type":"text-delta","id":"0","delta":"M","metadata":{}},{"type":"text-delta","id":"0","delta":"alformedOutput\"","metadata":{}},{"type":"text-delta","id":"0","delta":" with","metadata":{}},{"type":"text-delta","id":"0","delta":" a neste","metadata":{}},{"type":"text-delta","id":"0","delta":"d \"","metadata":{}},{"type":"text-delta","id":"0","delta":"ParseError\"\n\nThis demonstrates","metadata":{}},{"type":"text-delta","id":"0","delta":" that the tool","metadata":{}},{"type":"text-delta","id":"0","delta":" parameter","metadata":{}},{"type":"text-delta","id":"0","delta":" validation is working correctly an","metadata":{}},{"type":"text-delta","id":"0","delta":"d will","metadata":{}},{"type":"text-delta","id":"0","delta":" reject","metadata":{}},{"type":"text-delta","id":"0","delta":" calls","metadata":{}},{"type":"text-delta","id":"0","delta":" that don't match","metadata":{}},{"type":"text-delta","id":"0","delta":" the require","metadata":{}},{"type":"text-delta","id":"0","delta":"d schema.","metadata":{}},{"type":"text-end","id":"0","metadata":{}},{"type":"finish","reason":"stop","usage":{"inputTokens":598,"outputTokens":109,"totalTokens":707},"metadata":{"anthropic":{"usage":{"cache_creation":{"ephemeral_1h_input_tokens":0,"ephemeral_5m_input_tokens":0},"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"input_tokens":598,"output_tokens":1,"server_tool_use":null,"service_tier":"standard"}}}}]},{"parameters":{"model":"@anthropic/claude-opus-4-0","stream":true,"tools":[{"name":"Calculator","description":"Basic calculator tool","inputSchema":{"type":"object","required":["input"],"properties":{"input":{"type":"string","description":"The calculation to perform."}},"additionalProperties":false}}]},"prompt":{"content":[{"role":"user","content":"I am testing error handling in tool paramter parsing. I want you to call the calculator tool but omit the input parameter to intentionally differ from the tool schema.","options":{}},{"role":"assistant","content":[{"type":"reasoning","text":"The user is asking me to intentionally call the Calculator tool incorrectly by omitting the required \"input\" parameter. This is for testing error handling. I should do exactly what they asked - make a tool call without the required parameter.","options":{}},{"type":"text","text":"I'll make the calculator tool call without the required input parameter as you requested:","options":{}},{"type":"tool-call","id":"toolu_01Cj6NpsjAN3jog6e2EQaF1h","name":"Calculator","params":{},"providerExecuted":false,"options":{}}],"options":{}},{"role":"tool","content":[{"type":"tool-result","id":"toolu_01Cj6NpsjAN3jog6e2EQaF1h","name":"Calculator","isFailure":false,"result":"MalformedOutput: { \"module\": \"Toolkit\", \"method\": \"Calculator.handle\", \"description\": \"Failed to decode tool call parameters for tool 'Calculator' from:\\n'{}'\", \"cause\": { readonly input: string }\n└─ [\"input\"]\n └─ is missing }\ncaused by:\nParseError: { readonly input: string }\n└─ [\"input\"]\n └─ is missing","providerExecuted":false,"options":{}}],"options":{"anthropic":{"cacheControl":{"ttl":"5m","type":"ephemeral"}}}}]},"response":[{"type":"response-metadata","id":"msg_01VZkgASUpXGFq2qw9nkTzdV","modelId":"claude-opus-4-20250514","timestamp":"1970-01-01T00:00:00.000Z","metadata":{}},{"type":"text-start","id":"0","metadata":{}},{"type":"text-delta","id":"0","delta":"Perfect","metadata":{}},{"type":"text-delta","id":"0","delta":"! As","metadata":{}},{"type":"text-delta","id":"0","delta":" expecte","metadata":{}},{"type":"text-delta","id":"0","delta":"d, the system","metadata":{}},{"type":"text-delta","id":"0","delta":" returne","metadata":{}},{"type":"text-delta","id":"0","delta":"d a M","metadata":{}},{"type":"text-delta","id":"0","delta":"alformedOutput error indicating","metadata":{}},{"type":"text-delta","id":"0","delta":" that the require","metadata":{}},{"type":"text-delta","id":"0","delta":"d \"","metadata":{}},{"type":"text-delta","id":"0","delta":"input\" parameter is missing from","metadata":{}},{"type":"text-delta","id":"0","delta":" the tool call. The","metadata":{}},{"type":"text-delta","id":"0","delta":" error message clearly","metadata":{}},{"type":"text-delta","id":"0","delta":" shows that the Calculator tool expects","metadata":{}},{"type":"text-delta","id":"0","delta":" an object","metadata":{}},{"type":"text-delta","id":"0","delta":" with a","metadata":{}},{"type":"text-delta","id":"0","delta":" require","metadata":{}},{"type":"text-delta","id":"0","delta":"d \"input\" property of","metadata":{}},{"type":"text-delta","id":"0","delta":" type string, an","metadata":{}},{"type":"text-delta","id":"0","delta":"d the","metadata":{}},{"type":"text-delta","id":"0","delta":" parsing","metadata":{}},{"type":"text-delta","id":"0","delta":" failed because this","metadata":{}},{"type":"text-delta","id":"0","delta":" parameter was not provided in","metadata":{}},{"type":"text-delta","id":"0","delta":" the function call.","metadata":{}},{"type":"text-end","id":"0","metadata":{}},{"type":"finish","reason":"stop","usage":{"inputTokens":595,"outputTokens":71,"totalTokens":666},"metadata":{"anthropic":{"usage":{"cache_creation":{"ephemeral_1h_input_tokens":0,"ephemeral_5m_input_tokens":0},"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"input_tokens":595,"output_tokens":1,"server_tool_use":null,"service_tier":"standard"}}}}]},{"parameters":{"model":"@anthropic/claude-opus-4-0","stream":true,"tools":[{"name":"Calculator","description":"Basic calculator tool","inputSchema":{"type":"object","required":["input"],"properties":{"input":{"type":"string","description":"The calculation to perform."}},"additionalProperties":false}}]},"prompt":{"content":[{"role":"user","content":"I am testing error handling in tool paramter parsing. I want you to call the calculator tool but omit the input parameter to intentionally differ from the tool schema.","options":{}},{"role":"assistant","content":[{"type":"reasoning","text":"The user is explicitly asking me to intentionally call the Calculator tool incorrectly by omitting the required \"input\" parameter. This is for testing error handling. I should do exactly what they're asking - make a tool call without the required parameter.","options":{}},{"type":"text","text":"I'll intentionally call the Calculator tool without the required \"input\" parameter as you requested for testing error handling:","options":{}},{"type":"tool-call","id":"toolu_01U8MHzVVAsEtED1skwMMLGx","name":"Calculator","params":{},"providerExecuted":false,"options":{}}],"options":{}},{"role":"tool","content":[{"type":"tool-result","id":"toolu_01U8MHzVVAsEtED1skwMMLGx","name":"Calculator","isFailure":false,"result":"MalformedOutput: { \"module\": \"Toolkit\", \"method\": \"Calculator.handle\", \"description\": \"Failed to decode tool call parameters for tool 'Calculator' from:\\n'{}'\", \"cause\": { readonly input: string }\n└─ [\"input\"]\n └─ is missing }\ncaused by:\nParseError: { readonly input: string }\n└─ [\"input\"]\n └─ is missing","providerExecuted":false,"options":{}}],"options":{"anthropic":{"cacheControl":{"ttl":"5m","type":"ephemeral"}}}}]},"response":[{"type":"response-metadata","id":"msg_01E1ZCajrbTCFUw1DKMNnPmW","modelId":"claude-opus-4-20250514","timestamp":"1970-01-01T00:00:00.000Z","metadata":{}},{"type":"text-start","id":"0","metadata":{}},{"type":"text-delta","id":"0","delta":"As expected, this","metadata":{}},{"type":"text-delta","id":"0","delta":" cause","metadata":{}},{"type":"text-delta","id":"0","delta":"d an error because the \"","metadata":{}},{"type":"text-delta","id":"0","delta":"input\" parameter is required according to the","metadata":{}},{"type":"text-delta","id":"0","delta":" tool","metadata":{}},{"type":"text-delta","id":"0","delta":"'s","metadata":{}},{"type":"text-delta","id":"0","delta":" schema but","metadata":{}},{"type":"text-delta","id":"0","delta":" was not","metadata":{}},{"type":"text-delta","id":"0","delta":" provided.","metadata":{}},{"type":"text-delta","id":"0","delta":" The error message clearly","metadata":{}},{"type":"text-delta","id":"0","delta":" indicates that the \"","metadata":{}},{"type":"text-delta","id":"0","delta":"input\" parameter is missing from the function","metadata":{}},{"type":"text-delta","id":"0","delta":" call.","metadata":{}},{"type":"text-end","id":"0","metadata":{}},{"type":"finish","reason":"stop","usage":{"inputTokens":602,"outputTokens":47,"totalTokens":649},"metadata":{"anthropic":{"usage":{"cache_creation":{"ephemeral_1h_input_tokens":0,"ephemeral_5m_input_tokens":0},"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"input_tokens":602,"output_tokens":4,"server_tool_use":null,"service_tier":"standard"}}}}]},{"parameters":{"model":"@anthropic/claude-opus-4-0","stream":true,"tools":[{"name":"Calculator","description":"Basic calculator tool","inputSchema":{"type":"object","required":["input"],"properties":{"input":{"type":"string","description":"The calculation to perform."}},"additionalProperties":false}}]},"prompt":{"content":[{"role":"user","content":"I am testing error handling in tool paramter parsing. I want you to call the calculator tool but omit the input parameter to intentionally differ from the tool schema.","options":{}},{"role":"assistant","content":[{"type":"reasoning","text":"The user is specifically asking me to intentionally make an error by calling the calculator tool without providing the required \"input\" parameter. This is for testing error handling. I should do exactly as they ask - call the Calculator function but omit the input parameter.","options":{}},{"type":"text","text":"I'll call the calculator tool without the required input parameter as you requested for testing error handling:","options":{}},{"type":"tool-call","id":"toolu_01CVBkZhcEYZikyNaaH2z9mS","name":"Calculator","params":{},"providerExecuted":false,"options":{}}],"options":{}},{"role":"tool","content":[{"type":"tool-result","id":"toolu_01CVBkZhcEYZikyNaaH2z9mS","name":"Calculator","isFailure":false,"result":"MalformedOutput: { \"module\": \"Toolkit\", \"method\": \"Calculator.handle\", \"description\": \"Failed to decode tool call parameters for tool 'Calculator' from:\\n'{}'\", \"cause\": { readonly input: string }\n└─ [\"input\"]\n └─ is missing }\ncaused by:\nParseError: { readonly input: string }\n└─ [\"input\"]\n └─ is missing","providerExecuted":false,"options":{}}],"options":{"anthropic":{"cacheControl":{"ttl":"5m","type":"ephemeral"}}}}]},"response":[{"type":"response-metadata","id":"msg_01N8WsmrXjnPKG22vDuHm57j","modelId":"claude-opus-4-20250514","timestamp":"1970-01-01T00:00:00.000Z","metadata":{}},{"type":"text-start","id":"0","metadata":{}},{"type":"text-delta","id":"0","delta":"Perfect","metadata":{}},{"type":"text-delta","id":"0","delta":"! As","metadata":{}},{"type":"text-delta","id":"0","delta":" expected, the system","metadata":{}},{"type":"text-delta","id":"0","delta":" caught","metadata":{}},{"type":"text-delta","id":"0","delta":" the error","metadata":{}},{"type":"text-delta","id":"0","delta":" an","metadata":{}},{"type":"text-delta","id":"0","delta":"d returned a detaile","metadata":{}},{"type":"text-delta","id":"0","delta":"d error message indicating","metadata":{}},{"type":"text-delta","id":"0","delta":" that the require","metadata":{}},{"type":"text-delta","id":"0","delta":"d \"","metadata":{}},{"type":"text-delta","id":"0","delta":"input\" parameter is missing from","metadata":{}},{"type":"text-delta","id":"0","delta":" the Calculator","metadata":{}},{"type":"text-delta","id":"0","delta":" tool call","metadata":{}},{"type":"text-delta","id":"0","delta":". The","metadata":{}},{"type":"text-delta","id":"0","delta":" error shows","metadata":{}},{"type":"text-delta","id":"0","delta":":","metadata":{}},{"type":"text-delta","id":"0","delta":"\n\n1. It","metadata":{}},{"type":"text-delta","id":"0","delta":"'s","metadata":{}},{"type":"text-delta","id":"0","delta":" a \"MalformedOutput\"","metadata":{}},{"type":"text-delta","id":"0","delta":" error\n2. The tool","metadata":{}},{"type":"text-delta","id":"0","delta":" call","metadata":{}},{"type":"text-delta","id":"0","delta":" parameters faile","metadata":{}},{"type":"text-delta","id":"0","delta":"d to decode\n3.","metadata":{}},{"type":"text-delta","id":"0","delta":" Specifically, the \"input\" parameter is","metadata":{}},{"type":"text-delta","id":"0","delta":" missing (","metadata":{}},{"type":"text-delta","id":"0","delta":"as","metadata":{}},{"type":"text-delta","id":"0","delta":" shown","metadata":{}},{"type":"text-delta","id":"0","delta":" in","metadata":{}},{"type":"text-delta","id":"0","delta":" the schema","metadata":{}},{"type":"text-delta","id":"0","delta":" validation","metadata":{}},{"type":"text-delta","id":"0","delta":" error)","metadata":{}},{"type":"text-delta","id":"0","delta":"\n\nThis demonstrates that the tool","metadata":{}},{"type":"text-delta","id":"0","delta":" parameter","metadata":{}},{"type":"text-delta","id":"0","delta":" parsing correctly","metadata":{}},{"type":"text-delta","id":"0","delta":" validates","metadata":{}},{"type":"text-delta","id":"0","delta":" against","metadata":{}},{"type":"text-delta","id":"0","delta":" the schema and provides","metadata":{}},{"type":"text-delta","id":"0","delta":" helpful","metadata":{}},{"type":"text-delta","id":"0","delta":" error messages when required parameters are om","metadata":{}},{"type":"text-delta","id":"0","delta":"itted.","metadata":{}},{"type":"text-end","id":"0","metadata":{}},{"type":"finish","reason":"stop","usage":{"inputTokens":598,"outputTokens":110,"totalTokens":708},"metadata":{"anthropic":{"usage":{"cache_creation":{"ephemeral_1h_input_tokens":0,"ephemeral_5m_input_tokens":0},"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"input_tokens":598,"output_tokens":1,"server_tool_use":null,"service_tier":"standard"}}}}]},{"parameters":{"model":"@anthropic/claude-opus-4-0","stream":true,"tools":[{"name":"Calculator","description":"Basic calculator tool","inputSchema":{"type":"object","required":["input"],"properties":{"input":{"type":"string","description":"The calculation to perform."}},"additionalProperties":false}}]},"prompt":{"content":[{"role":"user","content":"I am testing error handling in tool paramter parsing. I want you to call the calculator tool but omit the input parameter to intentionally differ from the tool schema.","options":{}},{"role":"assistant","content":[{"type":"reasoning","text":"The user is explicitly asking me to make an incorrect tool call for testing purposes. They want me to call the Calculator tool but intentionally omit the required \"input\" parameter to see how the system handles this error.\n\nI should do exactly as they ask - call the Calculator tool without providing the input parameter.","options":{}},{"type":"text","text":"I'll call the Calculator tool without the required input parameter as you requested for testing error handling:","options":{}},{"type":"tool-call","id":"toolu_01726iiTkhXnF7sK3novVpQD","name":"Calculator","params":{},"providerExecuted":false,"options":{}}],"options":{}},{"role":"tool","content":[{"type":"tool-result","id":"toolu_01726iiTkhXnF7sK3novVpQD","name":"Calculator","isFailure":false,"result":"MalformedOutput: { \"module\": \"Toolkit\", \"method\": \"Calculator.handle\", \"description\": \"Failed to decode tool call parameters for tool 'Calculator' from:\\n'{}'\", \"cause\": { readonly input: string }\n└─ [\"input\"]\n └─ is missing }\ncaused by:\nParseError: { readonly input: string }\n└─ [\"input\"]\n └─ is missing","providerExecuted":false,"options":{}}],"options":{"anthropic":{"cacheControl":{"ttl":"5m","type":"ephemeral"}}}}]},"response":[{"type":"response-metadata","id":"msg_01B3E3XdtmyBssmLNfBDLcMD","modelId":"claude-opus-4-20250514","timestamp":"1970-01-01T00:00:00.000Z","metadata":{}},{"type":"text-start","id":"0","metadata":{}},{"type":"text-delta","id":"0","delta":"As expected, the system","metadata":{}},{"type":"text-delta","id":"0","delta":" returne","metadata":{}},{"type":"text-delta","id":"0","delta":"d an","metadata":{}},{"type":"text-delta","id":"0","delta":" error indicating","metadata":{}},{"type":"text-delta","id":"0","delta":" that the require","metadata":{}},{"type":"text-delta","id":"0","delta":"d \"input\" parameter is missing from","metadata":{}},{"type":"text-delta","id":"0","delta":" the Calculator","metadata":{}},{"type":"text-delta","id":"0","delta":" tool call","metadata":{}},{"type":"text-delta","id":"0","delta":". The error message shows that the tool","metadata":{}},{"type":"text-delta","id":"0","delta":" expects an object","metadata":{}},{"type":"text-delta","id":"0","delta":" with a","metadata":{}},{"type":"text-delta","id":"0","delta":" require","metadata":{}},{"type":"text-delta","id":"0","delta":"d \"input\" property of","metadata":{}},{"type":"text-delta","id":"0","delta":" type string, an","metadata":{}},{"type":"text-delta","id":"0","delta":"d the","metadata":{}},{"type":"text-delta","id":"0","delta":" parser","metadata":{}},{"type":"text-delta","id":"0","delta":" detecte","metadata":{}},{"type":"text-delta","id":"0","delta":"d that this","metadata":{}},{"type":"text-delta","id":"0","delta":" property was","metadata":{}},{"type":"text-delta","id":"0","delta":" not","metadata":{}},{"type":"text-delta","id":"0","delta":" provided in","metadata":{}},{"type":"text-delta","id":"0","delta":" the empty","metadata":{}},{"type":"text-delta","id":"0","delta":" parameter","metadata":{}},{"type":"text-delta","id":"0","delta":" set","metadata":{}},{"type":"text-delta","id":"0","delta":" I","metadata":{}},{"type":"text-delta","id":"0","delta":" sent","metadata":{}},{"type":"text-delta","id":"0","delta":".","metadata":{}},{"type":"text-end","id":"0","metadata":{}},{"type":"finish","reason":"stop","usage":{"inputTokens":598,"outputTokens":66,"totalTokens":664},"metadata":{"anthropic":{"usage":{"cache_creation":{"ephemeral_1h_input_tokens":0,"ephemeral_5m_input_tokens":0},"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"input_tokens":598,"output_tokens":5,"server_tool_use":null,"service_tier":"standard"}}}}]},{"parameters":{"model":"@anthropic/claude-opus-4-0","stream":true,"tools":[{"name":"Calculator","description":"Basic calculator tool","inputSchema":{"type":"object","required":["input"],"properties":{"input":{"type":"string","description":"The calculation to perform."}},"additionalProperties":false}}]},"prompt":{"content":[{"role":"user","content":"I am testing error handling in tool paramter parsing. I want you to call the calculator tool but omit the input parameter to intentionally differ from the tool schema.","options":{}},{"role":"assistant","content":[{"type":"reasoning","text":"The user is explicitly asking me to call the calculator tool incorrectly by omitting the required \"input\" parameter. This is for testing error handling. I should do exactly what they asked - call the tool without the input parameter.","options":{}},{"type":"text","text":"I'll call the calculator tool without the input parameter as requested for your error handling test:","options":{}},{"type":"tool-call","id":"toolu_011JJQC9oxAckyRM91rstDhx","name":"Calculator","params":{},"providerExecuted":false,"options":{}}],"options":{}},{"role":"tool","content":[{"type":"tool-result","id":"toolu_011JJQC9oxAckyRM91rstDhx","name":"Calculator","isFailure":false,"result":"MalformedOutput: { \"module\": \"Toolkit\", \"method\": \"Calculator.handle\", \"description\": \"Failed to decode tool call parameters for tool 'Calculator' from:\\n'{}'\", \"cause\": { readonly input: string }\n└─ [\"input\"]\n └─ is missing }\ncaused by:\nParseError: { readonly input: string }\n└─ [\"input\"]\n └─ is missing","providerExecuted":false,"options":{}}],"options":{"anthropic":{"cacheControl":{"ttl":"5m","type":"ephemeral"}}}}]},"response":[{"type":"response-metadata","id":"msg_016gJRaPtRkr9tPDL8tHzHfy","modelId":"claude-opus-4-20250514","timestamp":"1970-01-01T00:00:00.000Z","metadata":{}},{"type":"text-start","id":"0","metadata":{}},{"type":"text-delta","id":"0","delta":"Perfect","metadata":{}},{"type":"text-delta","id":"0","delta":"! As","metadata":{}},{"type":"text-delta","id":"0","delta":" expected, the system","metadata":{}},{"type":"text-delta","id":"0","delta":" caught","metadata":{}},{"type":"text-delta","id":"0","delta":" the missing required parameter an","metadata":{}},{"type":"text-delta","id":"0","delta":"d returned an","metadata":{}},{"type":"text-delta","id":"0","delta":" error.","metadata":{}},{"type":"text-delta","id":"0","delta":" The","metadata":{}},{"type":"text-delta","id":"0","delta":" error message clearly","metadata":{}},{"type":"text-delta","id":"0","delta":" indicates that:","metadata":{}},{"type":"text-delta","id":"0","delta":"\n\n1. The tool","metadata":{}},{"type":"text-delta","id":"0","delta":" call","metadata":{}},{"type":"text-delta","id":"0","delta":" faile","metadata":{}},{"type":"text-delta","id":"0","delta":"d to decode parameters","metadata":{}},{"type":"text-delta","id":"0","delta":" for","metadata":{}},{"type":"text-delta","id":"0","delta":" the Calculator tool\n2. The specific","metadata":{}},{"type":"text-delta","id":"0","delta":" issue is","metadata":{}},{"type":"text-delta","id":"0","delta":" that the \"","metadata":{}},{"type":"text-delta","id":"0","delta":"input\" parameter is missing","metadata":{}},{"type":"text-delta","id":"0","delta":"\n3. The \"","metadata":{}},{"type":"text-delta","id":"0","delta":"input\" parameter is require","metadata":{}},{"type":"text-delta","id":"0","delta":"d (","metadata":{}},{"type":"text-delta","id":"0","delta":"as define","metadata":{}},{"type":"text-delta","id":"0","delta":"d in the schema where","metadata":{}},{"type":"text-delta","id":"0","delta":" it's liste","metadata":{}},{"type":"text-delta","id":"0","delta":"d in","metadata":{}},{"type":"text-delta","id":"0","delta":" the \"required\" array)\n\nThis","metadata":{}},{"type":"text-delta","id":"0","delta":" demonstrates that the error handling is working correctly","metadata":{}},{"type":"text-delta","id":"0","delta":" - it validates","metadata":{}},{"type":"text-delta","id":"0","delta":" the","metadata":{}},{"type":"text-delta","id":"0","delta":" tool","metadata":{}},{"type":"text-delta","id":"0","delta":" parameters","metadata":{}},{"type":"text-delta","id":"0","delta":" against","metadata":{}},{"type":"text-delta","id":"0","delta":" the define","metadata":{}},{"type":"text-delta","id":"0","delta":"d schema and provides","metadata":{}},{"type":"text-delta","id":"0","delta":" inform","metadata":{}},{"type":"text-delta","id":"0","delta":"ative error messages when require","metadata":{}},{"type":"text-delta","id":"0","delta":"d parameters are om","metadata":{}},{"type":"text-delta","id":"0","delta":"itted.","metadata":{}},{"type":"text-end","id":"0","metadata":{}},{"type":"finish","reason":"stop","usage":{"inputTokens":597,"outputTokens":116,"totalTokens":713},"metadata":{"anthropic":{"usage":{"cache_creation":{"ephemeral_1h_input_tokens":0,"ephemeral_5m_input_tokens":0},"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"input_tokens":597,"output_tokens":1,"server_tool_use":null,"service_tier":"standard"}}}}]},{"parameters":{"model":"@anthropic/claude-opus-4-0","stream":true,"tools":[{"name":"Calculator","description":"Basic calculator tool","inputSchema":{"type":"object","required":["input"],"properties":{"input":{"type":"string","description":"The calculation to perform."}},"additionalProperties":false}}]},"prompt":{"content":[{"role":"user","content":"I am testing error handling in tool paramter parsing. I want you to call the calculator tool but omit the input parameter to intentionally differ from the tool schema.","options":{}},{"role":"assistant","content":[{"type":"reasoning","text":"The user is explicitly asking me to make an incorrect tool call for testing purposes. They want me to call the Calculator function but deliberately omit the required \"input\" parameter to test error handling.\n\nI should do exactly what they asked - call the Calculator tool without providing the input parameter.","options":{}},{"type":"text","text":"I'll call the Calculator tool without the required input parameter as you requested for testing error handling:","options":{}},{"type":"tool-call","id":"toolu_01KgYHncH8KeSeEXKaS8v1nk","name":"Calculator","params":{},"providerExecuted":false,"options":{}}],"options":{}},{"role":"tool","content":[{"type":"tool-result","id":"toolu_01KgYHncH8KeSeEXKaS8v1nk","name":"Calculator","isFailure":false,"result":"MalformedOutput: { \"module\": \"Toolkit\", \"method\": \"Calculator.handle\", \"description\": \"Failed to decode tool call parameters for tool 'Calculator' from:\\n'{}'\", \"cause\": { readonly input: string }\n└─ [\"input\"]\n └─ is missing }\ncaused by:\nParseError: { readonly input: string }\n└─ [\"input\"]\n └─ is missing","providerExecuted":false,"options":{}}],"options":{"anthropic":{"cacheControl":{"ttl":"5m","type":"ephemeral"}}}}]},"response":[{"type":"response-metadata","id":"msg_01HyNQFkeRifAfdbn2PKA9Wp","modelId":"claude-opus-4-20250514","timestamp":"1970-01-01T00:00:00.000Z","metadata":{}},{"type":"text-start","id":"0","metadata":{}},{"type":"text-delta","id":"0","delta":"Perfect","metadata":{}},{"type":"text-delta","id":"0","delta":"! The error handling is working as expecte","metadata":{}},{"type":"text-delta","id":"0","delta":"d. The","metadata":{}},{"type":"text-delta","id":"0","delta":" system","metadata":{}},{"type":"text-delta","id":"0","delta":" caught","metadata":{}},{"type":"text-delta","id":"0","delta":" that the required \"","metadata":{}},{"type":"text-delta","id":"0","delta":"input\" parameter was","metadata":{}},{"type":"text-delta","id":"0","delta":" missing and returned a detaile","metadata":{}},{"type":"text-delta","id":"0","delta":"d error message indicating:","metadata":{}},{"type":"text-delta","id":"0","delta":"\n- The tool call","metadata":{}},{"type":"text-delta","id":"0","delta":" faile","metadata":{}},{"type":"text-delta","id":"0","delta":"d to decode parameters","metadata":{}},{"type":"text-delta","id":"0","delta":"\n- The specific fiel","metadata":{}},{"type":"text-delta","id":"0","delta":"d \"","metadata":{}},{"type":"text-delta","id":"0","delta":"input\" is missing\n- The expecte","metadata":{}},{"type":"text-delta","id":"0","delta":"d schema","metadata":{}},{"type":"text-delta","id":"0","delta":" requires a","metadata":{}},{"type":"text-delta","id":"0","delta":" readonly","metadata":{}},{"type":"text-delta","id":"0","delta":" input","metadata":{}},{"type":"text-delta","id":"0","delta":" string","metadata":{}},{"type":"text-delta","id":"0","delta":"\n\nThis demonstrates that the parameter","metadata":{}},{"type":"text-delta","id":"0","delta":" validation is properly enforcing","metadata":{}},{"type":"text-delta","id":"0","delta":" the tool","metadata":{}},{"type":"text-delta","id":"0","delta":" schema requirements.","metadata":{}},{"type":"text-end","id":"0","metadata":{}},{"type":"finish","reason":"stop","usage":{"inputTokens":598,"outputTokens":78,"totalTokens":676},"metadata":{"anthropic":{"usage":{"cache_creation":{"ephemeral_1h_input_tokens":0,"ephemeral_5m_input_tokens":0},"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"input_tokens":598,"output_tokens":1,"server_tool_use":null,"service_tier":"standard"}}}}]},{"parameters":{"model":"@anthropic/claude-opus-4-0","stream":true,"tools":[{"name":"Calculator","description":"Basic calculator tool","inputSchema":{"type":"object","required":["input"],"properties":{"input":{"type":"string","description":"The calculation to perform."}},"additionalProperties":false}}]},"prompt":{"content":[{"role":"user","content":"I am testing error handling in tool paramter parsing. I want you to call the calculator tool but omit the input parameter to intentionally differ from the tool schema.","options":{}},{"role":"assistant","content":[{"type":"reasoning","text":"The user is explicitly asking me to make an incorrect tool call by omitting the required \"input\" parameter from the Calculator function. This is for testing error handling. I'll make the function call without the input parameter as requested.","options":{}},{"type":"text","text":"I understand you want me to intentionally make an incorrect tool call for testing purposes. I'll call the Calculator tool without the required \"input\" parameter:","options":{}},{"type":"tool-call","id":"toolu_01W2EJ2Pqp2tAj1hDrVCeobt","name":"Calculator","params":{},"providerExecuted":false,"options":{}}],"options":{}},{"role":"tool","content":[{"type":"tool-result","id":"toolu_01W2EJ2Pqp2tAj1hDrVCeobt","name":"Calculator","isFailure":false,"result":"MalformedOutput: { \"module\": \"Toolkit\", \"method\": \"Calculator.handle\", \"description\": \"Failed to decode tool call parameters for tool 'Calculator' from:\\n'{}'\", \"cause\": { readonly input: string }\n└─ [\"input\"]\n └─ is missing }\ncaused by:\nParseError: { readonly input: string }\n└─ [\"input\"]\n └─ is missing","providerExecuted":false,"options":{}}],"options":{"anthropic":{"cacheControl":{"ttl":"5m","type":"ephemeral"}}}}]},"response":[{"type":"response-metadata","id":"msg_015NnS1UfNwCsAyN6dWCfCsj","modelId":"claude-opus-4-20250514","timestamp":"1970-01-01T00:00:00.000Z","metadata":{}},{"type":"text-start","id":"0","metadata":{}},{"type":"text-delta","id":"0","delta":"Perfect","metadata":{}},{"type":"text-delta","id":"0","delta":"! The","metadata":{}},{"type":"text-delta","id":"0","delta":" error handling is working correctly.","metadata":{}},{"type":"text-delta","id":"0","delta":" The","metadata":{}},{"type":"text-delta","id":"0","delta":" system","metadata":{}},{"type":"text-delta","id":"0","delta":" detecte","metadata":{}},{"type":"text-delta","id":"0","delta":"d that the require","metadata":{}},{"type":"text-delta","id":"0","delta":"d \"input\" parameter was","metadata":{}},{"type":"text-delta","id":"0","delta":" missing from","metadata":{}},{"type":"text-delta","id":"0","delta":" the Calculator","metadata":{}},{"type":"text-delta","id":"0","delta":" tool call an","metadata":{}},{"type":"text-delta","id":"0","delta":"d returned a detaile","metadata":{}},{"type":"text-delta","id":"0","delta":"d error message indicating:","metadata":{}},{"type":"text-delta","id":"0","delta":"\n\n1","metadata":{}},{"type":"text-delta","id":"0","delta":". The tool call","metadata":{}},{"type":"text-delta","id":"0","delta":" parameters","metadata":{}},{"type":"text-delta","id":"0","delta":" faile","metadata":{}},{"type":"text-delta","id":"0","delta":"d to decode\n2. The specific missing","metadata":{}},{"type":"text-delta","id":"0","delta":" parameter:","metadata":{}},{"type":"text-delta","id":"0","delta":" \"input\"\n3. The expecte","metadata":{}},{"type":"text-delta","id":"0","delta":"d schema","metadata":{}},{"type":"text-delta","id":"0","delta":" structure","metadata":{}},{"type":"text-delta","id":"0","delta":":","metadata":{}},{"type":"text-delta","id":"0","delta":" `{ readonly input: string }`","metadata":{}},{"type":"text-delta","id":"0","delta":"\n\nThis error","metadata":{}},{"type":"text-delta","id":"0","delta":" response","metadata":{}},{"type":"text-delta","id":"0","delta":" confirms","metadata":{}},{"type":"text-delta","id":"0","delta":" that the parameter validation","metadata":{}},{"type":"text-delta","id":"0","delta":" is functioning","metadata":{}},{"type":"text-delta","id":"0","delta":" as expecte","metadata":{}},{"type":"text-delta","id":"0","delta":"d when","metadata":{}},{"type":"text-delta","id":"0","delta":" require","metadata":{}},{"type":"text-delta","id":"0","delta":"d parameters are om","metadata":{}},{"type":"text-delta","id":"0","delta":"itted.","metadata":{}},{"type":"text-end","id":"0","metadata":{}},{"type":"finish","reason":"stop","usage":{"inputTokens":610,"outputTokens":94,"totalTokens":704},"metadata":{"anthropic":{"usage":{"cache_creation":{"ephemeral_1h_input_tokens":0,"ephemeral_5m_input_tokens":0},"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"input_tokens":610,"output_tokens":1,"server_tool_use":null,"service_tier":"standard"}}}}]},{"parameters":{"model":"@anthropic/claude-opus-4-0","stream":true,"tools":[{"name":"Calculator","description":"Basic calculator tool","inputSchema":{"type":"object","required":["input"],"properties":{"input":{"type":"string","description":"The calculation to perform."}},"additionalProperties":false}}]},"prompt":{"content":[{"role":"user","content":"I am testing error handling in tool paramter parsing. I want you to call the calculator tool but omit the input parameter to intentionally differ from the tool schema.","options":{}},{"role":"assistant","content":[{"type":"reasoning","text":"The user is specifically asking me to intentionally call the calculator tool incorrectly by omitting the required \"input\" parameter. This is for testing error handling. They want me to make an invalid tool call on purpose.\n\nI should do exactly what they asked - call the Calculator function without providing the required \"input\" parameter.","options":{}},{"type":"text","text":"I understand you want me to intentionally make an incorrect tool call for testing purposes. I'll call the Calculator function without the required \"input\" parameter:","options":{}},{"type":"tool-call","id":"toolu_016cxVEiPd9t8mhq7bXVFwgT","name":"Calculator","params":{},"providerExecuted":false,"options":{}}],"options":{}},{"role":"tool","content":[{"type":"tool-result","id":"toolu_016cxVEiPd9t8mhq7bXVFwgT","name":"Calculator","isFailure":false,"result":"MalformedOutput: { \"module\": \"Toolkit\", \"method\": \"Calculator.handle\", \"description\": \"Failed to decode tool call parameters for tool 'Calculator' from:\\n'{}'\", \"cause\": { readonly input: string }\n└─ [\"input\"]\n └─ is missing }\ncaused by:\nParseError: { readonly input: string }\n└─ [\"input\"]\n └─ is missing","providerExecuted":false,"options":{}}],"options":{"anthropic":{"cacheControl":{"ttl":"5m","type":"ephemeral"}}}}]},"response":[{"type":"response-metadata","id":"msg_01M4DAqgcjAUmjuShAhMAbqK","modelId":"claude-opus-4-20250514","timestamp":"1970-01-01T00:00:00.000Z","metadata":{}},{"type":"text-start","id":"0","metadata":{}},{"type":"text-delta","id":"0","delta":"Perfect","metadata":{}},{"type":"text-delta","id":"0","delta":"! The","metadata":{}},{"type":"text-delta","id":"0","delta":" error","metadata":{}},{"type":"text-delta","id":"0","delta":" handling is working correctly.","metadata":{}},{"type":"text-delta","id":"0","delta":" The","metadata":{}},{"type":"text-delta","id":"0","delta":" system","metadata":{}},{"type":"text-delta","id":"0","delta":" caught","metadata":{}},{"type":"text-delta","id":"0","delta":" that the require","metadata":{}},{"type":"text-delta","id":"0","delta":"d \"input\" parameter was missing and returne","metadata":{}},{"type":"text-delta","id":"0","delta":"d a detaile","metadata":{}},{"type":"text-delta","id":"0","delta":"d error message explaining","metadata":{}},{"type":"text-delta","id":"0","delta":":","metadata":{}},{"type":"text-delta","id":"0","delta":"\n\n1. The tool call","metadata":{}},{"type":"text-delta","id":"0","delta":" faile","metadata":{}},{"type":"text-delta","id":"0","delta":"d to decode parameters","metadata":{}},{"type":"text-delta","id":"0","delta":"\n2. The specific","metadata":{}},{"type":"text-delta","id":"0","delta":" missing","metadata":{}},{"type":"text-delta","id":"0","delta":" fiel","metadata":{}},{"type":"text-delta","id":"0","delta":"d:","metadata":{}},{"type":"text-delta","id":"0","delta":" \"input\"","metadata":{}},{"type":"text-delta","id":"0","delta":" \n3. The expecte","metadata":{}},{"type":"text-delta","id":"0","delta":"d schema","metadata":{}},{"type":"text-delta","id":"0","delta":" structure","metadata":{}},{"type":"text-delta","id":"0","delta":":","metadata":{}},{"type":"text-delta","id":"0","delta":" `{","metadata":{}},{"type":"text-delta","id":"0","delta":" readonly","metadata":{}},{"type":"text-delta","id":"0","delta":" input: string }`\n\nThis demonstrates","metadata":{}},{"type":"text-delta","id":"0","delta":" that the parameter","metadata":{}},{"type":"text-delta","id":"0","delta":" validation","metadata":{}},{"type":"text-delta","id":"0","delta":" is properly","metadata":{}},{"type":"text-delta","id":"0","delta":" checking against","metadata":{}},{"type":"text-delta","id":"0","delta":" the tool","metadata":{}},{"type":"text-delta","id":"0","delta":"'s JSON","metadata":{}},{"type":"text-delta","id":"0","delta":" schema and rej","metadata":{}},{"type":"text-delta","id":"0","delta":"ecting calls","metadata":{}},{"type":"text-delta","id":"0","delta":" that","metadata":{}},{"type":"text-delta","id":"0","delta":" don't include","metadata":{}},{"type":"text-delta","id":"0","delta":" all required parameters.","metadata":{}},{"type":"text-end","id":"0","metadata":{}},{"type":"finish","reason":"stop","usage":{"inputTokens":610,"outputTokens":98,"totalTokens":708},"metadata":{"anthropic":{"usage":{"cache_creation":{"ephemeral_1h_input_tokens":0,"ephemeral_5m_input_tokens":0},"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"input_tokens":610,"output_tokens":1,"server_tool_use":null,"service_tier":"standard"}}}}]},{"parameters":{"model":"@anthropic/claude-opus-4-0","stream":true,"tools":[{"name":"Calculator","description":"Basic calculator tool","inputSchema":{"type":"object","required":["input"],"properties":{"input":{"type":"string","description":"The calculation to perform."}},"additionalProperties":false}}]},"prompt":{"content":[{"role":"user","content":"I am testing error handling in tool paramter parsing. I want you to call the calculator tool but omit the input parameter to intentionally differ from the tool schema.","options":{}},{"role":"assistant","content":[{"type":"reasoning","text":"The user is explicitly asking me to intentionally call the calculator tool incorrectly by omitting the required \"input\" parameter. This is for testing error handling. I should do exactly as they ask - call the Calculator function without providing the input parameter.","options":{}},{"type":"text","text":"I'll call the calculator tool without the required input parameter as requested for your error handling test:","options":{}},{"type":"tool-call","id":"toolu_012AjotXs8rRcN3ifCgfDzfo","name":"Calculator","params":{},"providerExecuted":false,"options":{}}],"options":{}},{"role":"tool","content":[{"type":"tool-result","id":"toolu_012AjotXs8rRcN3ifCgfDzfo","name":"Calculator","isFailure":false,"result":"MalformedOutput: { \"module\": \"Toolkit\", \"method\": \"Calculator.handle\", \"description\": \"Failed to decode tool call parameters for tool 'Calculator' from:\\n'{}'\", \"cause\": { readonly input: string }\n└─ [\"input\"]\n └─ is missing }\ncaused by:\nParseError: { readonly input: string }\n└─ [\"input\"]\n └─ is missing","providerExecuted":false,"options":{}}],"options":{"anthropic":{"cacheControl":{"ttl":"5m","type":"ephemeral"}}}}]},"response":[{"type":"response-metadata","id":"msg_01MkUfXu1fN2higVMbKKMVah","modelId":"claude-opus-4-20250514","timestamp":"1970-01-01T00:00:00.000Z","metadata":{}},{"type":"text-start","id":"0","metadata":{}},{"type":"text-delta","id":"0","delta":"Perfect","metadata":{}},{"type":"text-delta","id":"0","delta":"! As","metadata":{}},{"type":"text-delta","id":"0","delta":" expected, the system","metadata":{}},{"type":"text-delta","id":"0","delta":" returne","metadata":{}},{"type":"text-delta","id":"0","delta":"d a `MalformedOutput`","metadata":{}},{"type":"text-delta","id":"0","delta":" error indicating","metadata":{}},{"type":"text-delta","id":"0","delta":" that the","metadata":{}},{"type":"text-delta","id":"0","delta":" require","metadata":{}},{"type":"text-delta","id":"0","delta":"d parameter","metadata":{}},{"type":"text-delta","id":"0","delta":" \"","metadata":{}},{"type":"text-delta","id":"0","delta":"input\" is missing from","metadata":{}},{"type":"text-delta","id":"0","delta":" the tool call. The","metadata":{}},{"type":"text-delta","id":"0","delta":" error message clearly","metadata":{}},{"type":"text-delta","id":"0","delta":" shows:","metadata":{}},{"type":"text-delta","id":"0","delta":"\n\n1. The tool call","metadata":{}},{"type":"text-delta","id":"0","delta":" parameters","metadata":{}},{"type":"text-delta","id":"0","delta":" faile","metadata":{}},{"type":"text-delta","id":"0","delta":"d to decode\n2. The specific issue","metadata":{}},{"type":"text-delta","id":"0","delta":":","metadata":{}},{"type":"text-delta","id":"0","delta":" `[\"","metadata":{}},{"type":"text-delta","id":"0","delta":"input\"]","metadata":{}},{"type":"text-delta","id":"0","delta":" └─ is missing`\n3","metadata":{}},{"type":"text-delta","id":"0","delta":". The parameter","metadata":{}},{"type":"text-delta","id":"0","delta":" schema","metadata":{}},{"type":"text-delta","id":"0","delta":" shows","metadata":{}},{"type":"text-delta","id":"0","delta":" `","metadata":{}},{"type":"text-delta","id":"0","delta":"input","metadata":{}},{"type":"text-delta","id":"0","delta":"`","metadata":{}},{"type":"text-delta","id":"0","delta":" is a","metadata":{}},{"type":"text-delta","id":"0","delta":" required string parameter\n\nThis demonstrates","metadata":{}},{"type":"text-delta","id":"0","delta":" that the error handling is","metadata":{}},{"type":"text-delta","id":"0","delta":" working correctly - when a","metadata":{}},{"type":"text-delta","id":"0","delta":" required parameter is om","metadata":{}},{"type":"text-delta","id":"0","delta":"itted from","metadata":{}},{"type":"text-delta","id":"0","delta":" a","metadata":{}},{"type":"text-delta","id":"0","delta":" tool call, the system properly catches","metadata":{}},{"type":"text-delta","id":"0","delta":" this an","metadata":{}},{"type":"text-delta","id":"0","delta":"d returns a","metadata":{}},{"type":"text-delta","id":"0","delta":" descript","metadata":{}},{"type":"text-delta","id":"0","delta":"ive error rather","metadata":{}},{"type":"text-delta","id":"0","delta":" than proce","metadata":{}},{"type":"text-delta","id":"0","delta":"eding with an","metadata":{}},{"type":"text-delta","id":"0","delta":" invalid call","metadata":{}},{"type":"text-delta","id":"0","delta":".","metadata":{}},{"type":"text-end","id":"0","metadata":{}},{"type":"finish","reason":"stop","usage":{"inputTokens":598,"outputTokens":126,"totalTokens":724},"metadata":{"anthropic":{"usage":{"cache_creation":{"ephemeral_1h_input_tokens":0,"ephemeral_5m_input_tokens":0},"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"input_tokens":598,"output_tokens":1,"server_tool_use":null,"service_tier":"standard"}}}}]},{"parameters":{"model":"@anthropic/claude-opus-4-0","stream":true,"tools":[{"name":"Calculator","description":"Basic calculator tool","inputSchema":{"type":"object","required":["input"],"properties":{"input":{"type":"string","description":"The calculation to perform."}},"additionalProperties":false}}]},"prompt":{"content":[{"role":"user","content":"I am testing error handling in tool paramter parsing. I want you to call the calculator tool but omit the input parameter to intentionally differ from the tool schema.","options":{}},{"role":"assistant","content":[{"type":"reasoning","text":"The user is explicitly asking me to make an incorrect tool call for testing purposes. They want me to call the Calculator tool but omit the required \"input\" parameter, which would violate the tool's schema. This is a testing scenario where they want to see how the system handles errors.\n\nI should do exactly what they're asking - make the tool call without the required parameter.","options":{}},{"type":"text","text":"I'll intentionally call the Calculator tool without the required \"input\" parameter as you requested for testing error handling:","options":{}},{"type":"tool-call","id":"toolu_013D15z5B8mUNG9ocMsNyLA9","name":"Calculator","params":{},"providerExecuted":false,"options":{}}],"options":{}},{"role":"tool","content":[{"type":"tool-result","id":"toolu_013D15z5B8mUNG9ocMsNyLA9","name":"Calculator","isFailure":false,"result":"MalformedOutput: { \"module\": \"Toolkit\", \"method\": \"Calculator.handle\", \"description\": \"Failed to decode tool call parameters for tool 'Calculator' from:\\n'{}'\", \"cause\": { readonly input: string }\n└─ [\"input\"]\n └─ is missing }\ncaused by:\nParseError: { readonly input: string }\n└─ [\"input\"]\n └─ is missing","providerExecuted":false,"options":{}}],"options":{"anthropic":{"cacheControl":{"ttl":"5m","type":"ephemeral"}}}}]},"response":[{"type":"response-metadata","id":"msg_01PSXo5qG6jEaehv6c7sCK22","modelId":"claude-opus-4-20250514","timestamp":"1970-01-01T00:00:00.000Z","metadata":{}},{"type":"text-start","id":"0","metadata":{}},{"type":"text-delta","id":"0","delta":"Perfect","metadata":{}},{"type":"text-delta","id":"0","delta":"! As","metadata":{}},{"type":"text-delta","id":"0","delta":" expecte","metadata":{}},{"type":"text-delta","id":"0","delta":"d, the system","metadata":{}},{"type":"text-delta","id":"0","delta":" caught","metadata":{}},{"type":"text-delta","id":"0","delta":" the missing required parameter","metadata":{}},{"type":"text-delta","id":"0","delta":" and returned an","metadata":{}},{"type":"text-delta","id":"0","delta":" error.","metadata":{}},{"type":"text-delta","id":"0","delta":" The error message clearly indicates that the \"","metadata":{}},{"type":"text-delta","id":"0","delta":"input\" parameter is missing","metadata":{}},{"type":"text-delta","id":"0","delta":" from","metadata":{}},{"type":"text-delta","id":"0","delta":" the Calculator","metadata":{}},{"type":"text-delta","id":"0","delta":" tool call, which viol","metadata":{}},{"type":"text-delta","id":"0","delta":"ates the tool's schema that","metadata":{}},{"type":"text-delta","id":"0","delta":" requires this parameter.","metadata":{}},{"type":"text-delta","id":"0","delta":" This is the","metadata":{}},{"type":"text-delta","id":"0","delta":" correct behavior for error handling when","metadata":{}},{"type":"text-delta","id":"0","delta":" tool","metadata":{}},{"type":"text-delta","id":"0","delta":" parameters","metadata":{}},{"type":"text-delta","id":"0","delta":" don","metadata":{}},{"type":"text-delta","id":"0","delta":"'t match","metadata":{}},{"type":"text-delta","id":"0","delta":" the expected schema.","metadata":{}},{"type":"text-end","id":"0","metadata":{}},{"type":"finish","reason":"stop","usage":{"inputTokens":602,"outputTokens":69,"totalTokens":671},"metadata":{"anthropic":{"usage":{"cache_creation":{"ephemeral_1h_input_tokens":0,"ephemeral_5m_input_tokens":0},"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"input_tokens":602,"output_tokens":1,"server_tool_use":null,"service_tier":"standard"}}}}]},{"parameters":{"model":"@anthropic/claude-opus-4-0","stream":true,"tools":[{"name":"Calculator","description":"Basic calculator tool","inputSchema":{"type":"object","required":["input"],"properties":{"input":{"type":"string","description":"The calculation to perform."}},"additionalProperties":false}}]},"prompt":{"content":[{"role":"user","content":"I am testing error handling in tool paramter parsing. I want you to call the calculator tool but omit the input parameter to intentionally differ from the tool schema.","options":{"anthropic":{"cacheControl":{"ttl":"5m","type":"ephemeral"}}}}]},"response":[{"type":"response-metadata","id":"msg_0195DbxUY7oVbrs7QAUP6YLS","modelId":"claude-opus-4-20250514","timestamp":"1970-01-01T00:00:00.000Z","metadata":{}},{"type":"reasoning-start","id":"0","metadata":{}},{"type":"reasoning-delta","id":"0","delta":"The user is","metadata":{}},{"type":"reasoning-delta","id":"0","delta":" asking me to intent","metadata":{}},{"type":"reasoning-delta","id":"0","delta":"ionally create","metadata":{}},{"type":"reasoning-delta","id":"0","delta":" an error by calling","metadata":{}},{"type":"reasoning-delta","id":"0","delta":" the Calculator tool without","metadata":{}},{"type":"reasoning-delta","id":"0","delta":" providing the required \"","metadata":{}},{"type":"reasoning-delta","id":"0","delta":"input\" parameter.","metadata":{}},{"type":"reasoning-delta","id":"0","delta":" They want to test","metadata":{}},{"type":"reasoning-delta","id":"0","delta":" error handling in tool parameter parsing.","metadata":{}},{"type":"reasoning-delta","id":"0","delta":"\n\nSince","metadata":{}},{"type":"reasoning-delta","id":"0","delta":" they","metadata":{}},{"type":"reasoning-delta","id":"0","delta":"'re","metadata":{}},{"type":"reasoning-delta","id":"0","delta":" explicitly","metadata":{}},{"type":"reasoning-delta","id":"0","delta":" asking me","metadata":{}},{"type":"reasoning-delta","id":"0","delta":" to omit a","metadata":{}},{"type":"reasoning-delta","id":"0","delta":" required parameter to","metadata":{}},{"type":"reasoning-delta","id":"0","delta":" test error handling, I should ","metadata":{}},{"type":"reasoning-delta","id":"0","delta":"do exactly","metadata":{}},{"type":"reasoning-delta","id":"0","delta":" that -","metadata":{}},{"type":"reasoning-delta","id":"0","delta":" call the Calculator function","metadata":{}},{"type":"reasoning-delta","id":"0","delta":" without including","metadata":{}},{"type":"reasoning-delta","id":"0","delta":" the \"input\" parameter.","metadata":{}},{"type":"reasoning-delta","id":"0","delta":"","metadata":{}},{"type":"reasoning-delta","id":"0","delta":"","metadata":{"anthropic":{"type":"thinking","signature":"EqQECkYICxgCKkCmOPj7JooxBf0AyUOHaXqqCPWM8owD1CuCDoT3UAYaJZg/bNtiSV2h9cN9xtQ6rxgo6e47q91ce1l6UALCh5jFEgzNvzFUUvy1Tyc29XEaDDqZkD3ULvixDmGomSIw8TYIr+sXVdFxil1YFtzhEJpJEscdlQFCTvDIv/KJiyJJGaJZtEEJ61+W8nv9T53lKosDKqCWCn6yyh3VNAOoZ00WwMDoJyfC8nOz66b+wvSJQXV+7FBDGvHzdk15QBNk/lsxH/ehgZXdmev29vD2/oasg8QwnwBy0wSmoSSD84hmRMtoK3JU6piYoFfX0FdruVcI/I6RtBllze6y25gVDbt30rbm4kqQoy5uzVnqMF+4ueEk9sk+bw5KQymrYHE0sfrSAYK4HX23LUtOyYujk0GWkdHwVpQEPL7VRcU9PWdP22fe2Q+fm3oQGUDNZpi5gTxBMQYK6RxscZ5gfJDbCAxh8MEquCnMxyk0qmj8CN1KyO344L56gTY7t8FvuzZFuitkt9byovMwFIe5ulr+r3U5DRSywEkv6O+gCRH6llYufPXnnkO5ahz4zMDUmCeHEhI+UX7+ceCZgC2e7gOxq9RWgoWrSHwJ9pzHxlexdFohNlT+uwcgPmNFiWQptMZPWFH7J3NOnr0O/v3/886qDjkwpllzNmSfv/1l4Ivmoe/Kn5nprh7YVgGDoyLAVPxs2X91K3f5lqWq/39Xm9cYAQ=="}}},{"type":"reasoning-end","id":"0","metadata":{}},{"type":"text-start","id":"1","metadata":{}},{"type":"text-delta","id":"1","delta":"I understan","metadata":{}},{"type":"text-delta","id":"1","delta":"d you want to test error handling by","metadata":{}},{"type":"text-delta","id":"1","delta":" having","metadata":{}},{"type":"text-delta","id":"1","delta":" me make","metadata":{}},{"type":"text-delta","id":"1","delta":" an","metadata":{}},{"type":"text-delta","id":"1","delta":" invali","metadata":{}},{"type":"text-delta","id":"1","delta":"d tool","metadata":{}},{"type":"text-delta","id":"1","delta":" call. I'll call the Calculator tool","metadata":{}},{"type":"text-delta","id":"1","delta":" without the required \"input\" parameter:","metadata":{}},{"type":"text-end","id":"1","metadata":{}},{"type":"tool-params-start","id":"toolu_01M5a1PVAQFXNv46cwDyWi7z","name":"Calculator","providerExecuted":false,"metadata":{}},{"type":"tool-params-delta","id":"toolu_01M5a1PVAQFXNv46cwDyWi7z","delta":"","metadata":{}},{"type":"tool-params-end","id":"toolu_01M5a1PVAQFXNv46cwDyWi7z","metadata":{}}]},{"parameters":{"model":"@anthropic/claude-opus-4-0","stream":true,"tools":[{"name":"Calculator","description":"Basic calculator tool","inputSchema":{"type":"object","required":["input"],"properties":{"input":{"type":"string","description":"The calculation to perform."}},"additionalProperties":false}}]},"prompt":{"content":[{"role":"user","content":"I am testing error handling in tool paramter parsing. I want you to call the calculator tool but omit the input parameter to intentionally differ from the tool schema.","options":{}},{"role":"assistant","content":[{"type":"reasoning","text":"The user is asking me to intentionally create an error by calling the Calculator tool without providing the required \"input\" parameter. They want to test error handling in tool parameter parsing.\n\nSince they're explicitly asking me to omit a required parameter to test error handling, I should do exactly that - call the Calculator function without including the \"input\" parameter.","options":{}},{"type":"text","text":"I understand you want to test error handling by having me make an invalid tool call. I'll call the Calculator tool without the required \"input\" parameter:","options":{}},{"type":"tool-call","id":"toolu_01M5a1PVAQFXNv46cwDyWi7z","name":"Calculator","params":{},"providerExecuted":false,"options":{}}],"options":{}},{"role":"tool","content":[{"type":"tool-result","id":"toolu_01M5a1PVAQFXNv46cwDyWi7z","name":"Calculator","isFailure":false,"result":"MalformedOutput: { \"module\": \"Toolkit\", \"method\": \"Calculator.handle\", \"description\": \"Failed to decode tool call parameters for tool 'Calculator' from:\\n'{}'\", \"cause\": { readonly input: string }\n└─ [\"input\"]\n └─ is missing }\ncaused by:\nParseError: { readonly input: string }\n└─ [\"input\"]\n └─ is missing","providerExecuted":false,"options":{}}],"options":{"anthropic":{"cacheControl":{"ttl":"5m","type":"ephemeral"}}}}]},"response":[{"type":"response-metadata","id":"msg_01BeXiK9yEhEQrs9zPYNem6C","modelId":"claude-opus-4-20250514","timestamp":"1970-01-01T00:00:00.000Z","metadata":{}},{"type":"text-start","id":"0","metadata":{}},{"type":"text-delta","id":"0","delta":"As expected, this","metadata":{}},{"type":"text-delta","id":"0","delta":" generate","metadata":{}},{"type":"text-delta","id":"0","delta":"d an","metadata":{}},{"type":"text-delta","id":"0","delta":" error because the \"","metadata":{}},{"type":"text-delta","id":"0","delta":"input\" parameter is required according","metadata":{}},{"type":"text-delta","id":"0","delta":" to the tool","metadata":{}},{"type":"text-delta","id":"0","delta":"'s","metadata":{}},{"type":"text-delta","id":"0","delta":" schema,","metadata":{}},{"type":"text-delta","id":"0","delta":" but","metadata":{}},{"type":"text-delta","id":"0","delta":" I om","metadata":{}},{"type":"text-delta","id":"0","delta":"itted it. The error message clearly","metadata":{}},{"type":"text-delta","id":"0","delta":" indicates that the \"","metadata":{}},{"type":"text-delta","id":"0","delta":"input\" fiel","metadata":{}},{"type":"text-delta","id":"0","delta":"d is missing from the tool call parameters","metadata":{}},{"type":"text-delta","id":"0","delta":".","metadata":{}},{"type":"text-end","id":"0","metadata":{}},{"type":"finish","reason":"stop","usage":{"inputTokens":610,"outputTokens":50,"totalTokens":660},"metadata":{"anthropic":{"usage":{"cache_creation":{"ephemeral_1h_input_tokens":0,"ephemeral_5m_input_tokens":0},"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"input_tokens":610,"output_tokens":4,"server_tool_use":null,"service_tier":"standard"}}}}]}]}