aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/aflow/testdata/TestNilToolArg.trajectory.json
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2026-02-19 08:01:43 +0100
committerDmitry Vyukov <dvyukov@google.com>2026-02-19 09:07:17 +0000
commitd81144992f522593dc4f225d4054eb1695be1df0 (patch)
treecea1a4cff1e035766feed3ac87787d8d7a757c85 /pkg/aflow/testdata/TestNilToolArg.trajectory.json
parent5fa76f921006ff7d47956b96a6cea333681444e4 (diff)
pkg/aflow: fix handling of optional tool arguments
Currently we crash on nil deref, if LLM specifies explicit 'nil' for an optional (pointer) argument. Handle such cases properly. Fixes #6811
Diffstat (limited to 'pkg/aflow/testdata/TestNilToolArg.trajectory.json')
-rw-r--r--pkg/aflow/testdata/TestNilToolArg.trajectory.json98
1 files changed, 98 insertions, 0 deletions
diff --git a/pkg/aflow/testdata/TestNilToolArg.trajectory.json b/pkg/aflow/testdata/TestNilToolArg.trajectory.json
new file mode 100644
index 000000000..518e8a26b
--- /dev/null
+++ b/pkg/aflow/testdata/TestNilToolArg.trajectory.json
@@ -0,0 +1,98 @@
+[
+ {
+ "Seq": 0,
+ "Nesting": 0,
+ "Type": "flow",
+ "Name": "test",
+ "Started": "0001-01-01T00:00:01Z"
+ },
+ {
+ "Seq": 1,
+ "Nesting": 1,
+ "Type": "agent",
+ "Name": "smarty",
+ "Model": "model",
+ "Started": "0001-01-01T00:00:02Z",
+ "Instruction": "Instructions\nPrefer calling several tools at the same time to save round-trips.\n",
+ "Prompt": "Initial Prompt"
+ },
+ {
+ "Seq": 2,
+ "Nesting": 2,
+ "Type": "llm",
+ "Name": "smarty",
+ "Model": "model",
+ "Started": "0001-01-01T00:00:03Z"
+ },
+ {
+ "Seq": 2,
+ "Nesting": 2,
+ "Type": "llm",
+ "Name": "smarty",
+ "Model": "model",
+ "Started": "0001-01-01T00:00:03Z",
+ "Finished": "0001-01-01T00:00:04Z"
+ },
+ {
+ "Seq": 3,
+ "Nesting": 2,
+ "Type": "tool",
+ "Name": "tool",
+ "Started": "0001-01-01T00:00:05Z",
+ "Args": {
+ "Optional": null
+ }
+ },
+ {
+ "Seq": 3,
+ "Nesting": 2,
+ "Type": "tool",
+ "Name": "tool",
+ "Started": "0001-01-01T00:00:05Z",
+ "Finished": "0001-01-01T00:00:06Z",
+ "Error": "missing argument \"Optional\"",
+ "Args": {
+ "Optional": null
+ }
+ },
+ {
+ "Seq": 4,
+ "Nesting": 2,
+ "Type": "llm",
+ "Name": "smarty",
+ "Model": "model",
+ "Started": "0001-01-01T00:00:07Z"
+ },
+ {
+ "Seq": 4,
+ "Nesting": 2,
+ "Type": "llm",
+ "Name": "smarty",
+ "Model": "model",
+ "Started": "0001-01-01T00:00:07Z",
+ "Finished": "0001-01-01T00:00:08Z"
+ },
+ {
+ "Seq": 1,
+ "Nesting": 1,
+ "Type": "agent",
+ "Name": "smarty",
+ "Model": "model",
+ "Started": "0001-01-01T00:00:02Z",
+ "Finished": "0001-01-01T00:00:09Z",
+ "Instruction": "Instructions\nPrefer calling several tools at the same time to save round-trips.\n",
+ "Prompt": "Initial Prompt",
+ "Reply": "Result"
+ },
+ {
+ "Seq": 0,
+ "Nesting": 0,
+ "Type": "flow",
+ "Name": "test",
+ "Started": "0001-01-01T00:00:01Z",
+ "Finished": "0001-01-01T00:00:10Z",
+ "Results": {
+ "Result": "Result"
+ }
+ }
+] \ No newline at end of file