Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/runner/templates/agents/node/manual/template.njk
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,6 @@ const TOOLS = {{ agent.tools | dump }};
toolSpan.setAttribute("gen_ai.operation.name", "execute_tool");
toolSpan.setAttribute("gen_ai.agent.name", AGENT_NAME);
toolSpan.setAttribute("gen_ai.tool.name", "{{ tool.name }}");
toolSpan.setAttribute("gen_ai.tool.type", "function");
toolSpan.setAttribute("gen_ai.tool.description", "{{ tool.description }}");

const toolInputJson{{ turnIndex }}_{{ loop.index }} = JSON.stringify({{ tool.arguments | dump }});
Expand Down
1 change: 0 additions & 1 deletion src/runner/templates/agents/python/manual/template.njk
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,6 @@ TOOLS = {{ agent.tools | dump }}
tool_span.set_data("gen_ai.operation.name", "execute_tool")
tool_span.set_data("gen_ai.agent.name", AGENT_NAME)
tool_span.set_data("gen_ai.tool.name", "{{ tool.name }}")
tool_span.set_data("gen_ai.tool.type", "function")
tool_span.set_data("gen_ai.tool.description", "{{ tool.description }}")

tool_input_json = json.dumps({{ tool.arguments | dump }})
Expand Down
2 changes: 0 additions & 2 deletions src/test-cases/agents/tool-call.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,14 +107,12 @@ export const toolCallAgentTest: TestDefinition = {
checkToolCalls([
{
name: "add",
type: "function",
description: "Add two numbers together",
input: { a: 3, b: 5 },
output: 8,
},
{
name: "multiply",
type: "function",
description: "Multiply two numbers together",
input: { a: 8, b: 4 },
output: 32,
Expand Down
15 changes: 0 additions & 15 deletions src/test-cases/checks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,6 @@ export const checkAgentSpanAttributes: Check = {
* Validates:
* - description equals "<gen_ai.operation.name> <gen_ai.tool.name>"
* - gen_ai.operation.name matches TOOL_OPERATION_NAME_PATTERN
* - gen_ai.tool.type exists
* - gen_ai.tool.name exists
* - gen_ai.tool.description exists
*
Expand All @@ -243,7 +242,6 @@ export const checkToolSpanAttributes: Check = {
"description": (span) =>
`${span.data?.["gen_ai.operation.name"]} ${span.data?.["gen_ai.tool.name"]}`,
"gen_ai.operation.name": TOOL_OPERATION_NAME_PATTERN,
"gen_ai.tool.type": true,
"gen_ai.tool.name": true,
"gen_ai.tool.description": true,
});
Expand All @@ -256,8 +254,6 @@ export const checkToolSpanAttributes: Check = {
export interface ExpectedToolCall {
/** Tool name to match */
name: string;
/** Expected tool type (e.g., "function") */
type?: string;
/** Expected tool description */
description?: string;
/** Expected input arguments (parsed from gen_ai.tool.input JSON) */
Expand All @@ -276,7 +272,6 @@ export interface ExpectedToolCall {
* // Check a single tool call
* checkToolCalls([{
* name: "add",
* type: "function",
* description: "Add two numbers together",
* input: { a: 4, b: 7 },
* output: 11,
Expand Down Expand Up @@ -317,16 +312,6 @@ export function checkToolCalls(expectedTools: ExpectedToolCall[]): Check {
continue;
}

// Validate type if specified
if (expected.type !== undefined) {
const actual = toolSpan.data?.["gen_ai.tool.type"];
if (actual !== expected.type) {
const msg = `Tool "${expected.name}" should have type "${expected.type}" but has "${actual}"`;
errors.push(msg);
locations.push({ spanId: toolSpan.span_id, attribute: "gen_ai.tool.type", message: msg });
}
}

// Validate description if specified
if (expected.description !== undefined) {
const actual = toolSpan.data?.["gen_ai.tool.description"];
Expand Down
Loading