Skip to content

Commit 4de6a0d

Browse files
committed
ci: add session handling to agent
1 parent 40f4c06 commit 4de6a0d

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

integration/test/tools_test.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -192,11 +192,12 @@ func (a *Agent) callMCPTool(ctx context.Context, toolName string, arguments map[
192192

193193
func (a *Agent) ChatWithResponse(ctx context.Context, t *testing.T, userMessage string, expectedOntapErrorStr string) (string, error) {
194194
messages := []openai.ChatCompletionMessageParamUnion{
195-
openai.SystemMessage("When a tool call fails due to a validation error, analyze the error message and check if you " +
196-
"misassigned a value to the wrong parameter (e.g. passed the cluster name as the svm name). " +
197-
"Correct only the parameter mapping — never modify, truncate, or invent the actual values " +
198-
"the user provided. If the error cannot be fixed by correcting a parameter mapping, report the " +
199-
"error to the user and stop."),
195+
openai.SystemMessage("When a tool call fails due to a validation error, check two things: " +
196+
"(1) Did you misassign a value to the wrong parameter (e.g. passed the cluster name as the svm name)? " +
197+
"(2) Did you misread or partially extract a value from the user's message (e.g. dropped a path prefix like /vol/vol1/)? " +
198+
"In either case, correct the mistake using only values already present in the conversation — " +
199+
"never truncate, invent, or change values beyond what is needed to fix the extraction or mapping error. " +
200+
"If the error cannot be fixed this way, report it to the user and stop."),
200201
openai.UserMessage(userMessage),
201202
}
202203

0 commit comments

Comments
 (0)