@@ -4378,7 +4378,11 @@ describe("diagnostics-otel service", () => {
43784378 content : [
43794379 { type : "thinking" , thinking : "input-internal-canary" } ,
43804380 { type : "reasoning" , content : "input-part-internal-canary" } ,
4381- { type : "text" , text : "visible input" } ,
4381+ {
4382+ type : "text" ,
4383+ text : "visible input" ,
4384+ textSignature : "input-text-signature-internal-canary" ,
4385+ } ,
43824386 ] ,
43834387 } ,
43844388 ] ,
@@ -4390,6 +4394,13 @@ describe("diagnostics-otel service", () => {
43904394 content : [
43914395 { type : "redacted_thinking" , data : "output-internal-canary" } ,
43924396 { type : "text" , text : "visible output" } ,
4397+ {
4398+ type : "toolCall" ,
4399+ id : "tool-1" ,
4400+ name : "lookup" ,
4401+ arguments : { query : "visible" } ,
4402+ thoughtSignature : "output-thought-signature-internal-canary" ,
4403+ } ,
43934404 ] ,
43944405 } ,
43954406 ] ,
@@ -4406,6 +4417,8 @@ describe("diagnostics-otel service", () => {
44064417 "output-internal-canary" ,
44074418 "output-message-internal-canary" ,
44084419 "output-text-internal-canary" ,
4420+ "input-text-signature-internal-canary" ,
4421+ "output-thought-signature-internal-canary" ,
44094422 ] ;
44104423 for ( const key of [
44114424 "gen_ai.input.messages" ,
@@ -4423,6 +4436,12 @@ describe("diagnostics-otel service", () => {
44234436 ] ) ;
44244437 expect ( JSON . parse ( stringAttribute ( attrs , "gen_ai.output.messages" ) ) [ 0 ] ?. parts ) . toEqual ( [
44254438 { type : "text" , content : "visible output" } ,
4439+ {
4440+ type : "tool_call" ,
4441+ id : "tool-1" ,
4442+ name : "lookup" ,
4443+ arguments : { query : "visible" } ,
4444+ } ,
44264445 ] ) ;
44274446 expect (
44284447 JSON . parse ( stringAttribute ( attrs , "openclaw.content.input_messages" ) ) [ 0 ] ?. content [ 0 ] ,
@@ -4433,6 +4452,17 @@ describe("diagnostics-otel service", () => {
44334452 expect (
44344453 JSON . parse ( stringAttribute ( attrs , "openclaw.content.output_messages" ) ) [ 0 ] ?. content [ 0 ] ,
44354454 ) . toEqual ( { type : "reasoning" , redacted : true } ) ;
4455+ expect (
4456+ JSON . parse ( stringAttribute ( attrs , "openclaw.content.input_messages" ) ) [ 0 ] ?. content [ 2 ] ,
4457+ ) . toEqual ( { type : "text" , text : "visible input" } ) ;
4458+ expect (
4459+ JSON . parse ( stringAttribute ( attrs , "openclaw.content.output_messages" ) ) [ 0 ] ?. content [ 2 ] ,
4460+ ) . toEqual ( {
4461+ type : "toolCall" ,
4462+ id : "tool-1" ,
4463+ name : "lookup" ,
4464+ arguments : { query : "visible" } ,
4465+ } ) ;
44364466 } ) ;
44374467
44384468 test ( "emits semconv response text for tool response parts" , async ( ) => {
0 commit comments