test(apicompat): avoid unchecked tool history assertions

This commit is contained in:
hansnow
2026-08-19 15:31:18 +08:00
parent e4896c41d2
commit fefd0d5145
@@ -133,7 +133,9 @@ func TestAdaptResponsesClientToolsWithInheritedMapping_ExplicitToolsReplaceInher
require.NoError(t, err)
require.False(t, changed)
require.Empty(t, mapping)
require.Equal(t, "custom_tool_call", req["input"].([]any)[0].(map[string]any)["type"])
items := requireResponsesClientToolValue[[]any](t, req["input"])
call := requireResponsesClientToolValue[map[string]any](t, items[0])
require.Equal(t, "custom_tool_call", call["type"])
}
func TestRestoreResponsesClientToolPayload_RestoresClientAndNamespaceCalls(t *testing.T) {